You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 regels
576 B

  1. #ifndef MODBUS_RTU_SLAVE_H
  2. #define MODBUS_RTU_SLAVE_H
  3. #include "stm32f4xx_hal.h"
  4. #include <stdint.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #define MODBUS_SLAVE_DEFAULT_ADDRESS (1U)
  9. HAL_StatusTypeDef ModbusSlaveInit(UART_HandleTypeDef *huart,
  10. uint8_t slaveAddress);
  11. void ModbusSlavePoll(void);
  12. void ModbusSlaveOnRxEvent(UART_HandleTypeDef *huart, uint16_t size);
  13. void ModbusSlaveOnTxComplete(UART_HandleTypeDef *huart);
  14. void ModbusSlaveOnUartError(UART_HandleTypeDef *huart);
  15. #ifdef __cplusplus
  16. }
  17. #endif
  18. #endif /* MODBUS_RTU_SLAVE_H */