DIY Logging Volt/Ampmeter
usart.h
Go to the documentation of this file.
1 /***************************************************************************//**
2  * @file usart.h
3  * @brief U(S)ART functionality for high-precision logging voltage/current meter.
4  * @version 1.0
5  * @author Brecht Van Eeckhoudt
6  *
7  * ******************************************************************************
8  *
9  * @section Versions
10  *
11  * @li v1.0: Initial version.
12  *
13  * ******************************************************************************
14  *
15  * @section License
16  *
17  * **Copyright (C) 2021 - Brecht Van Eeckhoudt**
18  *
19  * This program is free software: you can redistribute it and/or modify
20  * it under the terms of the **GNU General Public License** as published by
21  * the Free Software Foundation, either **version 3** of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * *A copy of the GNU General Public License can be found in the `LICENSE`
30  * file along with this source code.*
31  *
32  * @n
33  *
34  * Some methods also use code obtained from examples from STMicroelectronics.
35  *
36  * **Copyright (c) 2020 STMicroelectronics. All rights reserved.**
37  *
38  * These sections are licensed by ST under BSD 3-Clause license, the "License";
39  * One may not use these example files except in compliance with the License.
40  * One may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
41  *
42  ******************************************************************************/
43 
44 
45 /* Include guards prevent multiple inclusions of the same header */
46 #ifndef __USART_H_
47 #define __USART_H_
48 
49 
50 /* Includes necessary for this header file */
51 #include <stdint.h> /* (u)intXX_t */
52 
53 
54 /* Public definitions */
55 // None
56 
57 
58 /* Public prototypes */
60 void USART2_SendCommand(uint8_t *command, uint8_t bytes);
61 void USART3_SendCommand(uint8_t *command, uint8_t bytes);
62 void USART1_INIT(void);
63 void USART2_INIT(void);
64 void USART3_INIT(void);
65 void USART1_print(char *message);
66 //void USART1_SendData(char *string, uint32_t size);
67 //void USART2_SendData(uint8_t *string, uint32_t size);
68 //void USART3_SendData(uint8_t *string, uint32_t size);
72 void USART1_Error_Callback(void);
73 void USART2_Error_Callback(void);
74 void USART3_Error_Callback(void);
75 
76 
77 #endif /* __USART_H_ */
USART2_CharReception_Callback
void USART2_CharReception_Callback(void)
Function called from USART2 IRQ Handler when RXNE flag is set. Function is in charge of reading cha...
Definition: usart.c:697
USART1_INIT
void USART1_INIT(void)
USART1 Initialization Function.
Definition: usart.c:365
USART1_CharReception_Callback
void USART1_CharReception_Callback(void)
Print a string (char array) to USART1.
Definition: usart.c:670
USART2_SendCommand
void USART2_SendCommand(uint8_t *command, uint8_t bytes)
Send a byte (uint8_t) command to USART2.
Definition: usart.c:299
USART3_SendCommand
void USART3_SendCommand(uint8_t *command, uint8_t bytes)
Send a byte (uint8_t) command to USART3.
Definition: usart.c:334
USART_HandleContinuousReception
void USART_HandleContinuousReception(void)
This function monitors USART1/2/3 buffer filling indication and moves data around accordingly.
Definition: usart.c:114
USART2_Error_Callback
void USART2_Error_Callback(void)
Function called in case of error detected in USART2 IT Handler.
Definition: usart.c:779
USART3_INIT
void USART3_INIT(void)
USART3 Initialization Function.
Definition: usart.c:491
USART1_print
void USART1_print(char *message)
Print a string (char array) to USARTx.
Definition: usart.c:556
USART2_INIT
void USART2_INIT(void)
USART2 Initialization Function.
Definition: usart.c:428
USART3_Error_Callback
void USART3_Error_Callback(void)
Function called in case of error detected in USART3 IT Handler.
Definition: usart.c:808
USART3_CharReception_Callback
void USART3_CharReception_Callback(void)
Function called from USART3 IRQ Handler when RXNE flag is set. Function is in charge of reading cha...
Definition: usart.c:724
USART1_Error_Callback
void USART1_Error_Callback(void)
Function called in case of error detected in USART1 IT Handler.
Definition: usart.c:750