adds support for new mnrs peripherals

This commit is contained in:
2024-02-22 17:09:35 +01:00
parent 10b8f3173d
commit 98760929c6
12 changed files with 540 additions and 129 deletions

View File

@@ -2,16 +2,13 @@
#define _BSP_GPIO_H
#include <stdint.h>
#include "gen/Apb3Gpio.h"
typedef struct __attribute((__packed__)) {
volatile uint32_t pin_in;
volatile uint32_t pin_out;
volatile uint32_t out_en;
} gpio_t;
#define gpio_t apb3gpio_t
inline void gpio_init(gpio_t* reg) {
reg->out_en=0;
reg->pin_out=0;
set_gpio_write(reg, 0);
set_gpio_writeEnable(reg, 0);
}
#endif /* _BSP_GPIO_H */