-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUART.h
More file actions
25 lines (19 loc) · 697 Bytes
/
UART.h
File metadata and controls
25 lines (19 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef __STM32L476G_DISCOVERY_UART_H
#define __STM32L476G_DISCOVERY_UART_H
#include "stm32l476xx.h"
#define BufferSize 32
typedef char BOOL;
#define FALSE 0x00;
#define TRUE 0xFF;
#define NULL 0
void UART2_Init(void);
void UART2_GPIO_Init(void);
void USART1_IRQHandler(void);
void USART2_IRQHandler(void);
void USART_Init(USART_TypeDef * USARTx);
void USART_Write(USART_TypeDef * USARTx, uint8_t *buffer, uint32_t nBytes);
uint8_t USART_Read(USART_TypeDef * USARTx);
BOOL USART_ReadNB(USART_TypeDef * USARTx, char *readChar);
void USART_Delay(uint32_t us);
void USART_IRQHandler(USART_TypeDef * USARTx, uint8_t *buffer, uint32_t * pRx_counter);
#endif /* __STM32L476G_DISCOVERY_UART_H */