diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-10-02 21:06:40 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-10-02 21:06:40 -0400 |
| commit | 21d331c8cc54855897549ebcbcf9983235d98b2e (patch) | |
| tree | fca63bc35b308e809cd424b92209fa99f3f07b39 /shared-bindings/busio | |
| parent | aa95526428edb0196029587eb1b84fed544bbad8 (diff) | |
round SPI freq down; check max freq
Diffstat (limited to 'shared-bindings/busio')
| -rw-r--r-- | shared-bindings/busio/SPI.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c index be5f431ec..d30bbbe06 100644 --- a/shared-bindings/busio/SPI.c +++ b/shared-bindings/busio/SPI.c @@ -136,7 +136,7 @@ static void check_lock(busio_spi_obj_t *self) { //| .. method:: SPI.configure(\*, baudrate=100000, polarity=0, phase=0, bits=8) //| -//| Configures the SPI bus. Only valid when locked. +//| Configures the SPI bus. The SPI object must be locked. //| //| :param int baudrate: the desired clock rate in Hertz. The actual clock rate may be higher or lower //| due to the granularity of available clock settings. @@ -154,8 +154,8 @@ static void check_lock(busio_spi_obj_t *self) { //| and 8MHz. On the nRF52840, 16MHz and 32MHz are also available, but only on the first //| `busio.SPI` object you create. Two more ``busio.SPI`` objects can be created, but they are restricted //| to 8MHz maximum. This is a hardware restriction: there is only one high-speed SPI peripheral. -//| If you pick a a baudrate other than one of these, the nearest available -//| baudrate will be chosen. +//| If you pick a a baudrate other than one of these, the nearest lower +//| baudrate will be chosen, with a minimum of 125kHz. STATIC mp_obj_t busio_spi_configure(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits }; static const mp_arg_t allowed_args[] = { |
