Add a new RFCOMM service callback for when new data has been received on a valid RFCOMM channel.

This commit is contained in:
Dean Camera 2010-07-08 08:05:14 +00:00
parent 70983caea5
commit c37fd0ef91
3 changed files with 18 additions and 5 deletions

View file

@ -154,3 +154,16 @@ void Bluetooth_PacketReceived(void* Data, uint16_t DataLen, Bluetooth_Channel_t*
break;
}
}
/** RFCOMM layer callback for when a packet is received on an open RFCOMM channel.
*
* \param[in] RFCOMMChannel RFCOMM channel that the data was directed to
* \param[in] DataLen Length of the received data, in bytes
* \param[in] Data Pointer to a buffer where the received data is stored
*/
void RFCOMM_DataReceived(RFCOMM_Channel_t* const RFCOMMChannel, uint16_t DataLen, const uint8_t* Data)
{
/* Write the received bytes to the serial port */
for (uint8_t i = 0; i < DataLen; i++)
putchar(Data[i]);
}