From d5fbedc24fdd41e7c30b2f9239f666f33893e065 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 16 Sep 2021 23:50:26 +0200 Subject: gpio: Generate instances from platform spec. --- platforms/stm32/f0.yaml | 21 +++++++++++++++++++++ platforms/stm32/f1.yaml | 16 ++++++++++++++++ platforms/stm32/f3.yaml | 19 +++++++++++++++++++ platforms/stm32/f4.yaml | 28 ++++++++++++++++++++++++++++ platforms/stm32/l0.yaml | 18 ++++++++++++++++++ platforms/stm32/wb.yaml | 5 +++++ 6 files changed, 107 insertions(+) create mode 100644 platforms/stm32/f0.yaml create mode 100644 platforms/stm32/l0.yaml (limited to 'platforms/stm32') diff --git a/platforms/stm32/f0.yaml b/platforms/stm32/f0.yaml new file mode 100644 index 0000000..6e8899a --- /dev/null +++ b/platforms/stm32/f0.yaml @@ -0,0 +1,21 @@ +# This is incomplete, just preserving register addresses! +- periph: + stm32_gpio: + GPIOA: + offset: 0x48000000 + type: v2 + GPIOB: + offset: 0x48000400 + type: v2 + GPIOC: + offset: 0x48000800 + type: v2 + GPIOD: + offset: 0x48000c00 + type: v2 + GPIOE: + offset: 0x48001000 + type: v2 + GPIOF: + offset: 0x48001400 + type: v2 diff --git a/platforms/stm32/f1.yaml b/platforms/stm32/f1.yaml index ed97844..a71a319 100644 --- a/platforms/stm32/f1.yaml +++ b/platforms/stm32/f1.yaml @@ -1,5 +1,21 @@ # This is incomplete, just preserving register addresses! - periph: + stm32_gpio: + GPIOA: + offset: 0x40010800 + type: v1 + GPIOB: + offset: 0x40010c00 + type: v1 + GPIOC: + offset: 0x40011000 + type: v1 + GPIOD: + offset: 0x40011400 + type: v1 + GPIOE: + offset: 0x40011800 + type: v1 stm32_timer: TIM1: offset: 0x40012c00 diff --git a/platforms/stm32/f3.yaml b/platforms/stm32/f3.yaml index ed97844..4cbb3b8 100644 --- a/platforms/stm32/f3.yaml +++ b/platforms/stm32/f3.yaml @@ -1,5 +1,24 @@ # This is incomplete, just preserving register addresses! - periph: + stm32_gpio: + GPIOA: + offset: 0x48000000 + type: v2 + GPIOB: + offset: 0x48000400 + type: v2 + GPIOC: + offset: 0x48000800 + type: v2 + GPIOD: + offset: 0x48000c00 + type: v2 + GPIOE: + offset: 0x48001000 + type: v2 + GPIOF: + offset: 0x48001400 + type: v2 stm32_timer: TIM1: offset: 0x40012c00 diff --git a/platforms/stm32/f4.yaml b/platforms/stm32/f4.yaml index d362fa4..429e31b 100644 --- a/platforms/stm32/f4.yaml +++ b/platforms/stm32/f4.yaml @@ -29,6 +29,34 @@ size: 64k periph: + stm32_gpio: + GPIOA: + offset: 0x40020000 + type: v2 + GPIOB: + offset: 0x40020400 + type: v2 + GPIOC: + offset: 0x40020800 + type: v2 + GPIOD: + offset: 0x40020c00 + type: v2 + GPIOE: + offset: 0x40021000 + type: v2 + GPIOF: + offset: 0x40021400 + type: v2 + GPIOG: + offset: 0x40021800 + type: v2 + GPIOH: + offset: 0x40021c00 + type: v2 + GPIOI: + offset: 0x40022000 + type: v2 stm32_timer: TIM1: diff --git a/platforms/stm32/l0.yaml b/platforms/stm32/l0.yaml new file mode 100644 index 0000000..75c4330 --- /dev/null +++ b/platforms/stm32/l0.yaml @@ -0,0 +1,18 @@ +# This is incomplete, just preserving register addresses! +- periph: + stm32_gpio: + GPIOA: + offset: 0x50000000 + type: v2 + GPIOB: + offset: 0x50000400 + type: v2 + GPIOC: + offset: 0x50000800 + type: v2 + GPIOD: + offset: 0x50000c00 + type: v2 + GPIOH: + offset: 0x50001c00 + type: v2 diff --git a/platforms/stm32/wb.yaml b/platforms/stm32/wb.yaml index cb1d5fb..152ea28 100644 --- a/platforms/stm32/wb.yaml +++ b/platforms/stm32/wb.yaml @@ -31,14 +31,19 @@ stm32_gpio: GPIOA: offset: 0x48000000 + type: v2 GPIOB: offset: 0x48000400 + type: v2 GPIOC: offset: 0x48000800 + type: v2 GPIOD: offset: 0x48000c00 + type: v2 GPIOE: offset: 0x48001000 + type: v2 stm32_timer: TIM1: -- cgit v1.2.3