CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches

◆ SPItx()

void SPItx ( unsigned char  dato)

This is a blocking function that transmits one byte over the SPI.

Parameters
[in]datothe byte to be transmitted
Returns
No output
971void SPItx(unsigned char dato){
972// Trasmissione di 1 byte via SPI
973 LPC_SPI->SPDR=dato; // Viene trasmesso il dato
974 while (!((LPC_SPI->SPSR & 0x80) == 0x80)){} // Si attende che il flag SPIF si alzi
975 dato=LPC_SPI->SPSR; // Dummy op per azzerare lo status reg
976 dato=LPC_SPI->SPDR; // Dummy op necessaria
977}
void SPItx(unsigned char dato)
This is a blocking function that transmits one byte over the SPI.
Definition: Adc.c:971

Definition at line 971 of file Adc.c.