| 
    Appiko
    
   | 
 
The main file for System level testing application which is used to test functioning of board. More...
Macros | |
| #define | TRIGGER 2 | 
| #define | FOCUS 3 | 
| #define | PRODUCT_ID_LEN 16 | 
Functions | |
| void | ble_stack_init (void) | 
| Function for initializing the BLE stack by enabling the SoftDevice and the BLE event interrupt.  More... | |
| void | conn_to_sense_pi (void) | 
| Function to generate table of scanned devices with MAC addresses.  More... | |
| void | extract_product_id (void) | 
| Function to extract Product ID from Scan response data.  More... | |
| uint32_t | if_pulse (uint32_t pin_trigger, uint32_t pin_focus) | 
| Function to detect pulses from trigger pin and focus pin.  More... | |
| void | scan_start () | 
| Function to start scanning.  More... | |
| void | check_pir (void) | 
| Function to check if PIR is present or not.  More... | |
| void | recv_data (uint8_t *buffer) | 
| IRQHandler for UART RX_DONE event.  More... | |
| int | main (void) | 
| MAIN.  | |
Variables | |
| volatile uint32_t | conn_terminate_flag = 0 | 
| uint8_t | scan_resp [BLE_GAP_SCAN_BUFFER_MAX] = {} | 
| uint8_t | scan_data_buffer [BLE_GAP_SCAN_BUFFER_MAX] | 
| ble_data_t | sys_lvl_app_scan_buffer | 
| #define PRODUCT_ID_LEN 16 | 
| void ble_stack_init | ( | void | ) | 
BLE Stack Initialization.
Definition at line 278 of file main.c.
References APP_ERROR_CHECK, app_error_fault_handler(), and BOARD_LFCLKSRC_STRUCT.
Referenced by scan_start().
| void check_pir | ( | void | ) | 
| void extract_product_id | ( | void | ) | 
Extract Product ID.
Definition at line 363 of file main.c.
References PRODUCT_ID_LEN, and scan_resp.
| uint32_t if_pulse | ( | uint32_t | pin_trigger, | 
| uint32_t | pin_focus | ||
| ) | 
Detect Pulse at Trigger pin and Focus pin.
| pin_trigger | Trigger pin's number | 
| pin_focus | Focus pin's number | 
| toggle_flag | If this flag is 1 then both trigger and focus pulse is detected. And if this flag is 0 then not. | 
Loop to check for pulse in 16 sec window
| void recv_data | ( | uint8_t * | buffer | ) | 
IRQ Handler for UART.
| buffer | buffer array to store information received over UART | 
Definition at line 453 of file main.c.
References check_pir(), and scan_start().
Referenced by main().
| void scan_start | ( | ) | 
Scan Start.
Definition at line 298 of file main.c.
References ble_stack_init().
Referenced by recv_data().
| volatile uint32_t conn_terminate_flag = 0 | 
| uint8_t scan_data_buffer[BLE_GAP_SCAN_BUFFER_MAX] | 
| uint8_t scan_resp[BLE_GAP_SCAN_BUFFER_MAX] = {} | 
Data buffer to store Scan Response from Sense Rev4
Definition at line 134 of file main.c.
Referenced by extract_product_id().
| ble_data_t sys_lvl_app_scan_buffer | 
Data structure required to store scan data
 1.8.15