rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
Loading...
Searching...
No Matches
pd_uart.h
Go to the documentation of this file.
1
21
22
#pragma once
23
24
#include <stdbool.h>
25
#include <stddef.h>
26
#include <stdint.h>
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
42
bool
pd_uart_open
(uint8_t tx, uint8_t rx, uint32_t baud);
43
50
void
pd_uart_baud
(uint32_t baud);
51
53
void
pd_uart_close
(
void
);
54
60
void
pd_uart_attach
(
void
*ctx);
66
void
pd_uart_detach
(
void
*ctx);
74
void
pd_uart_send
(
void
*ctx,
const
uint8_t *p,
size_t
n);
75
82
bool
pd_uart_getc
(uint8_t *b);
83
84
#ifdef __cplusplus
85
}
86
#endif
pd_uart_getc
bool pd_uart_getc(uint8_t *b)
A received byte, or false for none.
Definition
pd_uart.c:158
pd_uart_attach
void pd_uart_attach(void *ctx)
Attach the UART to the pins for one transaction.
Definition
pd_uart.c:110
pd_uart_detach
void pd_uart_detach(void *ctx)
Detach the UART; the pins go back to pulled-down inputs.
Definition
pd_uart.c:134
pd_uart_open
bool pd_uart_open(uint8_t tx, uint8_t rx, uint32_t baud)
Claim the state machines for tx and rx at baud.
Definition
pd_uart.c:39
pd_uart_baud
void pd_uart_baud(uint32_t baud)
Another rate for both machines, between transactions only: nothing happens while the UART is attached...
Definition
pd_uart.c:100
pd_uart_send
void pd_uart_send(void *ctx, const uint8_t *p, size_t n)
Send bytes on the attached UART.
Definition
pd_uart.c:146
pd_uart_close
void pd_uart_close(void)
Release them; the pins stay at rest.
Definition
pd_uart.c:70
protocols
pdmini
rp2350
pd_uart.h
Generated by
1.18.0