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: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: BLE/src/ble_init.cpp
- Revision:
- 259:341f04be325e
- Parent:
- 249:68ed571e0002
- Parent:
- 258:150f5a76162d
--- a/BLE/src/ble_init.cpp Fri Oct 21 19:13:21 2016 +0000
+++ b/BLE/src/ble_init.cpp Mon Oct 24 21:08:15 2016 +0000
@@ -63,15 +63,15 @@
* @return none
*****************************************************************************/
-void SendCommand(uint8_t command) //@SAGAR: If this function not called from other files, make it as static fn
+static void SendCommand(uint8_t command)
{
uint8_t packet[4];
packet[0]= BLE_SOF_CMD;
packet[1]= command;
- packet[2]= DATA_LENGTH; //@SAGAR: DATA_LENGTH is always 0?
+ packet[2]= DATA_LENGTH;
packet[3]= BLE_EOT_CMD;
- WriteSpiData(packet,COMMAND_LENGTH);//@SAGAR: COMMAND_LENGTH is always 4?
+ WriteSpiData(packet,COMMAND_LENGTH);
}
@@ -109,25 +109,14 @@
*****************************************************************************/
uint8_t BLE_INIT :: SetDeviceName(void)
{
- uint8_t status; //@SAGAR: Add comments <<TODO>> & what we are dogin in future
+ uint8_t status;
+ /*TODO
+
+ function to set BLE device name
+ */
return status;
}
-
-/*****************************************************************************
- * Function: CheckConnectionStatus()
- * Description: check whether device is connected or not
- *
- * @param none
- * @return uint8_t status(connected or disconnected)
- *****************************************************************************/
-uint8_t CheckConnectionStatus(void)
-{
- //TODO not implemented
- uint8_t status =SUCCESS;
-
- return status;
-}
/*****************************************************************************
* Function: SetAdvertisingData()
* Description: set advertising data
@@ -167,12 +156,12 @@
*****************************************************************************/
uint8_t BLE_INIT :: SendBleData(uint8_t *tx_buf, uint8_t len)
{
- uint8_t packet[20];
+ uint8_t packet[24];
uint8_t status = SUCCESS;
uint8_t packetlength;
packetlength = len + 4;
- if(len<=MAX_PAYLOAD_BYTES)
+ if(len<=20)
{
packet[0]= BLE_SOF_CMD;
packet[1]= BLE_SEND_DATA_CMD;
