[fix] longest timout for spi

This commit is contained in:
2023-08-12 19:14:47 +02:00
parent 527585217c
commit 843e74ded0
3 changed files with 17 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ static uint32_t pot_value[MCP41X_RES_MAX] = {10000, 50000, 100000};
static void mcp41x_transmit(mcp41x_handle_t *hpot, uint8_t *data)
{
HAL_GPIO_WritePin(hpot->cs_port, hpot->cs_pin, GPIO_PIN_RESET);
HAL_SPI_Transmit(hpot->hspi, data, 2, 1);
HAL_SPI_Transmit(hpot->hspi, data, 2, HAL_MAX_DELAY);
HAL_GPIO_WritePin(hpot->cs_port, hpot->cs_pin, GPIO_PIN_SET);
}