diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2016-10-05 18:44:55 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2016-10-05 18:44:55 -0700 |
| commit | afedba5c2f638581e0c9839844fcb63b9bd8a7bb (patch) | |
| tree | 3bfaf6250a2675363f00f243de5d364abeb4539b /shared-bindings/modules/machine.h | |
| parent | 42f6ba04a2065624fb90cac19eace3da3d158ba1 (diff) | |
atmel-samd: Support with statements for I2C class.
Also add init/deinit if you want to init/deinit manually.
Diffstat (limited to 'shared-bindings/modules/machine.h')
| -rw-r--r-- | shared-bindings/modules/machine.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/shared-bindings/modules/machine.h b/shared-bindings/modules/machine.h index 9da3d3845..66b0ae465 100644 --- a/shared-bindings/modules/machine.h +++ b/shared-bindings/modules/machine.h @@ -51,8 +51,11 @@ extern const mp_obj_type_t machine_i2c_type; // Initializes the hardware peripheral. -extern void mp_hal_i2c_init(machine_i2c_obj_t *self, const pin_obj_t * scl, - const pin_obj_t * sda, uint32_t freq); +extern void mp_hal_i2c_construct(machine_i2c_obj_t *self, const pin_obj_t * scl, + const pin_obj_t * sda, uint32_t freq); + +extern void mp_hal_i2c_init(machine_i2c_obj_t *self); +extern void mp_hal_i2c_deinit(machine_i2c_obj_t *self); // Probe the bus to see if a device acknowledges the given address. extern bool mp_hal_i2c_probe(machine_i2c_obj_t *self, uint8_t addr); |
