Merge pull request #5987 from dhalbert/fix-rp2040-spi-freq-init
RP2040: set initial SPI frequency
This commit is contained in:
commit
5afd7d420d
@ -90,7 +90,8 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
|
||||
mp_raise_ValueError(translate("SPI peripheral in use"));
|
||||
}
|
||||
|
||||
spi_init(self->peripheral, 250000);
|
||||
self->target_frequency = 250000;
|
||||
self->real_frequency = spi_init(self->peripheral, self->target_frequency);
|
||||
|
||||
gpio_set_function(clock->number, GPIO_FUNC_SPI);
|
||||
claim_pin(clock);
|
||||
|
Loading…
Reference in New Issue
Block a user