rename bit_* helper to tu_bit_*, BIT_* to TU_BIT_* for consistency
This commit is contained in:
@@ -103,7 +103,7 @@ void board_init(void)
|
||||
Chip_GPIO_SetPinDIROutput(LPC_GPIO, LED_PORT, LED_PIN);
|
||||
|
||||
//------------- BUTTON -------------//
|
||||
// for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) GPIO_SetDir(buttons[i].port, BIT_(buttons[i].pin), 0);
|
||||
// for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) GPIO_SetDir(buttons[i].port, TU_BIT(buttons[i].pin), 0);
|
||||
|
||||
|
||||
//------------- UART -------------//
|
||||
@@ -136,7 +136,7 @@ void board_led_control(bool state)
|
||||
#if 0
|
||||
static bool button_read(uint8_t id)
|
||||
{
|
||||
// return !BIT_TEST_( GPIO_ReadValue(buttons[id].gpio_port), buttons[id].gpio_pin ); // button is active low
|
||||
// return !TU_BIT_TEST( GPIO_ReadValue(buttons[id].gpio_port), buttons[id].gpio_pin ); // button is active low
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ uint32_t board_buttons(void)
|
||||
{
|
||||
uint32_t result = 0;
|
||||
|
||||
// for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) result |= (button_read(i) ? BIT_(i) : 0);
|
||||
// for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) result |= (button_read(i) ? TU_BIT(i) : 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user