forked from open-degu/degu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodmachine.h
34 lines (27 loc) · 801 Bytes
/
modmachine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
#define MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
#include "py/obj.h"
extern const mp_obj_type_t machine_pin_type;
extern const mp_obj_type_t machine_adc_type;
extern const mp_obj_type_t machine_i2c_type;
MP_DECLARE_CONST_FUN_OBJ_0(machine_info_obj);
typedef struct _machine_pin_obj_t {
mp_obj_base_t base;
struct device *port;
uint32_t pin;
} machine_pin_obj_t;
typedef struct _machine_adc_obj_t {
mp_obj_base_t base;
struct device *dev;
uint8_t adc_channel;
struct adc_channel_cfg *cfg;
u16_t buffer;
} machine_adc_obj_t;
typedef struct _machine_i2c_obj_t {
mp_obj_base_t base;
struct device *dev;
uint8_t i2c_channel;
struct i2c_channel_cfg *cfg;
u16_t buffer;
} machine_i2c_obj_t;
#endif // MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H