mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-16 06:40:11 +00:00
ea4357 led
This commit is contained in:
parent
a9161ed0d7
commit
68a0e866c5
@ -141,11 +141,15 @@ void board_init(void)
|
|||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// LEDS
|
// LEDS
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
void board_led_control(uint32_t id, bool state)
|
void board_led_control(bool state)
|
||||||
{
|
{
|
||||||
uint16_t on_mask = state ? (1 << id) : 0;
|
if (state)
|
||||||
uint16_t off_mask = state ? 0 : (1 << id);
|
{
|
||||||
pca9532_setLeds( on_mask << 8, off_mask << 8 );
|
pca9532_setLeds( LED1, 0 );
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
pca9532_setLeds( 0, LED1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
@ -50,15 +50,8 @@
|
|||||||
#include "lpc43xx_uart.h"
|
#include "lpc43xx_uart.h"
|
||||||
#include "lpc43xx_i2c.h"
|
#include "lpc43xx_i2c.h"
|
||||||
|
|
||||||
|
// For LEDs
|
||||||
#include "oem_base_board/pca9532.h" // LEDs
|
#include "oem_base_board/pca9532.h"
|
||||||
|
|
||||||
#define BOARD_LED_NUM 1
|
|
||||||
#define BOARD_LED0 0
|
|
||||||
|
|
||||||
|
|
||||||
//#define CFG_PRINTF_TARGET PRINTF_TARGET_SWO
|
|
||||||
#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user