Changeset 70 for trunk/fw_g473rct/SES/src/modbus.c
- Timestamp:
- May 1, 2026, 7:10:54 PM (5 days ago)
- File:
-
- 1 edited
-
trunk/fw_g473rct/SES/src/modbus.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fw_g473rct/SES/src/modbus.c
r69 r70 65 65 66 66 void mbUartInit (modbus_t * mb_data,UART_HandleTypeDef * usart, uint32_t baudrate, uint32_t parityMode, uint32_t stopBits , uint32_t nrOfBitsPerChar); 67 uint16_t mbCrc16 (uint8_t *buf, uint32_t len);68 67 void mbSend (modbus_t * mb_data ); 69 68 uint32_t mbSlaveReadHoldingRegisters (uint8_t * response_string, uint8_t *msg, uint32_t tx_position, uint8_t deviceID); … … 317 316 318 317 // Compute the MODBUS RTU CRC 319 uint16_t mbCrc16( uint8_t*buf, uint32_t len)318 uint16_t mbCrc16(const uint8_t* const buf, uint32_t len) 320 319 { 321 320 uint16_t crc = 0xFFFF; … … 344 343 345 344 /* If CRC is correct returns msg_length else returns INVALID_CRC */ 346 int mbCheckCrc16( uint8_t *msg, const int msg_length)345 int mbCheckCrc16(uint8_t* msg, const int msg_length) 347 346 { 348 347 int ret;
Note:
See TracChangeset
for help on using the changeset viewer.
