diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-02-26 21:06:30 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-02-26 21:06:30 +0100 |
commit | 79b6705bfc60ed17ddbf6c36ead99e9f5c3c7404 (patch) | |
tree | 0b11a3c4f39f6a5ba6389b70b0d225ade3b656f5 /firmware/drivers/GPIO.h | |
parent | 1b6d3f9ee7fad554f23b05d7e4a09c3ec9635636 (diff) |
Old SPI code is now disabled, new SPI code succesfully reads out WM8523 chip id. Needs lots of cleaning...
Diffstat (limited to 'firmware/drivers/GPIO.h')
-rw-r--r-- | firmware/drivers/GPIO.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/drivers/GPIO.h b/firmware/drivers/GPIO.h new file mode 100644 index 0000000..9393edc --- /dev/null +++ b/firmware/drivers/GPIO.h @@ -0,0 +1,21 @@ +
+extern void GPIOSetDir( uint32_t portNum, uint32_t bitPosi, uint32_t dir );
+extern void GPIOSetValue( uint32_t portNum, uint32_t bitPosi, uint32_t bitVal );
+extern void GPIOSetPull(uint32_t portNum, uint32_t bitPosi, uint32_t dir);
+extern uint32_t GPIOGetValue (uint32_t portNum, uint32_t bitPosi);
+void GPIOSetInterrupt ( uint32_t portNum, uint32_t bitPosi, uint32_t dir );
+void GPIOClearInterrupt( void );
+uint32_t GPIOCheckInterrupts ( uint32_t portNum, uint32_t dir);
+
+#define NOPULL 0
+#define PULLUP 1
+#define PULLDOWN 2
+
+#define INPUT 0
+#define OUTPUT 1
+
+#define FALLING 0
+#define RISING 1
+
+#define LOW 0
+#define HIGH 1
|