mmodbusConfig.h 612 B

123456789101112131415161718
  1. #ifndef _MMODBUS_CONFIG_H_
  2. #define _MMODBUS_CONFIG_H_
  3. #define _MMODBUS_FREERTOS 0
  4. #define _MMODBUS_RTU 1
  5. #define _MMODBUS_ASCII 0 // not implemented yet
  6. #define _MMODBUS_USART USART3
  7. #define _MMODBUS_RXSIZE 64
  8. #define _MMODBUS_TXDMA 0
  9. #define _MMODBUS_CTRL_GPIO USART_485_DE_GPIO_PORT
  10. #define _MMODBUS_CTRL_PIN USART_485_DE_PIN
  11. #define gettick( ) ( xTaskGetTickCount() )
  12. #if (_MMODBUS_RTU == 1) && (_MMODBUS_ASCII == 1)
  13. #error please select _MMODBUS_RTU or _MMODBUS_ASCII
  14. #endif
  15. #endif