diff options
| author | hathach <[email protected]> | 2018-12-03 20:32:24 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-12-03 20:32:24 +0700 |
| commit | 68a0e866c58d41d9a02e57c0168bf1fba0bb9971 (patch) | |
| tree | baaf045bd43332ba9210a7457fe0949c4f0de696 | |
| parent | a9161ed0d7d3151ee63f27118e59ab00b40fca21 (diff) | |
ea4357 led
| -rw-r--r-- | hw/bsp/ea4357/board_ea4357.c | 12 | ||||
| -rw-r--r-- | hw/bsp/ea4357/board_ea4357.h | 11 |
2 files changed, 10 insertions, 13 deletions
diff --git a/hw/bsp/ea4357/board_ea4357.c b/hw/bsp/ea4357/board_ea4357.c index ebe0d02e0..a7b4caa2a 100644 --- a/hw/bsp/ea4357/board_ea4357.c +++ b/hw/bsp/ea4357/board_ea4357.c @@ -141,11 +141,15 @@ void board_init(void) //--------------------------------------------------------------------+ // LEDS //--------------------------------------------------------------------+ -void board_led_control(uint32_t id, bool state) +void board_led_control(bool state) { - uint16_t on_mask = state ? (1 << id) : 0; - uint16_t off_mask = state ? 0 : (1 << id); - pca9532_setLeds( on_mask << 8, off_mask << 8 ); + if (state) + { + pca9532_setLeds( LED1, 0 ); + }else + { + pca9532_setLeds( 0, LED1); + } } //--------------------------------------------------------------------+ diff --git a/hw/bsp/ea4357/board_ea4357.h b/hw/bsp/ea4357/board_ea4357.h index 6fe8ca874..87282718d 100644 --- a/hw/bsp/ea4357/board_ea4357.h +++ b/hw/bsp/ea4357/board_ea4357.h @@ -50,15 +50,8 @@ #include "lpc43xx_uart.h" #include "lpc43xx_i2c.h" - -#include "oem_base_board/pca9532.h" // LEDs - -#define BOARD_LED_NUM 1 -#define BOARD_LED0 0 - - -//#define CFG_PRINTF_TARGET PRINTF_TARGET_SWO -#define CFG_PRINTF_TARGET PRINTF_TARGET_UART +// For LEDs +#include "oem_base_board/pca9532.h" #ifdef __cplusplus } |
