rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
sense_map.h
Go to the documentation of this file.
1
23
24#pragma once
25
26#include <stdbool.h>
27#include <stdint.h>
28
29#include "outputs.h"
30#include "sense_page.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
50void sense_map_read(const sense_page_t *p, uint8_t off, uint8_t n,
51 uint16_t *out);
52
80uint8_t sense_map_write(sense_page_t *p, uint8_t off, uint8_t n,
81 const uint16_t *in, const outputs_t *o,
82 uint64_t taken);
83
96void sense_xwin_read(const sense_page_t *p, unsigned page, uint8_t off,
97 uint8_t n, uint16_t *out);
98
110void sense_map_kept(const sense_page_t *p, uint16_t *kept, uint16_t *set);
111
126uint8_t sense_map_restore(sense_page_t *p, const uint16_t *kept,
127 uint16_t set, const outputs_t *o, uint64_t taken);
128
129#ifdef __cplusplus
130}
131#endif
The intermediary every output goes through: one set of rules for arming, clamping,...
void sense_map_kept(const sense_page_t *p, uint16_t *kept, uint16_t *set)
What is kept: registers 0 to 25 (LINK_SM_KEPT) into kept, and 1 into set while the map is in force,...
Definition sense_map.c:299
void sense_map_read(const sense_page_t *p, uint8_t off, uint8_t n, uint16_t *out)
A SENSE_MAP read.
Definition sense_map.c:203
uint8_t sense_map_restore(sense_page_t *p, const uint16_t *kept, uint16_t set, const outputs_t *o, uint64_t taken)
A kept map back in force at boot, through sense_map_write()'s checks, after SENSE's restore: nothing ...
Definition sense_map.c:308
void sense_xwin_read(const sense_page_t *p, unsigned page, uint8_t off, uint8_t n, uint16_t *out)
A SENSE_WIN_A (page 0) or SENSE_WIN_B (1) read; no write is taken.
Definition sense_map.c:275
uint8_t sense_map_write(sense_page_t *p, uint8_t off, uint8_t n, const uint16_t *in, const outputs_t *o, uint64_t taken)
A SENSE_MAP write, merged into the map in force (or the derived one) and the whole map judged before ...
Definition sense_map.c:222
The SENSE, SERVO_SENSE and SERVO_WIN link pages at the IOmcu: the I2C bus of the two current monitors...
The state of a bank of channels and slots.
Definition outputs.h:143
The state of the SENSE page: its three register images, the generations, the pins and the map and lim...
Definition sense_page.h:78