Home
last modified time | relevance | path

Searched refs:usCoilCnt (Results 1 – 2 of 2) sorted by relevance

/hal_espressif-3.5.0/components/freemodbus/modbus/functions/
Dmbfunccoils.c206 USHORT usCoilCnt; in eMBFuncWriteMultipleCoils() local
219 usCoilCnt = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF] << 8 ); in eMBFuncWriteMultipleCoils()
220 usCoilCnt |= ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF + 1] ); in eMBFuncWriteMultipleCoils()
225 if( ( usCoilCnt & 0x0007 ) != 0 ) in eMBFuncWriteMultipleCoils()
227 ucByteCountVerify = ( UCHAR )( usCoilCnt / 8 + 1 ); in eMBFuncWriteMultipleCoils()
231 ucByteCountVerify = ( UCHAR )( usCoilCnt / 8 ); in eMBFuncWriteMultipleCoils()
234 if( ( usCoilCnt >= 1 ) && in eMBFuncWriteMultipleCoils()
235 ( usCoilCnt <= MB_PDU_FUNC_WRITE_MUL_COILCNT_MAX ) && in eMBFuncWriteMultipleCoils()
240 usRegAddress, usCoilCnt, MB_REG_WRITE ); in eMBFuncWriteMultipleCoils()
Dmbfunccoils_m.c333 USHORT usCoilCnt; in eMBMasterFuncWriteMultipleCoils() local
349 usCoilCnt = ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF] << 8 ); in eMBMasterFuncWriteMultipleCoils()
350 usCoilCnt |= ( USHORT )( pucFrame[MB_PDU_FUNC_WRITE_MUL_COILCNT_OFF + 1] ); in eMBMasterFuncWriteMultipleCoils()
355 if( ( usCoilCnt & 0x0007 ) != 0 ) in eMBMasterFuncWriteMultipleCoils()
357 ucByteCountVerify = ( UCHAR )( usCoilCnt / 8 + 1 ); in eMBMasterFuncWriteMultipleCoils()
361 ucByteCountVerify = ( UCHAR )( usCoilCnt / 8 ); in eMBMasterFuncWriteMultipleCoils()
364 if( ( usCoilCnt >= 1 ) && ( ucByteCountVerify == ucByteCount ) ) in eMBMasterFuncWriteMultipleCoils()
368 usRegAddress, usCoilCnt, MB_REG_WRITE ); in eMBMasterFuncWriteMultipleCoils()