Originally from Donal's blog article. http://mbed.org/users/donalm/code/BLE_Health_Thermometer_Blog/ Changed low freq. clock source from XTAL to IRC.
Dependents: BLE_Health_Thermometer_IRC BLE_RCBController_micono_test BLE_konashi_PIO_test BLE_ADT7410_TMP102_Sample ... more
Fork of BLE_API_Native_blog by
Revision 15:a854d49b3d25, committed 2014-02-20
- Comitter:
- ktownsend
- Date:
- Thu Feb 20 17:23:17 2014 +0000
- Parent:
- 14:f3991f810e1b
- Child:
- 16:3e0a3bd292a4
- Commit message:
- Prototype functions for GattServerEvents
Changed in this revision
--- a/hw/Gap.h Thu Feb 20 16:31:09 2014 +0000 +++ b/hw/Gap.h Thu Feb 20 17:23:17 2014 +0000 @@ -51,7 +51,7 @@ /* Event callback handlers */ void setEventHandler(GapEvents *pEventHandler) {m_pEventHandler = pEventHandler;} - void handleEvent(GapEvents::gapEvent_e type) { // void handleEvent(GapEvents::gapEvent_e type, event_data* data) { + void handleEvent(GapEvents::gapEvent_e type) { if (NULL == m_pEventHandler) return; switch(type) {
--- a/hw/GattServer.h Thu Feb 20 16:31:09 2014 +0000 +++ b/hw/GattServer.h Thu Feb 20 17:23:17 2014 +0000 @@ -47,24 +47,24 @@ /* Event callback handlers */ void setEventHandler(GattServerEvents *pEventHandler) {m_pEventHandler = pEventHandler;} - void handleEvent(GattServerEvents::gattEvent_e type) { // void handleEvent(GattServerEvents::gattEvent_e type, event_data* data) { + void handleEvent(GattServerEvents::gattEvent_e type, uint16_t charHandle) { if (NULL == m_pEventHandler) return; switch(type) { case GattServerEvents::GATT_EVENT_DATA_SENT: - m_pEventHandler->onDataSent(); + m_pEventHandler->onDataSent(charHandle); break; case GattServerEvents::GATT_EVENT_DATA_WRITTEN: - m_pEventHandler->onDataWritten(); + m_pEventHandler->onDataWritten(charHandle); break; case GattServerEvents::GATT_EVENT_UPDATES_ENABLED: - m_pEventHandler->onUpdatesEnabled(); + m_pEventHandler->onUpdatesEnabled(charHandle); break; case GattServerEvents::GATT_EVENT_UPDATES_DISABLED: - m_pEventHandler->onUpdatesDisabled(); + m_pEventHandler->onUpdatesDisabled(charHandle); break; case GattServerEvents::GATT_EVENT_CONFIRMATION_RECEIVED: - m_pEventHandler->onConfirmationReceived(); + m_pEventHandler->onConfirmationReceived(charHandle); break; } }
--- a/hw/GattServerEvents.h Thu Feb 20 16:31:09 2014 +0000 +++ b/hw/GattServerEvents.h Thu Feb 20 17:23:17 2014 +0000 @@ -51,7 +51,7 @@ A message was successfully transmitted */ /******************************************************************/ - virtual void onDataSent(void) {} + virtual void onDataSent(uint16_t charHandle) {} /******************************************************************/ /*! @@ -61,7 +61,7 @@ device). */ /******************************************************************/ - virtual void onDataWritten(void) {} + virtual void onDataWritten(uint16_t charHandle) {} /******************************************************************/ /*! @@ -69,7 +69,7 @@ A Notify or Indicate flag was enabled in the CCCD */ /******************************************************************/ - virtual void onUpdatesEnabled(void) {} + virtual void onUpdatesEnabled(uint16_t charHandle) {} /******************************************************************/ /*! @@ -77,7 +77,7 @@ A Notify or Indicate flag was disabled in the CCCD */ /******************************************************************/ - virtual void onUpdatesDisabled(void) {} + virtual void onUpdatesDisabled(uint16_t charHandle) {} /******************************************************************/ /*! @@ -85,7 +85,7 @@ A confirmation response was received from an Indicate message */ /******************************************************************/ - virtual void onConfirmationReceived(void) {} + virtual void onConfirmationReceived(uint16_t charHandle) {} }; #endif