cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Xmit question ?

antonius
Senior
Posted on January 21, 2016 at 14:59

Guys,

I have a question for transmitting multiple bytes on STM32CubeMX, Can I make like this :

/* Send a data block fast */
static
void xmit_spi_multi (
uint8_t p[], /* Data block to be sent */
UINT cnt 
)
{
HAL_SPI_Transmit(&hspi2,p,cnt,100);
}

Thanks
1 REPLY 1
dean
Associate II
Posted on January 22, 2016 at 05:12

Hi!

As long as the parameter

cnt

is never larger than the size of the buffer that

p

points to, that code will work.