diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_central/cc26xx/app/mem_board_central.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_central/cc26xx/app/mem_board_central.h index 29853fcd9..c67838ba0 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_central/cc26xx/app/mem_board_central.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_central/cc26xx/app/mem_board_central.h @@ -18,6 +18,7 @@ static void mem_central_event(); static void mem_recv_ins(); +static void mem_display_found_device(); static void MemBoard_init(void){ mem_UART_init(); @@ -86,20 +87,27 @@ static void mem_central_event() { mem_send_recv_uart(); } - if(flag_mask(EVT_MEM_SCAN_DEVICE)){ + if(flag_mask(EVT_MEM_SCAN_DEVICE)){ flag_disable(EVT_MEM_SCAN_DEVICE); SimpleBLECentral_discoverDevices(); - } + } + + if(flag_mask(EVT_MEM_DECODE_INS)){ + flag_disable(EVT_MEM_DECODE_INS); + mem_recv_ins(); + } + + if(flag_mask(EVT_DISPLAY_FOUND_DEVICE)){ + flag_mask(EVT_DISPLAY_FOUND_DEVICE); + mem_display_found_device(); + } - if(flag_mask(EVT_MEM_DECODE_INS)){ - flag_disable(EVT_MEM_DECODE_INS); - mem_recv_ins(); - } } typedef enum{ INS_IDLE, INS_SCAN, + INS_DISPLAY_FOUND_DEVICE, INS_CONNECT } Control_Ins; @@ -118,10 +126,41 @@ static void mem_recv_ins(){ break; } + case INS_DISPLAY_FOUND_DEVICE:{ + flag_notify(EVT_DISPLAY_FOUND_DEVICE); + break; + } + default:{ break; } } } +static void mem_display_found_device() { + + if(scanRes <= 0){ + return; + } + + uint8_t found_device_id = 0; + char device_number[2] = {'0', '\0'}; + + mem_UART_clear_screen(); + for( found_device_id = 0 ; found_device_id < scanRes ; found_device_id++ ){ + device_number[0] = (found_device_id + 1) + '0'; + mem_UART_display("Devices "); + mem_UART_display(device_number); + mem_UART_newline(); + + mem_UART_display(Util_convertBdAddr2Str(devList[found_device_id].addr)); + mem_UART_newline(); + + mem_UART_display(devList[found_device_id].localName); + mem_UART_newline(); + mem_UART_newline(); + } +} + + #endif diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h index 56756de1a..617294946 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage_version.h @@ -5,12 +5,12 @@ #define VERSION_DATE_YEAR 20 #define VERSION_DATE_MONTH 5 #define VERSION_DATE_DAY 18 -#define VERSION_DATE_HOUR 15 -#define VERSION_DATE_MINUTE 24 +#define VERSION_DATE_HOUR 18 +#define VERSION_DATE_MINUTE 49 // this is NOT the version hash !! // it's the last version hash -#define VERSION_HASH da26da713d4ad3b8d0b8989662d502a9f4c899b2 +#define VERSION_HASH 9b2286b45225eb69f9151f28f26a662753d3c30e #define VERSION_GIT_BRANCH MemBoard_simple_central #endif