/*********************************************************************
* @fn simpleProfileChangeCB
*
* @brief Callback from SimpleBLEProfile indicating a value change
*
* @param paramID - parameter ID of the value that was changed.
*
* @return none
*/
static void simpleProfileChangeCB( uint8 paramID )
{
uint8 newValue;
uint8 newChar6Value[SIMPLEPROFILE_CHAR6_LEN];
uint8 returnBytes;
switch( paramID )
{
case SIMPLEPROFILE_CHAR1:
SimpleProfile_GetParameter( SIMPLEPROFILE_CHAR1, &newValue, &returnBytes );
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
HalLcdWriteStringValue( "Char 1:", (uint16)(newValue), 10, HAL_LCD_LINE_3 );
#endif // (defined HAL_LCD) && (HAL_LCD == TRUE)
break;
case SIMPLEPROFILE_CHAR3:
SimpleProfile_GetParameter( SIMPLEPROFILE_CHAR3, &newValue, &returnBytes );
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
HalLcdWriteStringValue( "Char 3:", (uint16)(newValue), 10, HAL_LCD_LINE_3 );
#endif // (defined HAL_LCD) && (HAL_LCD == TRUE
break;
case SIMPLEPROFILE_CHAR6:
SimpleProfile_GetParameter( SIMPLEPROFILE_CHAR6, newChar6Value, &returnBytes );
if(returnBytes > 0)
{
if(simpleBLE_CheckIfUse_Uart2Uart())
{
NPI_WriteTransport(newChar6Value,returnBytes);
}
}
break;
default:
// should not reach here!
break;
}
}
CC2541作为从机每次只能接20字节,用手机lightblue每次发20以上的字节,也是进入“static void simpleProfileChangeCB( uint8 paramID )”一次,只接收一次,如何实现调用多次“static void simpleProfileChangeCB( uint8 paramID )”函数?因为我用苹果手机发送超过20个字节应该会分成多包发送,理应进入“static void simpleProfileChangeCB( uint8 paramID )”多次,这样才能实现多字节接收,都是现在只能进入一次?