/*
 * Modbus_CRC.h
 *
 *  Created on: 8. 3. 2020
 *      Author: Ondrej Vitoslavsky
 */

#ifndef MODBUS_CRC_H_
#define MODBUS_CRC_H_

#include "Modbus.h"

/**
  * @brief  Calculates CRC
  * @note   Calculates CRC if address + PDU is input param.
  * 		Returns 0 in case whole frame
  * 		including CRC is input param in this function
  * @param  Frame pointer to first byte in ADU.
  * @param  Length length of data in ADU minus CRC.
  * @retval Returns calculated CRC. Returns 0 in case whole frame
  * 		including CRC is send to this function
  *
  */
uint16_t Modbus_CRC16(uint8_t* Frame, uint16_t Length);

#endif /* MODBUS_CRC_H_ */
