blob: e2a0f3d8c226917633c609462be27cf0ef75753f (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/**
*
* Author: Dylan Muller
* Copyright (c) 2025
* All rights reserved.
*
* - Commercial/IP use prohibited.
* - Attribution required.
* See License.txt
*
*/
#ifndef UARTINT_H_
#define UARTINT_H_
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
extern FILE uart_out;
extern FILE uart_in;
void uart_init(void);
bool uart_tx(
uint8_t data
);
bool uart_rx(
uint8_t* data
);
size_t uart_tx_burst(
uint8_t* data,
size_t size
);
size_t uart_rx_burst(
uint8_t* data,
size_t size
);
size_t uart_tx_available(void);
size_t uart_rx_available(void);
bool uart_rx_peek(
uint8_t* data
);
void uart_tx_flush(void);
char *uart_ngets(char *s, size_t n);
#endif
|