Lines Matching refs:ucMBFrame

103     UCHAR                 *ucMBFrame;  in eMBMasterReqWriteHoldingRegister()  local
110 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqWriteHoldingRegister()
112 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_WRITE_REGISTER; in eMBMasterReqWriteHoldingRegister()
113 ucMBFrame[MB_PDU_REQ_WRITE_ADDR_OFF] = usRegAddr >> 8; in eMBMasterReqWriteHoldingRegister()
114 ucMBFrame[MB_PDU_REQ_WRITE_ADDR_OFF + 1] = usRegAddr; in eMBMasterReqWriteHoldingRegister()
115 ucMBFrame[MB_PDU_REQ_WRITE_VALUE_OFF] = usRegData >> 8; in eMBMasterReqWriteHoldingRegister()
116 ucMBFrame[MB_PDU_REQ_WRITE_VALUE_OFF + 1] = usRegData ; in eMBMasterReqWriteHoldingRegister()
173 UCHAR *ucMBFrame; in eMBMasterReqWriteMultipleHoldingRegister() local
181 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqWriteMultipleHoldingRegister()
183 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_WRITE_MULTIPLE_REGISTERS; in eMBMasterReqWriteMultipleHoldingRegister()
184 ucMBFrame[MB_PDU_REQ_WRITE_MUL_ADDR_OFF] = usRegAddr >> 8; in eMBMasterReqWriteMultipleHoldingRegister()
185 ucMBFrame[MB_PDU_REQ_WRITE_MUL_ADDR_OFF + 1] = usRegAddr; in eMBMasterReqWriteMultipleHoldingRegister()
186 ucMBFrame[MB_PDU_REQ_WRITE_MUL_REGCNT_OFF] = usNRegs >> 8; in eMBMasterReqWriteMultipleHoldingRegister()
187 ucMBFrame[MB_PDU_REQ_WRITE_MUL_REGCNT_OFF + 1] = usNRegs ; in eMBMasterReqWriteMultipleHoldingRegister()
188 ucMBFrame[MB_PDU_REQ_WRITE_MUL_BYTECNT_OFF] = usNRegs * 2; in eMBMasterReqWriteMultipleHoldingRegister()
189 ucMBFrame += MB_PDU_REQ_WRITE_MUL_VALUES_OFF; in eMBMasterReqWriteMultipleHoldingRegister()
192 *ucMBFrame++ = pusDataBuffer[usRegIndex] >> 8; in eMBMasterReqWriteMultipleHoldingRegister()
193 *ucMBFrame++ = pusDataBuffer[usRegIndex++] ; in eMBMasterReqWriteMultipleHoldingRegister()
205 UCHAR *ucMBFrame; in eMBMasterFuncWriteMultipleHoldingRegister() local
216 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterFuncWriteMultipleHoldingRegister()
217 usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_WRITE_MUL_ADDR_OFF] << 8 ); in eMBMasterFuncWriteMultipleHoldingRegister()
218 usRegAddress |= ( USHORT )( ucMBFrame[MB_PDU_REQ_WRITE_MUL_ADDR_OFF + 1] ); in eMBMasterFuncWriteMultipleHoldingRegister()
221 usRegCount = ( USHORT )( ucMBFrame[MB_PDU_REQ_WRITE_MUL_REGCNT_OFF] << 8 ); in eMBMasterFuncWriteMultipleHoldingRegister()
222 usRegCount |= ( USHORT )( ucMBFrame[MB_PDU_REQ_WRITE_MUL_REGCNT_OFF + 1] ); in eMBMasterFuncWriteMultipleHoldingRegister()
224 ucRegByteCount = ucMBFrame[MB_PDU_REQ_WRITE_MUL_BYTECNT_OFF]; in eMBMasterFuncWriteMultipleHoldingRegister()
229 eRegStatus = eMBMasterRegHoldingCB( &ucMBFrame[MB_PDU_REQ_WRITE_MUL_VALUES_OFF], in eMBMasterFuncWriteMultipleHoldingRegister()
267 UCHAR *ucMBFrame; in eMBMasterReqReadHoldingRegister() local
274 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqReadHoldingRegister()
276 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_READ_HOLDING_REGISTER; in eMBMasterReqReadHoldingRegister()
277 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] = usRegAddr >> 8; in eMBMasterReqReadHoldingRegister()
278 ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] = usRegAddr; in eMBMasterReqReadHoldingRegister()
279 ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF] = usNRegs >> 8; in eMBMasterReqReadHoldingRegister()
280 ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF + 1] = usNRegs; in eMBMasterReqReadHoldingRegister()
291 UCHAR *ucMBFrame; in eMBMasterFuncReadHoldingRegister() local
305 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterFuncReadHoldingRegister()
306 usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] << 8 ); in eMBMasterFuncReadHoldingRegister()
307 usRegAddress |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] ); in eMBMasterFuncReadHoldingRegister()
310 usRegCount = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF] << 8 ); in eMBMasterFuncReadHoldingRegister()
311 usRegCount |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_REGCNT_OFF + 1] ); in eMBMasterFuncReadHoldingRegister()
361 UCHAR *ucMBFrame; in eMBMasterReqReadWriteMultipleHoldingRegister() local
369 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterReqReadWriteMultipleHoldingRegister()
371 ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_READWRITE_MULTIPLE_REGISTERS; in eMBMasterReqReadWriteMultipleHoldingRegister()
372 ucMBFrame[MB_PDU_REQ_READWRITE_READ_ADDR_OFF] = usReadRegAddr >> 8; in eMBMasterReqReadWriteMultipleHoldingRegister()
373 ucMBFrame[MB_PDU_REQ_READWRITE_READ_ADDR_OFF + 1] = usReadRegAddr; in eMBMasterReqReadWriteMultipleHoldingRegister()
374 ucMBFrame[MB_PDU_REQ_READWRITE_READ_REGCNT_OFF] = usNReadRegs >> 8; in eMBMasterReqReadWriteMultipleHoldingRegister()
375 ucMBFrame[MB_PDU_REQ_READWRITE_READ_REGCNT_OFF + 1] = usNReadRegs ; in eMBMasterReqReadWriteMultipleHoldingRegister()
376 ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_ADDR_OFF] = usWriteRegAddr >> 8; in eMBMasterReqReadWriteMultipleHoldingRegister()
377 ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_ADDR_OFF + 1] = usWriteRegAddr; in eMBMasterReqReadWriteMultipleHoldingRegister()
378 ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_REGCNT_OFF] = usNWriteRegs >> 8; in eMBMasterReqReadWriteMultipleHoldingRegister()
379 ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_REGCNT_OFF + 1] = usNWriteRegs ; in eMBMasterReqReadWriteMultipleHoldingRegister()
380 ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_BYTECNT_OFF] = usNWriteRegs * 2; in eMBMasterReqReadWriteMultipleHoldingRegister()
381 ucMBFrame += MB_PDU_REQ_READWRITE_WRITE_VALUES_OFF; in eMBMasterReqReadWriteMultipleHoldingRegister()
384 *ucMBFrame++ = pusDataBuffer[usRegIndex] >> 8; in eMBMasterReqReadWriteMultipleHoldingRegister()
385 *ucMBFrame++ = pusDataBuffer[usRegIndex++] ; in eMBMasterReqReadWriteMultipleHoldingRegister()
401 UCHAR *ucMBFrame; in eMBMasterFuncReadWriteMultipleHoldingRegister() local
413 vMBMasterGetPDUSndBuf(&ucMBFrame); in eMBMasterFuncReadWriteMultipleHoldingRegister()
414 usRegReadAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_READ_ADDR_OFF] << 8U ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
415 usRegReadAddress |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_READ_ADDR_OFF + 1] ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
418 usRegReadCount = ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_READ_REGCNT_OFF] << 8U ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
419 usRegReadCount |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_READ_REGCNT_OFF + 1] ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
421 usRegWriteAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_ADDR_OFF] << 8U ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
422 usRegWriteAddress |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_ADDR_OFF + 1] ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
425 usRegWriteCount = ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_REGCNT_OFF] << 8U ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
426 usRegWriteCount |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_REGCNT_OFF + 1] ); in eMBMasterFuncReadWriteMultipleHoldingRegister()
431 eRegStatus = eMBMasterRegHoldingCB( &ucMBFrame[MB_PDU_REQ_READWRITE_WRITE_VALUES_OFF], in eMBMasterFuncReadWriteMultipleHoldingRegister()