diff options
| author | Damien George <damien.p.george@gmail.com> | 2016-04-12 13:42:35 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2016-04-12 14:06:54 +0100 |
| commit | d083712224602372c5fd22d0b9e2b32efe6fa26b (patch) | |
| tree | 49d2f865325a4684a9d23ba702fe702fe2244475 /extmod/machine_i2c.h | |
| parent | 53ad681ed1786601ca5eccb60f8fd950b8bc47d7 (diff) | |
extmod: Add generic machine.I2C class, with bit-bang I2C.
Should work on any machine that provides the correct pin functions.
Diffstat (limited to 'extmod/machine_i2c.h')
| -rw-r--r-- | extmod/machine_i2c.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/extmod/machine_i2c.h b/extmod/machine_i2c.h new file mode 100644 index 000000000..03fa6422a --- /dev/null +++ b/extmod/machine_i2c.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Damien P. George + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H__ +#define __MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H__ + +#include "py/obj.h" + +extern const mp_obj_type_t machine_i2c_type; + +#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H__ |
