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 );
}
//--------------------------------------------------------------------+