AnsweredAssumed Answered

is it an error of "if" condition "rofileGetAddressFunc"

Question asked by Toru Nitadori on Jun 7, 2018
Latest reply on Jun 13, 2018 by Andrea Palmieri

I'm sorry terrible English.

 

I think there is miss coding In the sample code of BLE1, in hrm_profile_application.c line 104.

 

after the "if" condition, profileGetAddressFunc is changed parameter, not profileApplicationProcessFunc

It seems strange.

 

/**
* @brief Initialize the Application Context for using the HRM profile methods
* @param None
* @retval None
*/
void HR_Appl_Context_Init(void)
{
if (profileApplContext.profileApplicationProcessFunc == NULL)           //////////////       here
{
profileApplContext.profileGetAddressFunc = HRProfileGetAddress;
}

if (profileApplContext.profileApplNotifyFunc == NULL)
{
profileApplContext.profileApplNotifyFunc = Profile_Appl_Evt_Notify;
}

if (profileApplContext.initProfileFunc == NULL)
{
profileApplContext.initProfileFunc = Init_Profile;
}

if (profileApplContext.advertizeFunc == NULL)
{
profileApplContext.advertizeFunc = Advertize;
}

if (profileApplContext.profileStateMachineFunc == NULL)
{
profileApplContext.profileStateMachineFunc = HRProfile_StateMachine;
}

if (profileApplContext.profileApplicationProcessFunc == NULL)
{
profileApplContext.profileApplicationProcessFunc = HR_Application_Process;
}

Init_heartRateMeas();
}

Outcomes