#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 */
}
}
+void delay(uint32_t x); /* in startup.s */
+
static inline void gpio_pullups(uint32_t mask0, uint32_t mask1, int state)
{
REG_GPPUD = state;