Improve code style
This commit is contained in:
parent
1d97e7e11e
commit
f83c4e7286
6 changed files with 13 additions and 13 deletions
|
@ -329,7 +329,7 @@ value_select(int type)
|
|||
{
|
||||
if(type == BUTTON_SENSOR_VALUE_STATE) {
|
||||
return ti_lib_gpio_pin_read(BOARD_KEY_SELECT) == 0 ?
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
} else if(type == BUTTON_SENSOR_VALUE_DURATION) {
|
||||
return (int)sel_timer.duration;
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ value_left(int type)
|
|||
{
|
||||
if(type == BUTTON_SENSOR_VALUE_STATE) {
|
||||
return ti_lib_gpio_pin_read(BOARD_KEY_LEFT) == 0 ?
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
} else if(type == BUTTON_SENSOR_VALUE_DURATION) {
|
||||
return (int)left_timer.duration;
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ value_right(int type)
|
|||
{
|
||||
if(type == BUTTON_SENSOR_VALUE_STATE) {
|
||||
return ti_lib_gpio_pin_read(BOARD_KEY_RIGHT) == 0 ?
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
} else if(type == BUTTON_SENSOR_VALUE_DURATION) {
|
||||
return (int)right_timer.duration;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ value_up(int type)
|
|||
{
|
||||
if(type == BUTTON_SENSOR_VALUE_STATE) {
|
||||
return ti_lib_gpio_pin_read(BOARD_KEY_UP) == 0 ?
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
} else if(type == BUTTON_SENSOR_VALUE_DURATION) {
|
||||
return (int)up_timer.duration;
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ value_down(int type)
|
|||
{
|
||||
if(type == BUTTON_SENSOR_VALUE_STATE) {
|
||||
return ti_lib_gpio_pin_read(BOARD_KEY_DOWN) == 0 ?
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
BUTTON_SENSOR_VALUE_PRESSED : BUTTON_SENSOR_VALUE_RELEASED;
|
||||
} else if(type == BUTTON_SENSOR_VALUE_DURATION) {
|
||||
return (int)down_timer.duration;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue