+#define ao_enable_input(port,bit,mode) do { \
+ ao_enable_port(port); \
+ lpc_set_gpio(port,bit); \
+ lpc_gpio.dir[port] &= ~(1 << bit); \
+ ao_gpio_set_mode(port,bit,mode); \
+ } while (0)
+
+#define lpc_token_paster_2(x,y) x ## y
+#define lpc_token_evaluator_2(x,y) lpc_token_paster_2(x,y)
+#define lpc_token_paster_3(x,y,z) x ## y ## z
+#define lpc_token_evaluator_3(x,y,z) lpc_token_paster_3(x,y,z)
+#define lpc_token_paster_4(w,x,y,z) w ## x ## y ## z
+#define lpc_token_evaluator_4(w,x,y,z) lpc_token_paster_4(w,x,y,z)
+#define analog_reg(port,bit) lpc_token_evaluator_4(pio,port,_,bit)
+#define analog_func(id) lpc_token_evaluator_2(LPC_IOCONF_FUNC_AD,id)
+
+#define ao_enable_analog(port,bit,id) do { \