Technical Support
On-Line Manuals
RL-ARM User's Guide (MDK v4)
#include <file_config.h> U8 Send ( U8 outb); /* Byte to send to SPI interface. */
The function Send transmits to and recieves one byte from the SPI interface. The prameter outb specifies the command or data to be transmitted.
The function is part of the SPI Driver. The prototype is defined in the file File_Config.h. Developers must customize the function.
Use the function to send or receive commands, status values, or data.
A byte received from the SPI data input.
spi.BusSpeed, spi.CheckMedia, spi.Init, spi.RecBuf, spi.SendBuf, spi.SetSS, spi.UnInit
/* SPI Device Driver Control Block */ SPI_DRV spi0_drv = { Init, UnInit, Send, SendBuf, RecBuf, BusSpeed, SetSS, CheckMedia }; /* Send and receive a byte on SPI interface. */ static U8 Send (U8 outb) { SSPDR = outb; while (!(SSPSR & RNE)); /* Wait if RNE cleared, Rx FIFO is empty. */ return (SSPDR); }
Related Knowledgebase Articles
Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
Change Settings
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.