modbus.h 690 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __MODBUS_H
  2. #define __MODBUS_H
  3. //#define MB__DEBUG
  4. #ifdef MB__DEBUG
  5. #define MBDBG
  6. #else
  7. #define MBDBG if (0)
  8. #endif
  9. //
  10. typedef enum
  11. {
  12. MB_NO_ACTION = 0,
  13. MB_CHANGE_ADDR,
  14. MB_CHANGE_PORT_SETTINGS,
  15. MB_DEF_SETTINGS,
  16. MB_PART_DEF_SETTINGS,
  17. MB_SAVE_SETTINGS,
  18. MB_SAVE_SYS_SETTINGS,
  19. MB_CHANGE_PWM_FREQ_1,
  20. MB_CHANGE_PWM_FREQ_2,
  21. MB_CHANGE_PWM_FREQ_3,
  22. MB_RESET,
  23. MB_PAS_OK,
  24. MB_PAS_ERR
  25. } mb_delay_action_t ;
  26. //
  27. void mb_init(void);
  28. //
  29. void modbus_reset(void const * params);
  30. //
  31. void settings_timer(void const * params);
  32. //
  33. void modbus_port_timer(void const * params);
  34. #endif // __MODBUS_H