summaryrefslogtreecommitdiff
path: root/gpio/gpio.h
blob: bb4201ee10cd075e0879b7e92feb8d0b58f7fec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef LAKS_GPIO_GPIO_H
#define LAKS_GPIO_GPIO_H

#if defined(STM32F1)
#include "gpio_stm32.h"
static GPIO_t GPIOA(0x40010800);
static GPIO_t GPIOB(0x40010c00);
static GPIO_t GPIOC(0x40011000);
static GPIO_t GPIOD(0x40011400);
static GPIO_t GPIOE(0x40011800);

#elif defined(STM32F3)
#include "gpio_stm32.h"
static GPIO_t GPIOA(0x48000000);
static GPIO_t GPIOB(0x48000400);
static GPIO_t GPIOC(0x48000800);
static GPIO_t GPIOD(0x48000c00);
static GPIO_t GPIOE(0x48001000);
static GPIO_t GPIOF(0x48001400);

#elif defined(STM32F4)
#include "gpio_stm32.h"
static GPIO_t GPIOA(0x40020000);
static GPIO_t GPIOB(0x40020400);
static GPIO_t GPIOC(0x40020800);
static GPIO_t GPIOD(0x40020c00);
static GPIO_t GPIOE(0x40021000);
static GPIO_t GPIOF(0x40021400);
static GPIO_t GPIOG(0x40021800);
static GPIO_t GPIOH(0x40021c00);
static GPIO_t GPIOI(0x40022000);

#elif defined(STM32L0)
#include "gpio_stm32.h"
static GPIO_t GPIOA(0x50000000);
static GPIO_t GPIOB(0x50000400);
static GPIO_t GPIOC(0x50000800);
static GPIO_t GPIOD(0x50000c00);
static GPIO_t GPIOH(0x50001c00);

#elif defined(STM32WB)
#include "gpio_stm32.h"
static GPIO_t GPIOA(0x48000000);
static GPIO_t GPIOB(0x48000400);
static GPIO_t GPIOC(0x48000800);
static GPIO_t GPIOD(0x48000c00);
static GPIO_t GPIOE(0x48001000);
static GPIO_t GPIOH(0x48001c00);

#elif defined(NRF52840)
#include "gpio_nrf.h"
static GPIO_t P0(0x50000000);
static GPIO_t P1(0x50000300);

#endif

#endif