Fixed warnings
This commit is contained in:
parent
3777433c60
commit
ffb17b4a1a
6
modbus.c
6
modbus.c
@ -157,6 +157,8 @@ static int8_t modbus_transaction_to_buffer(uint8_t *buffer, uint8_t *msg_len, mo
|
|||||||
*msg_len = modbus_fill_device_id_objects(buffer+buffer_pos, transaction);
|
*msg_len = modbus_fill_device_id_objects(buffer+buffer_pos, transaction);
|
||||||
*msg_len += 7; /* includes 2 bytes for CRC */
|
*msg_len += 7; /* includes 2 bytes for CRC */
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
crc16 = modbus_CRC16(buffer, buffer_pos); /* last two bytes is the checksum itself */
|
crc16 = modbus_CRC16(buffer, buffer_pos); /* last two bytes is the checksum itself */
|
||||||
@ -240,7 +242,9 @@ static int8_t modbus_process_read_write_request(const uint8_t *buffer, int len,
|
|||||||
case MODBUS_WRITE_MULTIPLE_AO:
|
case MODBUS_WRITE_MULTIPLE_AO:
|
||||||
case MODBUS_READ_WRITE_MULTIPLE_REGISTERS:
|
case MODBUS_READ_WRITE_MULTIPLE_REGISTERS:
|
||||||
transaction->register_number = MODBUS_AO_START_NUMBER;
|
transaction->register_number = MODBUS_AO_START_NUMBER;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MODBUS_FLAG_WRITE 0x01
|
#define MODBUS_FLAG_WRITE 0x01
|
||||||
|
Loading…
Reference in New Issue
Block a user