ports/raspberrypi/common-hal/busio/SPI.c

This commit is contained in:
Dan Halbert 2022-02-07 17:07:47 -05:00
parent 566f8bed99
commit 1c17dc9348
1 changed files with 2 additions and 1 deletions

View File

@ -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);