rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
tone_cap.h
Go to the documentation of this file.
1
27#ifndef RCBENCH_TONE_CAP_H
28#define RCBENCH_TONE_CAP_H
29
30#include <stdbool.h>
31#include <stdint.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
48bool tone_cap_start(uint8_t pin);
49
61bool tone_cap_pause(void);
62
67void tone_cap_resume(void);
68
76void tone_cap_stop(void);
77
83bool tone_cap_running(void);
84
90uint64_t tone_cap_start_us(void);
91
100void tone_cap_rest(uint8_t pin);
101
107const uint32_t *tone_cap_ring(void);
108
114uint32_t tone_cap_wr(void);
115
124bool tone_cap_stalled(void);
125
126#ifdef __cplusplus
127}
128#endif
129
130#endif /* RCBENCH_TONE_CAP_H */
bool tone_cap_start(uint8_t pin)
Claim a state machine and a DMA channel, load the program, start the capture on pin.
Definition tone_cap.c:53
const uint32_t * tone_cap_ring(void)
The ring.
Definition tone_cap.c:146
bool tone_cap_running(void)
Whether the capture runs.
Definition tone_cap.c:136
void tone_cap_resume(void)
Mark a paused capture running again, when core 1 did not acknowledge the pause and nothing was taken ...
Definition tone_cap.c:114
void tone_cap_stop(void)
Stop the capture and give back what it claimed; the pin is left an input with its pull-down on.
Definition tone_cap.c:119
bool tone_cap_pause(void)
Mark the capture not running, so the next order tells core 1 to read nothing from it; the state machi...
Definition tone_cap.c:107
uint64_t tone_cap_start_us(void)
The microsecond timer when the counter began.
Definition tone_cap.c:141
uint32_t tone_cap_wr(void)
The slot the DMA writes next; 0 when the capture does not run.
Definition tone_cap.c:151
void tone_cap_rest(uint8_t pin)
The pin as an input with its pull-down on, driven by nothing: a tap that is off.
Definition tone_cap.c:43
bool tone_cap_stalled(void)
Whether the state machine dropped a word (its FIFO was full) since the last call; clears the flag.
Definition tone_cap.c:163