rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
panel_i2c.h
Go to the documentation of this file.
1
39#pragma once
40
41#include <stdbool.h>
42#include <stdint.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
55#define PANEL_I2C_RESERVED(a) \
56 ((unsigned)(a) > 0x7Fu || (unsigned)(a) <= 0x03u || \
57 (unsigned)(a) == 0x14u || (unsigned)(a) == 0x5Du || \
58 (unsigned)(a) >= 0x78u)
59
63typedef struct {
64 uint8_t first;
65 uint8_t last;
66 const char *owner;
68
71extern const unsigned panel_i2c_reserved_count;
72
79bool panel_i2c_addr_reserved(unsigned addr);
80
88const char *panel_i2c_owner(unsigned addr);
89
90#ifdef __cplusplus
91}
92#endif
const char * panel_i2c_owner(unsigned addr)
The owner of addr: "GT911" or "I2C reserved", "not a 7-bit address" above 0x7F,...
Definition panel_i2c.c:23
const panel_i2c_range_t panel_i2c_reserved_table[]
The ranges, in rising address order.
Definition panel_i2c.c:13
bool panel_i2c_addr_reserved(unsigned addr)
Whether addr belongs to the board, or is no 7-bit address at all.
Definition panel_i2c.c:37
One range of the panel's I2C address table and its owner.
Definition panel_i2c.h:63
const char * owner
Definition panel_i2c.h:66
uint8_t first
Definition panel_i2c.h:64
uint8_t last
Definition panel_i2c.h:65