rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
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
45
extern
"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
63
typedef
struct
{
64
uint8_t
first
;
65
uint8_t
last
;
66
const
char
*
owner
;
67
}
panel_i2c_range_t
;
68
70
extern
const
panel_i2c_range_t
panel_i2c_reserved_table
[];
71
extern
const
unsigned
panel_i2c_reserved_count;
72
79
bool
panel_i2c_addr_reserved
(
unsigned
addr);
80
88
const
char
*
panel_i2c_owner
(
unsigned
addr);
89
90
#ifdef __cplusplus
91
}
92
#endif
panel_i2c_owner
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
panel_i2c_reserved_table
const panel_i2c_range_t panel_i2c_reserved_table[]
The ranges, in rising address order.
Definition
panel_i2c.c:13
panel_i2c_addr_reserved
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
panel_i2c_range_t
One range of the panel's I2C address table and its owner.
Definition
panel_i2c.h:63
panel_i2c_range_t::owner
const char * owner
Definition
panel_i2c.h:66
panel_i2c_range_t::first
uint8_t first
Definition
panel_i2c.h:64
panel_i2c_range_t::last
uint8_t last
Definition
panel_i2c.h:65
shared
bench
include
panel_i2c.h
Generated by
1.18.0