drivers/can/mcp2515.c Fix: add missing spi configuration in mcp2515_reset_lowlevel

This commit is contained in:
paolovolpi 2023-06-01 11:36:30 +02:00 committed by Alan Carvalho de Assis
parent c661e26e86
commit 0ed9842180
1 changed files with 1 additions and 0 deletions

View File

@ -1196,6 +1196,7 @@ static void mcp2515_reset_lowlevel(FAR struct mcp2515_can_s *priv)
/* Send SPI reset command to MCP2515 */ /* Send SPI reset command to MCP2515 */
SPI_LOCK(config->spi, true); SPI_LOCK(config->spi, true);
mcp2515_config_spi(priv);
SPI_SELECT(config->spi, SPIDEV_CANBUS(config->devid), true); SPI_SELECT(config->spi, SPIDEV_CANBUS(config->devid), true);
SPI_SEND(config->spi, MCP2515_RESET); SPI_SEND(config->spi, MCP2515_RESET);
SPI_SELECT(config->spi, SPIDEV_CANBUS(config->devid), false); SPI_SELECT(config->spi, SPIDEV_CANBUS(config->devid), false);