extmod/machine_spi: Remove EVENT_POLL_HOOK from soft-SPI transfer func.
SPI needs to be fast, and calling the EVENT_POLL_HOOK every byte makes it unusable for ports that need to do non-trivial work in the EVENT_POLL_HOOK call. And individual SPI transfers should be short enough in time that EVENT_POLL_HOOK doesn't need to be called. If something like this proves to be needed in practice then we will need to introduce separate event hook macros, one for "slow" loops (eg select/poll) and one for "fast" loops (eg software I2C, SPI).
This commit is contained in:
parent
d3bb3e38df
commit
dee47949cc
|
@ -90,12 +90,6 @@ void mp_machine_soft_spi_transfer(mp_obj_base_t *self_in, size_t len, const uint
|
|||
if (dest != NULL) {
|
||||
dest[i] = data_in;
|
||||
}
|
||||
|
||||
// Some ports need a regular callback, but probably we don't need
|
||||
// to do this every byte, or even at all.
|
||||
#ifdef MICROPY_EVENT_POLL_HOOK
|
||||
MICROPY_EVENT_POLL_HOOK;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue