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
32 lines
1.4 KiB
#pragma once
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include "main.h"
|
|
#include "usart.h"
|
|
|
|
uint32_t sys_haspassedms(uint32_t ticket);
|
|
|
|
/***********************************************************************************************************************
|
|
* ====================================================调试指示灯===================================================== *
|
|
***********************************************************************************************************************/
|
|
void port_do_debug_light_state(void);
|
|
|
|
/***********************************************************************************************************************
|
|
* *******************************************************串口******************************************************** *
|
|
***********************************************************************************************************************/
|
|
// 注意修改这里并不会修改真正的波特率,需要修改usart.c中对应的位置
|
|
// #define at_cmd_baundrate 115200
|
|
/*modebus判断一帧是以是否3.5byte时间内是否收到新的数据*/
|
|
// #define kat_cmd_baundrate_one_packet_delay_us ((1000000 / (at_cmd_baundrate / 8) + 1) * 3) // 211
|
|
|
|
typedef struct
|
|
{
|
|
UART_HandleTypeDef *uarthandler;
|
|
uint8_t rxbuf;
|
|
} uart_t;
|
|
|
|
void port_mock_on_uart_rx(uart_t *uart);
|
|
void port_uart_start_all_uart_receive(void);
|
|
void sys_critical_enter(void);
|
|
void sys_critical_exit(void);
|