X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Fgpio.h;h=3a2e253665bbf67c3ed231387c9d53f766148242;hp=19ca6c35eb24b95897f5dee6d1ac2501d6423f3d;hb=993155fee2327f1f3cda285c9548bbb09688a3f3;hpb=9a3655a43358c43128f6e62c8d74ff3aa81960c7 diff --git a/src/gpio.h b/src/gpio.h index 19ca6c3..3a2e253 100644 --- a/src/gpio.h +++ b/src/gpio.h @@ -1,9 +1,10 @@ #ifndef GPIO_H_ #define GPIO_H_ +#include "config.h" #include "asm.h" -#define GPIO_BASE 0x3f200000 +#define GPIO_BASE (IO_BASE | 0x200000) #define GPIO_REG(x) (*(volatile uint32_t*)(GPIO_BASE | (x))) /* function select */ @@ -83,6 +84,8 @@ static inline void gpio_fsel(int x, int f) } } +void delay(uint32_t x); /* in startup.s */ + static inline void gpio_pullups(uint32_t mask0, uint32_t mask1, int state) { REG_GPPUD = state;