Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
hw/bleradio.h
- Committer:
- ktownsend
- Date:
- 2013-11-29
- Revision:
- 0:ace2e8d3ce79
- Child:
- 1:fd3ec64b2345
File content as of revision 0:ace2e8d3ce79:
#ifndef __BLE_RADIO_H__
#define __BLE_RADIO_H__
#include "blecommon.h"
#include "bleservice.h"
class BLERadio
{
public:
typedef enum radio_event_e
{
RADIO_EVENT_CONNECT = 0x01,
RADIO_EVENT_DISCONNECT = 0x02,
RADIO_EVENT_WRITE = 0x03,
RADIO_EVENT_RADIOERROR = 0x80
} radioEvent_t;
uint8_t serviceCount;
/* ToDo: Force constructor with event handler callback */
/* These functions must be defined in the sub-class */
virtual ble_error_t attach(void (*fptr)(void));
virtual ble_error_t addService(BLEService &) = 0;
virtual ble_error_t updateValue(uint8_t, uint8_t, uint8_t[], uint16_t) = 0;
virtual ble_error_t start(void) = 0;
virtual ble_error_t stop(void) = 0;
virtual ble_error_t reset(void) = 0;
};
#endif
