32volatile uint32_t *
gpio = NULL;
37 return (
gpio != NULL) ? true :
false;
84 pynq_error(
"gpio_set_direction: invalid direction %d", dir);
86 int pin_bank =
pin % 32;
87 int bank =
pin < 32 ? 1 : 3;
89 gpio[bank] =
gpio[bank] | (1 << pin_bank);
91 gpio[bank] =
gpio[bank] & ~(1 << pin_bank);
97 int pin_bank =
pin % 32;
98 int bank =
pin < 32 ? 1 : 3;
107 pynq_error(
"gpio_set_level: level %d is invalid", level);
109 int pin_bank =
pin % 32;
110 int bank =
pin < 32 ? 0 : 2;
112 gpio[bank] =
gpio[bank] | (1 << pin_bank);
114 gpio[bank] =
gpio[bank] & ~(1 << pin_bank);
120 int pin_bank =
pin % 32;
121 int bank =
pin < 32 ? 0 : 2;
gpio_direction_t gpio_get_direction(const gpio_t pin)
gpio_level_t gpio_get_level(const gpio_t pin)
void gpio_set_level(const gpio_t pin, const gpio_level_t level)
void gpio_reset_pin(const gpio_t pin)
void gpio_set_direction(const gpio_t pin, const gpio_direction_t direction)
volatile uint32_t * intc0
void arm_shared_close(arm_shared *handle)
void * arm_shared_init(arm_shared *handle, const uint32_t address, const uint32_t length)
bool gpio_is_initialized(void)
void gpio_reset(void)
Reset all GPIO pins.