Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default assignment for SPI chip select #2275

Merged
merged 1 commit into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions hal/network/lwip/wiznet/wiznetif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ WizNetif::WizNetif(hal_spi_interface_t spi, pin_t cs, pin_t reset, pin_t interru
/* There is an external 10k pull-up */
HAL_Pin_Mode(interrupt_, INPUT);

if (!hal_spi_is_enabled(spi_)) {
hal_spi_init(spi_);
// Make sure the SPI peripheral is initialized with default settings
hal_spi_acquire(spi_, nullptr);
hal_spi_begin_ext(spi_, SPI_MODE_MASTER, SPI_DEFAULT_SS, nullptr);
hal_spi_release(spi_, nullptr);
}

SPARK_ASSERT(os_semaphore_create(&spiSem_, 1, 0) == 0);

reg_wizchip_cris_cbfunc(
Expand Down
2 changes: 1 addition & 1 deletion hal/shared/spi_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SpiConfigurationLock {
hal_spi_init(spi_);
// Make sure the SPI peripheral is initialized with default settings
hal_spi_acquire(spi_, nullptr);
hal_spi_begin_ext(spi_, SPI_MODE_MASTER, SPI_DEFAULT_SS, nullptr);
hal_spi_begin_ext(spi_, SPI_MODE_MASTER, PIN_INVALID, nullptr);
} else {
hal_spi_acquire(spi_, nullptr);
}
Expand Down