eRPC API Reference
Rev. 1.12.0
NXP Semiconductors
|
Very basic transport to send/receive messages via SPIdev. More...
#include <erpc_spidev_master_transport.hpp>
Public Member Functions | |
SpidevMasterTransport (const char *spidev, uint32_t speed_Hz) | |
Constructor. More... | |
virtual | ~SpidevMasterTransport (void) |
Destructor. | |
erpc_status_t | init (void) |
Initialize SPI peripheral. More... | |
Public Member Functions inherited from erpc::FramedTransport | |
FramedTransport (void) | |
Constructor. | |
virtual | ~FramedTransport (void) |
FramedTransport destructor. | |
virtual uint8_t | reserveHeaderSize (void) override |
Size of data placed in MessageBuffer before serializing eRPC data. More... | |
virtual erpc_status_t | receive (MessageBuffer *message) override |
Receives an entire message. More... | |
virtual erpc_status_t | send (MessageBuffer *message) override |
Function to send prepared message. More... | |
virtual void | setCrc16 (Crc16 *crcImpl) override |
This functions sets the CRC-16 implementation. More... | |
virtual Crc16 * | getCrc16 (void) override |
This functions gets the CRC-16 object. More... | |
Public Member Functions inherited from erpc::Transport | |
Transport (void) | |
Constructor. | |
virtual | ~Transport (void) |
Transport destructor. | |
virtual bool | hasMessage (void) |
Poll for an incoming message. More... | |
Protected Attributes | |
int | m_spidevHandle |
const char * | m_spidev |
uint32_t | m_speed_Hz |
Protected Attributes inherited from erpc::FramedTransport | |
Crc16 * | m_crcImpl |
Mutex | m_sendLock |
Mutex protecting send. | |
Mutex | m_receiveLock |
Mutex protecting receive. | |
Additional Inherited Members | |
Protected Member Functions inherited from erpc::FramedTransport | |
virtual erpc_status_t | underlyingSend (MessageBuffer *message, uint32_t size, uint32_t offset) |
Adds ability to framed transport to overwrite MessageBuffer when sending data. More... | |
virtual erpc_status_t | underlyingReceive (MessageBuffer *message, uint32_t size, uint32_t offset) |
Adds ability to framed transport to overwrite MessageBuffer when receiving data. More... | |
Very basic transport to send/receive messages via SPIdev.
SpidevMasterTransport::SpidevMasterTransport | ( | const char * | spidev, |
uint32_t | speed_Hz | ||
) |
Constructor.
[in] | spidev | SPI device name. |
[in] | speed_Hz | SPI clock speed in Hz. |
erpc_status_t SpidevMasterTransport::init | ( | void | ) |
Initialize SPI peripheral.
|
protected |
SPI handle id.
|
protected |
SPI device name.
|
protected |
SPI clock speed in Hz.