PIC24 Support Libraries
Files | Macros
ESOS_SPI_Service

Files

file  esos_pic24_spi.h
 
file  esos_pic24_spi.c
 

Macros

#define ESOS_TASK_WAIT_ON_WRITE1SPI1(u16_d1)
 
#define ESOS_TASK_WAIT_ON_WRITE2SPI1(u16_d1, u16_d2)
 
#define ESOS_TASK_WAIT_ON_WRITENSPI1(pu16_out, u16_cnt)
 
#define ESOS_TASK_WAIT_ON_XFERNSPI1(pu16_out, pu16_in, u16_cnt)
 
#define ESOS_TASK_WAIT_ON_READ1SPI1(u16_d1)
 
#define ESOS_TASK_WAIT_ON_READ2SPI1(u16_d1, u16_d2)
 
#define ESOS_TASK_WAIT_ON_READNSPI1(pu16_in, u16_cnt)
 

Detailed Description

Macro Definition Documentation

◆ ESOS_TASK_WAIT_ON_READ1SPI1

#define ESOS_TASK_WAIT_ON_READ1SPI1 (   u16_d1)

Transaction: Read 1 (ONE) "word" from SPI device and stores result in variable u16_d1

Parameters
u16_d1Variable containing word (byte or 16-bits) to hold read results
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
This routine writes ZEROES to SPI device during reads
See also
ESOS_TASK_WAIT_ON_READ2SPI1
ESOS_TASK_WAIT_ON_READNSPI1
ESOS_TASK_WAIT_ON_XFERNSPI1

Definition at line 247 of file esos_pic24_spi.h.

◆ ESOS_TASK_WAIT_ON_READ2SPI1

#define ESOS_TASK_WAIT_ON_READ2SPI1 (   u16_d1,
  u16_d2 
)

Transaction: Read 2 (TWO) "words" (bytes or 16-bits) from SPI device. Stores results in variables u16_d1 and u16_d2

Parameters
u16_d1Variable containing first word/byte read
u16_d2Variable containing second word/byte read
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
This routine writes ZEROES to SPI device during reads
See also
ESOS_TASK_WAIT_ON_READ1SPI1
ESOS_TASK_WAIT_ON_READNSPI1
ESOS_TASK_WAIT_ON_XFERNSPI1

Definition at line 265 of file esos_pic24_spi.h.

◆ ESOS_TASK_WAIT_ON_READNSPI1

#define ESOS_TASK_WAIT_ON_READNSPI1 (   pu16_in,
  u16_cnt 
)

Transaction: Reads u16_cnt "words" (bytes or 16-bits) from SPI device. Results are written to buffer pointed to by pu16_d

Parameters
pu16_inPointer to buffer to catch read results
u16_cntNumber of bytes to read
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
This routine writes ZEROES to SPI device during reads
See also
ESOS_TASK_WAIT_ON_READ1SPI1
ESOS_TASK_WAIT_ON_READ2SPI1
ESOS_TASK_WAIT_ON_XFERNSPI1

Definition at line 284 of file esos_pic24_spi.h.

◆ ESOS_TASK_WAIT_ON_WRITE1SPI1

#define ESOS_TASK_WAIT_ON_WRITE1SPI1 (   u16_d1)

Transaction: Write 1 (ONE) "word" stored in variable u16_d1 to SPI device.

Parameters
u16_d1Variable containing word (byte or 16-bits) to write
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
See also
ESOS_TASK_WAIT_ON_WRITE2SPI1
ESOS_TASK_WAIT_ON_WRITENSPI1
ESOS_TASK_WAIT_ON_XFERNSPI1

Definition at line 174 of file esos_pic24_spi.h.

◆ ESOS_TASK_WAIT_ON_WRITE2SPI1

#define ESOS_TASK_WAIT_ON_WRITE2SPI1 (   u16_d1,
  u16_d2 
)

Transaction: Write 2 (TWO) "words" (bytes or 16-bits) stored in variables u16_d1 and u16_d2 to SPI device.

Parameters
u16_d1Variable containing first byte to write
u16_d2Variable containing second byte to write
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
See also
ESOS_TASK_WAIT_ON_WRITE1SPI1
ESOS_TASK_WAIT_ON_WRITENSPI1
ESOS_TASK_WAIT_ON_XFERNSPI1

Definition at line 196 of file esos_pic24_spi.h.

◆ ESOS_TASK_WAIT_ON_WRITENSPI1

#define ESOS_TASK_WAIT_ON_WRITENSPI1 (   pu16_out,
  u16_cnt 
)

Transaction: Write u16_cnt "words" (bytes or 16-bits) to SPI device

Parameters
pu16_outPointer to buffer containing words to send
u16_cntNumber of bytes to send
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
See also
ESOS_TASK_WAIT_ON_WRITE1SPI1
ESOS_TASK_WAIT_ON_WRITE2SPI1
ESOS_TASK_WAIT_ON_XFERNSPI1

Definition at line 214 of file esos_pic24_spi.h.

◆ ESOS_TASK_WAIT_ON_XFERNSPI1

#define ESOS_TASK_WAIT_ON_XFERNSPI1 (   pu16_out,
  pu16_in,
  u16_cnt 
)

Transaction: Transfer (Read and write SPI simultaneously) u16_cnt "words" (bytes or 16-bits) to SPI device

Parameters
pu16_outPointer to buffer containing words to send
pu16_inPointer to buffer to catch incoming words
u16_cntNumber of bytes to send
Note
Assumes SPI peripheral has been properly configured.
SPI peripheral configuration determines whether 8 or 16 bits are written.
Assumes that both incoming and outgoing buffers are properly sized and available.
See also
ESOS_TASK_WAIT_ON_WRITE1SPI1
ESOS_TASK_WAIT_ON_WRITE2SPI1
ESOS_TASK_WAIT_ON_WRITENSPI1
ESOS_TASK_WAIT_ON_READ1SPI1
ESOS_TASK_WAIT_ON_READ2SPI1
ESOS_TASK_WAIT_ON_READNSPI1

Definition at line 233 of file esos_pic24_spi.h.