extmod: Add generic machine.I2C class, with bit-bang I2C.

Should work on any machine that provides the correct pin functions.
This commit is contained in:
Damien George
2016-04-12 13:42:35 +01:00
parent 53ad681ed1
commit d083712224
5 changed files with 416 additions and 0 deletions

View File

@@ -681,6 +681,26 @@ Q(mem16)
Q(mem32)
#endif
#if MICROPY_PY_MACHINE_I2C
Q(I2C)
Q(init)
Q(scl)
Q(sda)
Q(freq)
Q(scan)
Q(start)
Q(stop)
Q(read)
Q(readinto)
Q(write)
Q(readfrom)
Q(readfrom_into)
Q(writeto)
Q(readfrom_mem)
Q(readfrom_mem_into)
Q(writeto_mem)
#endif
#if MICROPY_PY_USSL
Q(ussl)
Q(wrap_socket)