cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of HAL_SPI_Transmit

ACan.1
Associate II

Hi,

normally i use HAL_SPI_Transmit

   HAL_GPIO_WritePin(Port, Pin, GPIO_PIN_RESET);

HAL_SPI_Transmit(...)

   HAL_GPIO_WritePin(Port, Pin, GPIO_PIN_SET);

Is it possible to use it like following;

   HAL_GPIO_WritePin(Port, Pin, GPIO_PIN_RESET);

HAL_SPI_Transmit(...buffer1..)

HAL_SPI_Transmit(..buffer2..)

   HAL_GPIO_WritePin(Port, Pin, GPIO_PIN_SET);

Thank you

Note: The reason I need to use it like that is that, I need to call it in a function, which takes buffer1 and buffer2 as parameter; function(.., uint8* buffer1, uint8 buffer2, )

1 REPLY 1
TDK
Guru

Yes it is. This is a very common usage pattern to manually set the CS pin as needed.

If you feel a post has answered your question, please click "Accept as Solution".