#define LPC_GPIO_REGS(x) ((struct lpc_gpio *) (LPC_GPIO_BASE))
-
/***************************************************************************** */
/* Public access to GPIO setup */
+#define GPIO_DIR_IN 0
+#define GPIO_DIR_OUT 1
+
enum gpio_interrupt_senses {
EDGES_BOTH = 0,
EDGE_FALLING,
LEVEL_LOW,
};
-#define GPIO_DIR_IN 0
-#define GPIO_DIR_OUT 1
-
-/* GPIO Interrupts */
-/* Add a callback on a GPIO interrupt.
- * This call will configure the GPIO (call to config_pio()), set it as input and
- * activate the interrupt on the given 'sense' event. use the gpio_interrupt_senses
- * enum for 'sense' values.
- * The callback will receive the irq number as argument.
- * Returns the interrupt number if OK, or a negative value in case of error.
- */
-int set_gpio_callback(void (*callback) (uint32_t), const struct pio* gpio, uint8_t sense);
-void remove_gpio_callback(unsigned int irq);
-
/* GPIO Activation */
void gpio_on(void);
+
void gpio_off(void);
#define gpio_dir_in(gpio) \
+/* GPIO Interrupts */
+/* Add a callback on a GPIO interrupt.
+ * This call will configure the GPIO (call to config_pio()), set it as input and
+ * activate the interrupt on the given 'sense' event. use the gpio_interrupt_senses
+ * enum for 'sense' values.
+ * The callback will receive the irq number as argument.
+ * Returns the interrupt number if OK, or a negative value in case of error.
+ */
+int set_gpio_callback(void (*callback) (uint32_t), const struct pio* gpio, uint8_t sense);
+
+void remove_gpio_callback(unsigned int irq);
+
+
+
+
/***************************************************************************** */
/* Pin interrupts and patern interrupts */
/***************************************************************************** */