misc.h 441 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __MISC_H
  2. #define __MISC_H
  3. #include "at32f403a_407.h"
  4. #define MB_RX_ENABLE gpio_bits_reset(GPIOD, GPIO_PINS_10)
  5. #define MB_TX_ENABLE gpio_bits_set(GPIOD, GPIO_PINS_10)
  6. //
  7. void modbus_tim_init(void);
  8. //
  9. void modbus_init(void);
  10. //
  11. void test_modbus_port_init(void);
  12. void nop(uint32_t cnt);
  13. //
  14. void mb_tim_test(void);
  15. //
  16. void mb_test_gpio_init(void);
  17. //
  18. void pwm_test(void);
  19. //
  20. void pwm_gpio_config(void);
  21. #endif // __MISC_H