stm32/boards/STM32L476DISC: Update to not take the address of pin objs.

This commit is contained in:
Damien George 2018-03-28 16:22:43 +11:00
parent 2dca693c24
commit 7e28212352
2 changed files with 8 additions and 8 deletions

View File

@ -6,14 +6,14 @@ const mp_soft_spi_obj_t soft_spi_bus = {
.delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY, .delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY,
.polarity = 0, .polarity = 0,
.phase = 0, .phase = 0,
.sck = &MICROPY_HW_SPIFLASH_SCK, .sck = MICROPY_HW_SPIFLASH_SCK,
.mosi = &MICROPY_HW_SPIFLASH_MOSI, .mosi = MICROPY_HW_SPIFLASH_MOSI,
.miso = &MICROPY_HW_SPIFLASH_MISO, .miso = MICROPY_HW_SPIFLASH_MISO,
}; };
const mp_spiflash_config_t spiflash_config = { const mp_spiflash_config_t spiflash_config = {
.bus_kind = MP_SPIFLASH_BUS_SPI, .bus_kind = MP_SPIFLASH_BUS_SPI,
.bus.u_spi.cs = &MICROPY_HW_SPIFLASH_CS, .bus.u_spi.cs = MICROPY_HW_SPIFLASH_CS,
.bus.u_spi.data = (void*)&soft_spi_bus, .bus.u_spi.data = (void*)&soft_spi_bus,
.bus.u_spi.proto = &mp_soft_spi_proto, .bus.u_spi.proto = &mp_soft_spi_proto,
}; };

View File

@ -2,8 +2,8 @@
void STM32L476DISC_board_early_init(void) { void STM32L476DISC_board_early_init(void) {
// set SPI flash WP and HOLD pins high // set SPI flash WP and HOLD pins high
mp_hal_pin_output(&pin_E14); mp_hal_pin_output(pin_E14);
mp_hal_pin_output(&pin_E15); mp_hal_pin_output(pin_E15);
mp_hal_pin_write(&pin_E14, 1); mp_hal_pin_write(pin_E14, 1);
mp_hal_pin_write(&pin_E15, 1); mp_hal_pin_write(pin_E15, 1);
} }