summaryrefslogtreecommitdiff
path: root/extmod/machine_spi.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-04 13:43:02 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-04 13:43:02 +1100
commitb932b2dd1faaf3091b13af7d213041a737e40fac (patch)
tree2428ebf68a48aebdb1d55ce800e557e37f45d13b /extmod/machine_spi.h
parent9f1e395c167648d1b7fef1175290b0047ee6e1f4 (diff)
extmod/machine_spi: Use delay_half, not baudrate, for internal timing.
The delay_half parameter must be specified by the port to set up the timing of the software SPI. This allows the port to adjust the timing value to better suit its timing characteristics, as well as provide a more accurate printing of the baudrate.
Diffstat (limited to 'extmod/machine_spi.h')
-rw-r--r--extmod/machine_spi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/machine_spi.h b/extmod/machine_spi.h
index e1922c6e8..316d06646 100644
--- a/extmod/machine_spi.h
+++ b/extmod/machine_spi.h
@@ -37,7 +37,7 @@ typedef struct _mp_machine_spi_p_t {
typedef struct _mp_machine_soft_spi_obj_t {
mp_obj_base_t base;
- uint32_t baudrate;
+ uint32_t delay_half; // microsecond delay for half SCK period
uint8_t polarity;
uint8_t phase;
mp_hal_pin_obj_t sck;