-
- Downloads
extmod/machine_spi: Simplify SPI xfer function to only take one buf len.
There is no need to take src_len and dest_len arguments. The case of reading-only with a single output byte (originally src_len=1, dest_len>1) is now handled by using the output buffer as the input buffer, and using memset to fill the output byte into this buffer. This simplifies the implementations of the spi_transfer protocol function.
Showing
- esp8266/modpybhspi.c 10 additions, 22 deletionsesp8266/modpybhspi.c
- esp8266/modpybspi.c 5 additions, 10 deletionsesp8266/modpybspi.c
- extmod/machine_spi.c 10 additions, 15 deletionsextmod/machine_spi.c
- extmod/machine_spi.h 1 addition, 1 deletionextmod/machine_spi.h
- stmhal/spi.c 2 additions, 9 deletionsstmhal/spi.c
Loading
Please register or sign in to comment