model_cfg.h 608 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef MODEL_CFG_H
  2. #define MODEL_CFG_H
  3. #include "at32f403a_407.h"
  4. #include <stdbool.h>
  5. #if defined (MDIO_88)
  6. #define MODEL_STR "MDIO-88"
  7. #define MODEL_CODE 0x0100
  8. #elif defined (MAO_8)
  9. #define MODEL_STR "MAO_8"
  10. #define MODEL_CODE 0x0200
  11. #elif defined (MAI_12)
  12. #define MODEL_STR "MAI_12"
  13. #define MODEL_CODE 0x0300
  14. #else
  15. #define MODEL_STR ""
  16. #define MODEL_CODE 0x0
  17. #endif
  18. static const uint16_t model_code = MODEL_CODE;
  19. #define MODEL_ADDR 0x080211F0
  20. #define MODEL_LEN 16
  21. #endif /* #ifndef MODEL_CFG_H */