Handles all User interface related functions such as Button, Print,LED events.
Data Structures | |
struct | print_event_msg_t |
Print event message stucture to organize the prints. More... | |
Macros | |
#define | COUNT_FOR_VALID_KEY_PRESS (20) |
This defines the count to detect a valid key press. More... | |
#define | LED_ON_DURAION_MICRO_SEC (100000) |
This defines the LED on duration. More... | |
Functions | |
static void | app_switch_off_rx_led_cb (void *parameter) |
Callback function switching off the RX_LED. More... | |
static void | app_switch_off_tx_led_cb (void *parameter) |
Callback function switching off the TX_LED. More... | |
Variables | |
void(* | print_event_msg_t::additional_print_func )(void) |
const char * | print_event_msg_t::item_desc |
print_event_msg_t | print_event_table [NUM_MAX_PRINT_EVENTS] |
This table holds the Messages to be printed on the UART Terminal at each event. More... | |
LED EVENTS | |
enum | led_event_t { LED_EVENT_TX_FRAME, LED_EVENT_RX_FRAME, LED_EVENT_POWER_ON, LED_EVENT_START_PEER_SEARCH, LED_EVENT_PEER_SEARCH_DONE, LED_EVENT_ALL_ON, LED_EVENT_ALL_OFF } |
#define COUNT_FOR_VALID_KEY_PRESS (20) |
This defines the count to detect a valid key press.
Referenced by app_debounce_button().
#define LED_ON_DURAION_MICRO_SEC (100000) |
This defines the LED on duration.
Referenced by app_led_event().
enum led_event_t |
enum print_event_t |
bool app_debounce_button | ( | void | ) |
Button debounce routine.
Helper function for debouncing the transmit button.
References button_pressed(), and COUNT_FOR_VALID_KEY_PRESS.
Referenced by per_mode_receptor_task(), range_test_tx_off_task(), range_test_tx_on_task(), and wait_for_event_task().
void app_led_event | ( | led_event_t | ev | ) |
Turns LEDs on / off to indicate specific events.
ev | the event to be indicated. |
References app_switch_off_rx_led_cb(), app_switch_off_tx_led_cb(), APP_TIMER_TO_RX_LED_OFF, APP_TIMER_TO_TX_LED_OFF, FUNC_PTR, LED_EVENT_ALL_OFF, LED_EVENT_ALL_ON, LED_EVENT_PEER_SEARCH_DONE, LED_EVENT_POWER_ON, LED_EVENT_RX_FRAME, LED_EVENT_START_PEER_SEARCH, LED_EVENT_TX_FRAME, LED_Off, LED_On, LED_ON_DURAION_MICRO_SEC, RX_LED, STATUS_LED, SW_TIMEOUT_RELATIVE, sw_timer_start(), and TX_LED.
Referenced by led_blinker_timer_handler_cb(), marker_rsp_timer_handler_cb(), marker_tx_timer_handler_cb(), peer_rsp_rcvd_tx_cb(), peer_search_initiator_init(), peer_search_receptor_init(), per_mode_initiator_init(), per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), per_mode_receptor_rx_cb(), range_test_rx_cb(), range_test_tx_timer_handler_cb(), send_range_test_rsp(), wait_for_conf_rx_cb(), and wait_for_event_init().
void app_print_statistics | ( | void | ) |
Print the statistics for Range Measurement on the UART Terminal.
References num_of_frames_rec, and num_of_frames_send.
|
static |
Callback function switching off the RX_LED.
parameter | Pointer to callback parameter (not used in this application, but could be if desired). |
References LED_Off, and RX_LED.
Referenced by app_led_event().
|
static |
Callback function switching off the TX_LED.
parameter | Pointer to callback parameter (not used in this application, but could be if desired). |
References LED_Off, and TX_LED.
Referenced by app_led_event().
bool button_pressed | ( | void | ) |
Determine if button is pressed.
References port_pin_get_input_level(), and SW0_PIN.
Referenced by app_debounce_button(), and configuration_mode_selection().
void print_event | ( | print_event_t | ev | ) |
Print various messages from the table as per the event notified.
ev | the event to be printed on the Terminal. |
References print_event_msg_t::additional_print_func.
Referenced by app_peer_conf_tmr_handler_cb(), peer_req_send_task(), peer_rsp_rcvd_init(), peer_rsp_rcvd_tx_cb(), peer_rsp_send_init(), peer_rsp_send_tx_done_cb(), peer_search_initiator_init(), range_test_tx_off_task(), range_test_tx_on_exit(), range_test_tx_on_init(), range_test_tx_on_task(), wait_for_conf_rx_cb(), wait_for_event_rx_cb(), and wait_for_event_task().
void(* print_event_msg_t::additional_print_func)(void) |
Referenced by print_event().
const char* print_event_msg_t::item_desc |
print_event_msg_t print_event_table[NUM_MAX_PRINT_EVENTS] |
This table holds the Messages to be printed on the UART Terminal at each event.