mbslvapp.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // mbslvapp.h :
  2. //
  3. #if !defined(AGD_MBAPP_H__45B5FF25_C1D8_4196_97EF_0101C487A999__INCLUDED_)
  4. #define AGD_MBAPP_H__45B5FF25_C1D8_4196_97EF_0101C487A999__INCLUDED_
  5. #include <stdbool.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif // __cplusplus
  9. /////////////////////////////////////////////////////////////////////////////
  10. // mbapp.h - Declarations:
  11. #define HW_PLATFORM_OLS1V 1
  12. #define HW_PLATFORM_EAV1V 2
  13. #define HW_PLATFORM HW_PLATFORM_OLS1V
  14. #define MODBUS_SLAVE_ID 100
  15. #define MODBUS_WORD_REGISTER_COUNT 50
  16. #define MODBUS_RTU_UART_INT_PRIORITY (1 << 5)
  17. #define MODBUS_RTU_BAUDRATE 9600
  18. #define MODBUS_RTU_DATABITS 8
  19. #define MODBUS_RTU_STOPBITS 1
  20. #define MODBUS_RTU_PARITY P_Even
  21. /////////////////////////////////////////////////////////////////////////////
  22. bool GfaInitModbusSlaveApp(void);
  23. void GfaDoModbusSlaveApp(void);
  24. /////////////////////////////////////////////////////////////////////////////
  25. #ifdef __cplusplus
  26. }
  27. #endif // __cplusplus
  28. #endif // !defined(AGD_MBAPP_H__45B5FF25_C1D8_4196_97EF_0101C487A999__INCLUDED_)