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.
Dependencies: mbed-rtos mbed mbed_fota_fan_control
Fork of mbed_fota_lamp_control by
ext_fota/BleMsgHandler.h
- Committer:
- dudnwjs
- Date:
- 2015-06-23
- Revision:
- 3:1e70387e1337
- Parent:
- 2:dba344c91bce
- Child:
- 4:60be78a172c2
File content as of revision 3:1e70387e1337:
#ifndef BLEMSGHANDLER_H
#define BLEMSGHANDLER_H
#include "mbed.h"
#include "MsgQueue.h"
#include "SerialManager.h"
namespace sevencore_fota{
typedef struct {
unsigned short bType;
unsigned short bDstid;
unsigned short bSrcid;
unsigned short bLength;
} ble_hdr;
class BleMsgHandler
{
public:
BleMsgHandler(Serial* _device);
BleMsgHandler(Serial* _device, Serial* _hostpc);
~BleMsgHandler(void);
void PrintTitle(void);
void BleMsgAlloc(unsigned short id,unsigned short dest_id,unsigned short src_id,unsigned short data_len,void *pdata,uint8_t *msg);
int BleSendMsg(uint8_t *msg, unsigned short size);
void BleReceiveMsg(void);
void BleMsgHandle(void);
private:
bool print_flag;
Serial* device;
Serial* hostpc;
SerialManager* SerialM;
MsgQueue* MsgQ;
unsigned char recv_msg[512];
};
}//namespace
#endif //BLEMSGHANDLER_H
