MNRS-BM-BSP/include/ehrenberg/devices/gpio.h

18 lines
311 B
C
Raw Normal View History

2024-01-13 23:06:01 +01:00
#ifndef _BSP_GPIO_H
#define _BSP_GPIO_H
#include <stdint.h>
typedef struct __attribute((__packed__)) {
volatile uint32_t pin_in;
volatile uint32_t pin_out;
volatile uint32_t out_en;
} gpio_t;
inline void gpio_init(gpio_t* reg) {
reg->out_en=0;
reg->pin_out=0;
}
#endif /* _BSP_GPIO_H */