-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuart1.h
More file actions
37 lines (26 loc) · 695 Bytes
/
uart1.h
File metadata and controls
37 lines (26 loc) · 695 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
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef _UART1_H_
#define _UART1_H_
#include <stdint.h>
#include "pins.h"
//power off
void
uart1_deinit (void);
//power on, set baud
void
uart1_init (uint32_t);
//enable/disable tx, set pps pin
void
uart1_txon (bool, pin_t*);
//enable/disable rx, set pps pin
void
uart1_rxon (bool, pin_t*);
//set baud
void
uart1_baud (uint32_t);
//enable/disable tx irq, set isr function
void
uart1_txirqon(bool, void(*)(void));
//enable/disable rx irq, set isr function
void
uart1_rxirqon(bool, void(*)(void));
#endif // _UART1_H_