| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
erpc::SpidevMasterTransport Class Reference
Transport Layers » SPIdev Linux Master

Very basic transport to send/receive messages via SPIdev. More...

`#include <erpc_spidev_master_transport.h>`

Inheritance diagram for erpc::SpidevMasterTransport:
[legend]
Collaboration diagram for erpc::SpidevMasterTransport:
[legend]

## 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)
| Codec destructor.
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...
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

## Detailed Description

Very basic transport to send/receive messages via SPIdev.

## Constructor & Destructor Documentation

SpidevMasterTransport::SpidevMasterTransport | ( | const char * | spidev,
|  | uint32_t | speed_Hz
| ) |  |

Constructor.

Parameters

  [in] | spidev | SPI device name.
  [in] | speed_Hz | SPI clock speed in Hz.

## Member Function Documentation

erpc_status_t SpidevMasterTransport::init | ( | void |  | ) |

Initialize SPI peripheral.

Returns
  Status of init function.

## Member Data Documentation

int erpc::SpidevMasterTransport::m_spidevHandle
| protected

SPI handle id.

const char* erpc::SpidevMasterTransport::m_spidev
| protected

SPI device name.

uint32_t erpc::SpidevMasterTransport::m_speed_Hz
| protected

SPI clock speed in Hz.

The documentation for this class was generated from the following files:

- erpc_spidev_master_transport.h
- erpc_spidev_master_transport.cpp