diff options
| author | Damien George | 2016-09-01 15:07:20 +1000 |
|---|---|---|
| committer | Damien George | 2016-09-01 15:07:20 +1000 |
| commit | 0823c1baf864f2e8fd60e49a5e42a958fd89ff43 (patch) | |
| tree | c5b9792e978600f7ca5b603d82ee015b1047eca2 /py | |
| parent | 9c04ef2a6772cabbd92abe6c826b56cc04a1a7b8 (diff) | |
extmod: Add machine_spi with generic SPI C-protocol and helper methods.
The idea is that all ports can use these helper methods and only need to
provide initialisation of the SPI bus, as well as a single transfer
function. The coding pattern follows the stream protocol and helper
methods.
Diffstat (limited to 'py')
| -rw-r--r-- | py/mpconfig.h | 4 | ||||
| -rw-r--r-- | py/py.mk | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 23591e0da..455f870ac 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -923,6 +923,10 @@ typedef double mp_float_t; #define MICROPY_PY_MACHINE_I2C (0) #endif +#ifndef MICROPY_PY_MACHINE_SPI +#define MICROPY_PY_MACHINE_SPI (0) +#endif + #ifndef MICROPY_PY_USSL #define MICROPY_PY_USSL (0) #endif @@ -208,6 +208,7 @@ PY_O_BASENAME = \ ../extmod/machine_pinbase.o \ ../extmod/machine_pulse.o \ ../extmod/machine_i2c.o \ + ../extmod/machine_spi.o \ ../extmod/modussl_axtls.o \ ../extmod/modurandom.o \ ../extmod/modwebsocket.o \ |
