@@ -41,6 +41,9 @@ StatePayload statedata;
4141/* *************************************************************************************************************************/
4242void bt_setup (uint8_t BLEProfile)
4343{
44+ // TODO review what can be extracted for single boards
45+
46+ // TODO review what is needed for split boards and provide in separate module
4447ble_gap_conn_params_t _ppcp;
4548 _ppcp = ((ble_gap_conn_params_t ) {
4649 .min_conn_interval = 6 ,
@@ -88,7 +91,7 @@ sd_ble_gap_ppcp_set(&_ppcp);
8891 bledis.setModel (DEVICE_MODEL); // Defined in keyboard_config.h
8992 bledis.begin ();
9093
91-
94+ // TODO Split Battery Reporting Service into separate module.
9295 // Configure and Start Battery Service
9396 blebas.begin ();
9497 blebas.write (100 ); // put the battery level at 100% - until it is updated by the battery monitoring loop.
@@ -98,6 +101,7 @@ sd_ble_gap_ppcp_set(&_ppcp);
98101 statedata.layer =0 ;
99102 statedata.timesync =0 ;
100103
104+ // TODO Get Peripheral into separate module
101105#if BLE_PERIPHERAL == 1 // PERIPHERAL IS THE SLAVE BOARD
102106
103107 Linkdata.keycode [0 ] =0 ; // initialize the slave to master link data...
@@ -152,7 +156,7 @@ sd_ble_gap_ppcp_set(&_ppcp);
152156 * up to 11.25 ms. Therefore BLEHidAdafruit::begin() will try to set the min and max
153157 * connection interval to 11.25 ms and 15 ms respectively for best performance.
154158 */
155-
159+ // TODO setup LED feedback for both USB and BLE
156160#if BLE_HID == 1
157161 blehid.begin ();
158162 // Set callback for set LED from central
@@ -164,6 +168,7 @@ sd_ble_gap_ppcp_set(&_ppcp);
164168 * min = 9*1.25=11.25 ms, max = 12*1.25= 15 ms
165169 */
166170
171+ // TODO split central role into separate module.
167172 #if BLE_CENTRAL == 1 // CENTRAL IS THE MASTER BOARD
168173
169174 KBLinkClientService.begin ();
@@ -197,6 +202,8 @@ ble_gap_addr_t bt_getMACAddr(void)
197202/* *************************************************************************************************************************/
198203//
199204/* *************************************************************************************************************************/
205+
206+ // TODO setup advertising setup group of tasks
200207void bt_startAdv (void )
201208{
202209 // Advertising packet
0 commit comments