Compilation fix for newer mbed-os
Fork of X_NUCLEO_IDB0XA1 by
Diff: source/platform/btle.cpp
- Revision:
- 133:1bb8df697f7f
- Parent:
- 132:51056160fa4a
- Child:
- 134:d2f8d5898d04
diff -r 51056160fa4a -r 1bb8df697f7f source/platform/btle.cpp --- a/source/platform/btle.cpp Wed Oct 07 08:39:04 2015 +0200 +++ b/source/platform/btle.cpp Wed Oct 07 09:08:22 2015 +0200 @@ -72,10 +72,6 @@ #define IDB04A1 0 #define IDB05A1 1 -#ifdef YOTTA_CFG -static void btle_handler(void); -#endif - void HCI_Input(tHciDataPacket * hciReadPacket); //#define BDADDR_SIZE 6 @@ -213,12 +209,9 @@ */ /**************************************************************************/ #ifdef YOTTA_CFG -static void btle_handler(void) +void btle_handler(void) { HCI_Process(); - - // reschedule myself - minar::Scheduler::postCallback(btle_handler); } #endif @@ -365,12 +358,15 @@ } //PRINTF("EVT_LE_CONN_COMPLETE LL role=%d\n", cc->role); switch (cc->role) { - case 0: //master + case 0: //master role = Gap::CENTRAL; break; - case 1: + case 1: role = Gap::PERIPHERAL; break; + default: + role = Gap::CENTRAL; + break; } //PRINTF("EVT_LE_CONN_COMPLETE GAP role=%d\n", role); BlueNRGGap::getInstance().processConnectionEvent(cc->handle, role/*Gap::PERIPHERAL*/, peerAddrType, cc->peer_bdaddr, addr_type, bleAddr, (const BlueNRGGap::ConnectionParams_t *)&connectionParams);