adds ehrenberg platform
This commit is contained in:
17
include/ehrenberg/devices/gpio.h
Normal file
17
include/ehrenberg/devices/gpio.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#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 */
|
Reference in New Issue
Block a user