Skip to main content
antonius
Associate III
January 21, 2016
Question

SPI Xmit question ?

  • January 21, 2016
  • 1 reply
  • 594 views
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
    This topic has been closed for replies.

    1 reply

    dean
    Associate II
    January 22, 2016
    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.