diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 13:46:41 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 13:46:41 -0700 |
commit | 93b063fedfcf7409a67df035170ea5670cad22e1 (patch) | |
tree | a23321a7465d966b1ccf196ca00e65a70c9f9110 /02-usart/include/arch/stm32l4xxx/peripherals/gpio.h | |
parent | b040195d31df6ad759f16ea3456471897f55daa1 (diff) | |
download | stm32l4-93b063fedfcf7409a67df035170ea5670cad22e1.tar.gz stm32l4-93b063fedfcf7409a67df035170ea5670cad22e1.tar.bz2 stm32l4-93b063fedfcf7409a67df035170ea5670cad22e1.zip |
Moved action to top level.
Removed old iterations of the project and moved the files from 02-usart
to the root directory since that's the sole place where the action is
and that subproject has outgrown its initial title.
Diffstat (limited to '02-usart/include/arch/stm32l4xxx/peripherals/gpio.h')
-rw-r--r-- | 02-usart/include/arch/stm32l4xxx/peripherals/gpio.h | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/02-usart/include/arch/stm32l4xxx/peripherals/gpio.h b/02-usart/include/arch/stm32l4xxx/peripherals/gpio.h deleted file mode 100644 index 944d725..0000000 --- a/02-usart/include/arch/stm32l4xxx/peripherals/gpio.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef CORE_GPIO_H__ -#define CORE_GPIO_H__ - -#include "kern/common.h" -#include "arch/stm32l4xxx/peripherals/rcc.h" - -#include <stdint.h> - -/* - * Structure defining the layout of the layout of the GPIO registers on the - * stm32l432 development board. - */ -typedef struct GPIO_PORT_STR { - /* Mode of each GPIO pin for this GPIO port. */ -#define gpio_mode_n(off) (3 << ((off) * 2)) - __IO uint32_t mode_r; /* Mode register */ - - /* Output type for each gpio pin in this port. */ -#define gpio_otype_n(off) (1 << (off)) - __IO uint32_t otype_r; - - /* GPIO port output speed. */ -#define gpio_ospeed_n(off) (3 << ((off) * 2)) - __IO uint32_t ospeed_r; - - /* GPIO port pull-up/pull-down register */ -#define gpio_pupd_n(off) (3 << ((off) * 2)) - __IO uint32_t pupd_r; - - /* GPIO port input data register. */ -#define gpio_idr_n(off) (1 << (off)) - __IO uint32_t id_r; - - /* GPIO port output data register. */ -#define gpio_odr_n(off) (1 << (off)) - __IO uint32_t od_r; - - /* GPIO port bit set/reset register. */ -#define gpio_bs_n(off) (1 << (off)) -#define gpio_br_n(off) (1 << (off)) - __IO uint32_t bsr_r; - - /* GPIO port configuration lock register. */ -#define gpio_lck_n(off) (1 << (off)) -#define gpio_lckk (1 << 16) - __IO uint32_t lck_r; - - /* Alternate function low-register. */ -#define gpio_afsel_n(off) (0xf << ((off) * 4)) - __IO uint32_t af_rl; - /* Alternate function high-register. */ - __IO uint32_t af_rh; - - /* GPIO port bit register. */ -#define gpio_br_n(off) (1 << (off)) - __IO uint32_t br_r; - - /* Analog switch control register. */ -#define gpio_asc_n(off) (1 << (off)) - __IO uint32_t asc_r; -} PACKED gpio_port_config_t; - -static_assert( - offsetof(gpio_port_config_t, asc_r) == 0x2C, "Offset check failed"); - -#endif |