| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- *
- *
- */
- #ifndef __USART_H
- #define __USART_H
- #include "stm32f4xx.h"
- #include "stdio.h"
- #define UART_INF_REG 1
- #define WIFI_LOWEST_BAUDRATE 115200
- #define WIFI_HIGH_BAUDRATE 921600
- #define WIFI_HIGHEST_BAUDRATE 1000000
- #define WIFI_UART_WORDLENGTH UART_WORDLENGTH_8B
- #define WIFI_UART_STOPBITS UART_STOPBITS_1
- #define WIFI_UART_PARITY UART_PARITY_NONE
- #define WIFI_UART UART5
- #if UART_INF_REG==0
- extern UART_HandleTypeDef wifi_UartHandle;
- extern UART_HandleTypeDef huart3;
- #endif
- void Delay_ms( unsigned int time_ms );
- void Wifi_USART_Init(uint32_t baud);
- void Wifi_Start(void);
- int Wifi_reset(void);
- int Wifi_Uart_Send(uint8_t *buf, uint32_t len, uint32_t timeout);
- int Wifi_Uart_Receive(uint8_t *buf, uint32_t len, uint32_t timeout);
- unsigned int Wifi_Uart_DataLen(void);
- unsigned int Wifi_Uart_ReadData(uint8_t* buf, uint32_t len);
- void Wifi_Uart_ClearRxBuf(void);
- void Wifi_Uart_ClearTxBuf(void);
- void Wifi_Uart_IRQ_Handler(void);
- #endif
|