SPI Xmit question ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-01-21 5:59 AM
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 discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-01-21 8:12 PM
Posted on January 22, 2016 at 05:12 Hi! As long as the parameter
cnt
is never larger than the size of the buffer thatp
points to, that code will work.