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 Sean_AdiSense1000_V21 by
Diff: inc/ble_interface/bl652.h
- Revision:
- 34:029fc3b83f78
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/ble_interface/bl652.h Mon Sep 24 11:39:35 2018 +0000 @@ -0,0 +1,52 @@ +#ifndef __BL652_H_ +#define __BL652_H_ + + +/******************************************************************************/ +/* Include Files */ +/******************************************************************************/ + +#include <stdint.h> + +/******************************************************************************/ +/* BLE parameters */ +/******************************************************************************/ + +//size of buffers used +#define BLE_PACKET_SIZE 20 + +//parameters for da14580 +#define RESET_LENGTH 10 //ms + +#define BLE_TX_PACKET_DELAY 100 //ms + +#define AT_COMMAND_DELIMITER '\r' + +#define AT_COMMAND_ERROR "ERROR" + + +/******************************************************************************/ +/* Function Prototypes */ +/******************************************************************************/ + +//boot BLE module +uint32_t Bl652_Boot( void ); + +//Write to BLE over UART +uint32_t Bl652_Write( char *txBuffer, uint32_t byteCount ); + +//Read from BLE over UART +uint32_t Bl652_Read( char *rxBuffer, uint32_t byteCount ); + +//setup for callback based read +uint32_t Bl652_SetupReadCb( void *rxBuffer, uint32_t maxSize, volatile bool *bMessageReadFlag ); + +//clear read callback +uint32_t Bl652_ClearCb( void ); + +//wait until BLE is awake +uint32_t Bl652_WaitUntilAvailable( void ); + +uint32_t Bl652_Printf(const char *format, ...); + +#endif
