working on nrf52

This commit is contained in:
hathach
2018-03-13 16:30:53 +07:00
parent 2435abb0a8
commit ffca1f5e64
20 changed files with 186 additions and 100 deletions
+4 -2
View File
@@ -116,9 +116,11 @@ void board_init(void)
//--------------------------------------------------------------------+
// LEDS
//--------------------------------------------------------------------+
void board_leds(uint32_t on_mask, uint32_t off_mask)
void board_led_control(uint32_t id, bool state)
{
pca9532_setLeds( on_mask << 8, off_mask << 8);
uint16_t on_mask = state ? (1 << id) : 0;
uint16_t off_mask = state ? 0 : (1 << id);
pca9532_setLeds( on_mask << 8, off_mask << 8 );
}
//--------------------------------------------------------------------+
+2
View File
@@ -53,6 +53,8 @@
#include "oem_base_board/pca9532.h" // LEDs
#define BOARD_LED_NUM 1
//#define CFG_PRINTF_TARGET PRINTF_TARGET_SWO
#define CFG_PRINTF_TARGET PRINTF_TARGET_UART