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

@ -352,11 +352,9 @@ static void RFCOMM_ProcessUIH(const RFCOMM_Address_t* const FrameAddress, const
BT_RFCOMM_DEBUG(1, "<< UIH Received");
BT_RFCOMM_DEBUG(2, "-- DLCI 0x%02X", FrameAddress->DLCI);
BT_RFCOMM_DEBUG(2, "-- Length 0x%02X", FrameLength);
puts("RFCOMM Data: ");
for (uint8_t i = 0; i < FrameLength; i++)
printf("0x%02X (%c) ", FrameData[i], FrameData[i]);
RFCOMM_Channel_t* RFCOMMChannel = RFCOMM_GetChannelData(FrameAddress->DLCI);
printf("\r\n");
if (RFCOMMChannel != NULL)
RFCOMM_DataReceived(RFCOMMChannel, FrameLength, FrameData);
}