1
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
33
34
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
62
63
64
69
70
71
72
73
74
75
/* ... */
#ifndef _PICO_I2C_SLAVE_H
#define _PICO_I2C_SLAVE_H
#include "hardware/i2c.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ... */
/* ... */
typedef enum i2c_slave_event_t
{
I2C_SLAVE_RECEIVE,
I2C_SLAVE_REQUEST,
I2C_SLAVE_FINISH,
...} i2c_slave_event_t;
/* ... */
typedef void (*i2c_slave_handler_t)(i2c_inst_t *i2c, i2c_slave_event_t event);
/* ... */
void i2c_slave_init(i2c_inst_t *i2c, uint8_t address, i2c_slave_handler_t handler);
/* ... */
void i2c_slave_deinit(i2c_inst_t *i2c);
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif