void zclLevel_process( uint16 *events )
{
if ( *events & LEVEL_PROCESS_EVT )
{
//update the level
if(zclLevel_LevelRemainingTime)
{
hwLight_ApplyUpdate( &zclLevel_CurrentLevel,
&zclLevel_CurrentLevel_256,
&zclLevel_StepLevel_256,
&zclLevel_LevelRemainingTime,
LEVEL_MIN, LEVEL_MAX, FALSE );
。。。。。。。。。
}
进入 hwLight_ApplyUpdate函数
{
。。。。。
hwLight_Refresh( REFRESH_AUTO );
}
hwLight_Refresh()里有个
#ifdef ZCL_LEVEL_CTRL
hwLight_UpdateLevel( zclLevel_CurrentLevel );
#endif //ZCL_LEVEL_CTRL
却不能进去。这函数有内有执行呢?(从效果看,应该是执行的,哪里面是什么呢)
VV:
已经在另外一个帖子里面回复你了
1,这个指的是rate,API函数里面是有说明的
/********************************************************************* * @fn zclGeneral_SendLevelControlMoveRequest * * @brief Call to send out a Level Control Request. You can also use * the appropriate macro. * * @param srcEP – Sending application's endpoint * @param dstAddr – where you want the message to go * @param cmd – one of the following: * COMMAND_LEVEL_MOVE or * COMMAND_LEVEL_MOVE_WITH_ON_OFF * @param moveMode – LEVEL_MOVE_UP or * LEVEL_MOVE_DOWN * @param rate – number of steps to take per second * * @return ZStatus_t */ ZStatus_t zclGeneral_SendLevelControlMoveRequest( uint8 srcEP, afAddrType_t *dstAddr, uint8 cmd, uint8 moveMode, uint8 rate, uint8 disableDefaultRsp, uint8 seqNum ) { uint8 buf[2];
buf[0] = moveMode; buf[1] = rate;
return zcl_SendCommand( srcEP, dstAddr, ZCL_CLUSTER_ID_GEN_LEVEL_CONTROL, cmd, TRUE, ZCL_FRAME_CLIENT_SERVER_DIR, disableDefaultRsp, 0, seqNum, 2, buf ); }
2,计算处理PWM的输出,