Home
last modified time | relevance | path

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

/hal_espressif-3.6.0/components/freemodbus/modbus/functions/
Dmbfuncdisc.c68 USHORT usDiscreteCnt; in eMBFuncReadDiscreteInputs() local
81 usDiscreteCnt = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_DISCCNT_OFF] << 8 ); in eMBFuncReadDiscreteInputs()
82 usDiscreteCnt |= ( USHORT )( pucFrame[MB_PDU_FUNC_READ_DISCCNT_OFF + 1] ); in eMBFuncReadDiscreteInputs()
87 if( ( usDiscreteCnt >= 1 ) && in eMBFuncReadDiscreteInputs()
88 ( usDiscreteCnt < MB_PDU_FUNC_READ_DISCCNT_MAX ) ) in eMBFuncReadDiscreteInputs()
100 if( ( usDiscreteCnt & 0x0007 ) != 0 ) in eMBFuncReadDiscreteInputs()
102 ucNBytes = ( UCHAR ) ( usDiscreteCnt / 8 + 1 ); in eMBFuncReadDiscreteInputs()
106 ucNBytes = ( UCHAR ) ( usDiscreteCnt / 8 ); in eMBFuncReadDiscreteInputs()
112 eMBRegDiscreteCB( pucFrameCur, usRegAddress, usDiscreteCnt ); in eMBFuncReadDiscreteInputs()
Dmbfuncdisc_m.c100 USHORT usDiscreteCnt; in eMBMasterFuncReadDiscreteInputs() local
119 usDiscreteCnt = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF] << 8 ); in eMBMasterFuncReadDiscreteInputs()
120 usDiscreteCnt |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF + 1] ); in eMBMasterFuncReadDiscreteInputs()
124 if( ( usDiscreteCnt & 0x0007 ) != 0 ) in eMBMasterFuncReadDiscreteInputs()
126 ucNBytes = ( UCHAR )( usDiscreteCnt / 8 + 1 ); in eMBMasterFuncReadDiscreteInputs()
130 ucNBytes = ( UCHAR )( usDiscreteCnt / 8 ); in eMBMasterFuncReadDiscreteInputs()
136 if ((usDiscreteCnt >= 1) && ucNBytes == pucFrame[MB_PDU_FUNC_READ_DISCCNT_OFF]) in eMBMasterFuncReadDiscreteInputs()
139 …us = eMBMasterRegDiscreteCB( &pucFrame[MB_PDU_FUNC_READ_VALUES_OFF], usRegAddress, usDiscreteCnt ); in eMBMasterFuncReadDiscreteInputs()