Skip to content

Commit

Permalink
Merge pull request #5987 from dhalbert/fix-rp2040-spi-freq-init
Browse files Browse the repository at this point in the history
RP2040: set initial SPI frequency
  • Loading branch information
dhalbert authored Feb 7, 2022
2 parents 566f8be + 1c17dc9 commit 5afd7d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ports/raspberrypi/common-hal/busio/SPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5afd7d4

Please sign in to comment.