38
|
1 /**
|
|
2 ******************************************************************************
|
|
3 * @file uart.h
|
|
4 * @author heinrichs weikamp gmbh
|
|
5 * @version V0.0.1
|
|
6 * @date 27-March-2014
|
|
7 * @brief button control
|
|
8 *
|
|
9 ******************************************************************************
|
|
10 * @attention
|
|
11 *
|
|
12 * <h2><center>© COPYRIGHT(c) 2015 heinrichs weikamp</center></h2>
|
|
13 *
|
|
14 ******************************************************************************
|
|
15 */
|
|
16
|
|
17 /* Define to prevent recursive inclusion -------------------------------------*/
|
|
18 #ifndef UART_H
|
|
19 #define UART_H
|
|
20
|
|
21 #ifdef __cplusplus
|
|
22 extern "C" {
|
|
23 #endif
|
|
24
|
|
25 #include "stm32f4xx_hal.h"
|
|
26
|
662
|
27
|
|
28 typedef enum
|
|
29 {
|
|
30 RX_Ready= 0, /* Initial state */
|
690
|
31 RX_DetectStart, /* validate start byte */
|
|
32 RX_SelectData, /* Data contained in this frame */
|
662
|
33 RX_Data0, /* Process incoming data */
|
|
34 RX_Data1,
|
|
35 RX_Data2,
|
|
36 RX_Data3,
|
|
37 RX_Data4,
|
690
|
38 RX_Data5,
|
|
39 RX_Data6,
|
|
40 RX_Data7,
|
|
41 RX_Data8,
|
|
42 RX_Data9,
|
|
43 RX_Data10,
|
|
44 RX_Data11,
|
|
45 RX_Data12,
|
662
|
46 RX_DataComplete
|
|
47 } receiveState_t;
|
|
48
|
|
49
|
|
50 void MX_USART1_UART_Init(void);
|
|
51 void MX_USART1_UART_DeInit(void);
|
|
52 void MX_USART1_DMA_Init(void);
|
38
|
53 uint8_t UART_ButtonAdjust(uint8_t *array);
|
690
|
54 #ifdef ENABLE_CO2_SUPPORT
|
|
55 void HandleUARTCO2Data(void);
|
|
56 #endif
|
|
57 #ifdef ENABLE_SENTINEL_MODE
|
|
58 void HandleUARTSentinelData(void);
|
|
59 #endif
|
38
|
60 #ifdef __cplusplus
|
|
61 }
|
|
62 #endif
|
|
63
|
|
64 #endif /* UART_H */
|
|
65
|
|
66 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/
|