aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/gpio.c
diff options
context:
space:
mode:
authorPerry Hung <iperry@gmail.com>2011-03-21 02:32:39 -0400
committerPerry Hung <iperry@gmail.com>2011-03-21 02:32:39 -0400
commit1591fc9e3f851327c16bbcb88e6abee1706f9cfc (patch)
tree7b29a49be01d13772a2975cacf2a2699bc307cad /libmaple/gpio.c
parentef0936df9b58a0589e68a460a7c963d05f9a1759 (diff)
downloadlibrambutan-1591fc9e3f851327c16bbcb88e6abee1706f9cfc.tar.gz
librambutan-1591fc9e3f851327c16bbcb88e6abee1706f9cfc.zip
modify gpio interface to expose gpio dev structs
Diffstat (limited to 'libmaple/gpio.c')
-rw-r--r--libmaple/gpio.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/libmaple/gpio.c b/libmaple/gpio.c
index b08be12..18b856b 100644
--- a/libmaple/gpio.c
+++ b/libmaple/gpio.c
@@ -33,55 +33,48 @@
* GPIO devices
*/
-static gpio_dev gpioa = {
+gpio_dev gpioa = {
.regs = GPIOA_BASE,
.clk_id = RCC_GPIOA
};
-/** GPIO port A device. */
-gpio_dev *GPIOA = &gpioa;
+gpio_dev* const GPIOA = &gpioa;
-static gpio_dev gpiob = {
+gpio_dev gpiob = {
.regs = GPIOB_BASE,
.clk_id = RCC_GPIOB
};
-/** GPIO port B device. */
-gpio_dev *GPIOB = &gpiob;
+gpio_dev* const GPIOB = &gpiob;
-static gpio_dev gpioc = {
+gpio_dev gpioc = {
.regs = GPIOC_BASE,
.clk_id = RCC_GPIOC
};
-/** GPIO port C device. */
-gpio_dev *GPIOC = &gpioc;
+gpio_dev* const GPIOC = &gpioc;
-static gpio_dev gpiod = {
+gpio_dev gpiod = {
.regs = GPIOD_BASE,
.clk_id = RCC_GPIOD
};
-/** GPIO port D device. */
-gpio_dev *GPIOD = &gpiod;
+gpio_dev* const GPIOD = &gpiod;
-#ifdef STM32_HIGH_
-static gpio_dev gpioe = {
+#ifdef STM32_HIGH_DENSITY
+gpio_dev gpioe = {
.regs = GPIOE_BASE,
.clk_id = RCC_GPIOE
};
-/** GPIO port E device. */
-gpio_dev *GPIOE = &gpioe;
+gpio_dev* const GPIOE = &gpioe;
-static gpio_dev gpiof = {
+gpio_dev gpiof = {
.regs = GPIOF_BASE,
.clk_id = RCC_GPIOF
};
-/** GPIO port F device. */
-gpio_dev *GPIOF = &gpiof;
+gpio_dev* const GPIOF = &gpiof;
-static gpio_dev gpiog = {
+gpio_dev gpiog = {
.regs = GPIOG_BASE,
.clk_id = RCC_GPIOG
};
-/** GPIO port G device. */
-gpio_dev *GPIOG = &gpiog;
+gpio_dev* const GPIOG = &gpiog;
#endif
/*