You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.4 KiB

2 years ago
  1. #pragma once
  2. #include <stdbool.h>
  3. #include <stdint.h>
  4. #include <stdio.h>
  5. #include "main.h"
  6. #include "usart.h"
  7. uint32_t sys_haspassedms(uint32_t ticket);
  8. /***********************************************************************************************************************
  9. * ========================================================================================================= *
  10. ***********************************************************************************************************************/
  11. void port_do_debug_light_state(void);
  12. /***********************************************************************************************************************
  13. * *************************************************************************************************************** *
  14. ***********************************************************************************************************************/
  15. // 注意修改这里并不会修改真正的波特率,需要修改usart.c中对应的位置
  16. // #define at_cmd_baundrate 115200
  17. /*modebus判断一帧是以是否3.5byte时间内是否收到新的数据*/
  18. // #define kat_cmd_baundrate_one_packet_delay_us ((1000000 / (at_cmd_baundrate / 8) + 1) * 3) // 211
  19. typedef struct
  20. {
  21. UART_HandleTypeDef *uarthandler;
  22. uint8_t rxbuf;
  23. } uart_t;
  24. void port_mock_on_uart_rx(uart_t *uart);
  25. void port_uart_start_all_uart_receive(void);
  26. void sys_critical_enter(void);
  27. void sys_critical_exit(void);