diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-06 14:50:43 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-07-06 14:50:43 +0000 |
commit | e82fa8182eef943a9a85d1f5d39a6917eda6d13a (patch) | |
tree | c5922722d43c8821b6acef355dbebe138de754c8 /nuttx/configs/lpc4330-xplorer/src | |
parent | 731439099b56dea8ffdcbecb5657ce327bd7252a (diff) | |
download | px4-nuttx-e82fa8182eef943a9a85d1f5d39a6917eda6d13a.tar.gz px4-nuttx-e82fa8182eef943a9a85d1f5d39a6917eda6d13a.tar.bz2 px4-nuttx-e82fa8182eef943a9a85d1f5d39a6917eda6d13a.zip |
Add LPC43 GPIO configurtion logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4912 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/lpc4330-xplorer/src')
-rw-r--r-- | nuttx/configs/lpc4330-xplorer/src/up_autoleds.c | 24 | ||||
-rw-r--r-- | nuttx/configs/lpc4330-xplorer/src/up_buttons.c | 2 | ||||
-rw-r--r-- | nuttx/configs/lpc4330-xplorer/src/up_userleds.c | 18 |
3 files changed, 22 insertions, 22 deletions
diff --git a/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c b/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c index 89b2a1020..b19e33459 100644 --- a/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c +++ b/nuttx/configs/lpc4330-xplorer/src/up_autoleds.c @@ -124,8 +124,8 @@ #ifdef LED_VERBOSE static void led_dumppins(FAR const char *msg) { - lpc43_dumppinconfig(PINCONFIG_LED1, msg); - lpc43_dumpgpio(GPIO_LED2, msg); + lpc43_pin_dump(PINCONFIG_LED1, msg); + lpc43_gpio_dump(GPIO_LED2, msg); } #else # define led_dumppins(m) @@ -147,11 +147,11 @@ void up_ledinit(void) /* Configure LED pins as GPIOs, then configure GPIOs as outputs */ - lpc43_pinconfig(PINCONFIG_LED1); - lpc43_gpioconfig(GPIO_LED1); + lpc43_pin_config(PINCONFIG_LED1); + lpc43_gpio_config(GPIO_LED1); - lpc43_pinconfig(PINCONFIG_LED2); - lpc43_gpioconfig(GPIO_LED2); + lpc43_pin_config(PINCONFIG_LED2); + lpc43_gpio_config(GPIO_LED2); led_dumppins("up_ledinit() Exit"); } @@ -166,17 +166,17 @@ void up_ledon(int led) { default: case 0: - lpc43_gpiowrite(GPIO_LED1, true); /* LED1 OFF */ - lpc43_gpiowrite(GPIO_LED2, true); /* LED2 OFF */ + lpc43_gpio_write(GPIO_LED1, true); /* LED1 OFF */ + lpc43_gpio_write(GPIO_LED2, true); /* LED2 OFF */ break; case 1: - lpc43_gpiowrite(GPIO_LED1, false); /* LED1 ON */ - lpc43_gpiowrite(GPIO_LED2, true); /* LED2 OFF */ + lpc43_gpio_write(GPIO_LED1, false); /* LED1 ON */ + lpc43_gpio_write(GPIO_LED2, true); /* LED2 OFF */ break; case 2: - lpc43_gpiowrite(GPIO_LED2, false); /* LED2 ON */ + lpc43_gpio_write(GPIO_LED2, false); /* LED2 ON */ break; } } @@ -195,7 +195,7 @@ void up_ledoff(int led) break; case 2: - lpc43_gpiowrite(GPIO_LED2, true); /* LED2 OFF */ + lpc43_gpio_write(GPIO_LED2, true); /* LED2 OFF */ break; } } diff --git a/nuttx/configs/lpc4330-xplorer/src/up_buttons.c b/nuttx/configs/lpc4330-xplorer/src/up_buttons.c index cd3e1583f..841f52b23 100644 --- a/nuttx/configs/lpc4330-xplorer/src/up_buttons.c +++ b/nuttx/configs/lpc4330-xplorer/src/up_buttons.c @@ -142,7 +142,7 @@ uint8_t up_buttons(void) { /* A LOW value means that the key is pressed. */ - bool released = lpc43_gpioread(g_buttoncfg[i]); + bool released = lpc43_gpio_read(g_buttoncfg[i]); /* Accumulate the set of depressed (not released) keys */ diff --git a/nuttx/configs/lpc4330-xplorer/src/up_userleds.c b/nuttx/configs/lpc4330-xplorer/src/up_userleds.c index 0f7ccee50..e7b4b1189 100644 --- a/nuttx/configs/lpc4330-xplorer/src/up_userleds.c +++ b/nuttx/configs/lpc4330-xplorer/src/up_userleds.c @@ -102,8 +102,8 @@ #ifdef LED_VERBOSE static void led_dumppins(FAR const char *msg) { - lpc43_dumppinconfig(PINCONFIG_LED1, msg); - lpc43_dumpgpio(GPIO_LED2, msg); + lpc43_pin_dump(PINCONFIG_LED1, msg); + lpc43_gpio_dump(GPIO_LED2, msg); } #else # define led_dumppins(m) @@ -125,11 +125,11 @@ void lpc43_ledinit(void) /* Configure LED pins as GPIOs, then configure GPIOs as outputs */ - lpc43_pinconfig(PINCONFIG_LED1); - lpc43_gpioconfig(GPIO_LED1); + lpc43_pin_config(PINCONFIG_LED1); + lpc43_gpio_config(GPIO_LED1); - lpc43_pinconfig(PINCONFIG_LED2); - lpc43_gpioconfig(GPIO_LED2); + lpc43_pin_config(PINCONFIG_LED2); + lpc43_gpio_config(GPIO_LED2); led_dumppins("lpc43_ledinit() Exit"); } @@ -141,7 +141,7 @@ void lpc43_ledinit(void) void lpc43_setled(int led, bool ledon) { uint16_t gpiocfg = (led == BOARD_LED1 ? BOARD_LED1 : BOARD_LED2); - lpc43_gpiowrite(GPIO_LED1, !ledon); + lpc43_gpio_write(GPIO_LED1, !ledon); } /**************************************************************************** @@ -150,8 +150,8 @@ void lpc43_setled(int led, bool ledon) void lpc43_setleds(uint8_t ledset) { - lpc43_gpiowrite(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0); - lpc43_gpiowrite(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0); + lpc43_gpio_write(BOARD_LED1, (ledset & BOARD_LED1_BIT) == 0); + lpc43_gpio_write(BOARD_LED2, (ledset & BOARD_LED2_BIT) == 0); } #endif /* !CONFIG_ARCH_LEDS */ |