[fix] spi drivers set cs pin in idle
This commit is contained in:
@@ -17,6 +17,8 @@ void mcp41x_init(mcp41x_handle_t *hpot, SPI_HandleTypeDef *hspi, GPIO_TypeDef *c
|
||||
hpot->cs_pin = cs_pin;
|
||||
hpot->max_res = res;
|
||||
hpot->dir = MCP41X_ATOB;
|
||||
|
||||
HAL_GPIO_WritePin(hpot->cs_port, hpot->cs_pin, GPIO_PIN_SET);
|
||||
}
|
||||
|
||||
void mcp41x_setValue(mcp41x_handle_t *hpot, uint8_t value)
|
||||
|
||||
Reference in New Issue
Block a user