From 30c7ce3854837cda574841a5f3b259eecf8f6f00 Mon Sep 17 00:00:00 2001 From: Valerio De Benedetto Date: Sun, 26 Jun 2022 09:26:07 +0200 Subject: [PATCH] Moved nmbs_crc_calc() declaration --- nanomodbus.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nanomodbus.h b/nanomodbus.h index 5a2aa05..a400cde 100644 --- a/nanomodbus.h +++ b/nanomodbus.h @@ -226,12 +226,6 @@ void nmbs_set_byte_timeout(nmbs_t* nmbs, int32_t timeout_ms); */ void nmbs_set_platform_arg(nmbs_t* nmbs, void* arg); -/** Calculate the Modbus CRC of some data. - * @param data Data - * @param length Length of the data - */ -uint16_t nmbs_crc_calc(const uint8_t* data, uint32_t length); - #ifndef NMBS_CLIENT_DISABLED /** Set the recipient server address of the next request on RTU transport. * @param nmbs pointer to the nmbs_t instance @@ -369,6 +363,12 @@ nmbs_error nmbs_send_raw_pdu(nmbs_t* nmbs, uint8_t fc, const void* data, uint16_ nmbs_error nmbs_receive_raw_pdu_response(nmbs_t* nmbs, void* data_out, uint16_t data_out_len); #endif +/** Calculate the Modbus CRC of some data. + * @param data Data + * @param length Length of the data + */ +uint16_t nmbs_crc_calc(const uint8_t* data, uint32_t length); + #ifndef NMBS_STRERROR_DISABLED /** Convert a nmbs_error to string * @param error error to be converted