第一次提交
This commit is contained in:
58
ETH/UdpServer/User/interface_uart.h
Normal file
58
ETH/UdpServer/User/interface_uart.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* eth_drive.h
|
||||
*
|
||||
* Created on: 2023<32><33>1<EFBFBD><31>5<EFBFBD><35>
|
||||
* Author: Administrator
|
||||
*/
|
||||
|
||||
#ifndef USER_INTERFACE_UART_H_
|
||||
#define USER_INTERFACE_UART_H_
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#define USART6_RX_CH DMA2_Channel7
|
||||
|
||||
#define RTCM_UART UART4
|
||||
#define RTCM_RX_CH DMA2_Channel3
|
||||
#define RTCM_RX_IRQn DMA2_Channel3_IRQn
|
||||
|
||||
#define IMU_UART USART3
|
||||
#define IMU_RX_CH DMA1_Channel3
|
||||
#define IMU_RX_IRQn DMA1_Channel3_IRQn
|
||||
|
||||
#define UM982_UART UART7
|
||||
#define UM982_RX_CH DMA2_Channel9
|
||||
#define UM982_RX_IRQn DMA2_Channel9_IRQn
|
||||
|
||||
|
||||
#define RING_BUF_SIZE 4096
|
||||
|
||||
|
||||
// <20><><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ<EFBFBD>嶨<EFBFBD><E5B6A8>
|
||||
typedef struct {
|
||||
uint8_t buffer[RING_BUF_SIZE];
|
||||
volatile uint16_t head; // д<><D0B4>λ<EFBFBD><CEBB>
|
||||
volatile uint16_t tail; // <20><>ȡλ<C8A1><CEBB>
|
||||
volatile uint8_t overflow; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
||||
} RingBuffer;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern float Acc[3];
|
||||
extern float Gyro[3];
|
||||
|
||||
//<2F>ⲿ<EFBFBD><E2B2BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void initUart(void);
|
||||
void uartSendto(USART_TypeDef *USARTx, uint8_t *ucData, uint16_t len);//<2F><><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>
|
||||
void interfaceUartInit(void);
|
||||
|
||||
#endif /* USER_INTERFACE_UART_H_ */
|
||||
Reference in New Issue
Block a user