| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- File List
- File Members

erpc_spidev_master_transport.h
Go to the documentation of this file.
1 /*
2 * Copyright 2020 NXP
3 * All rights reserved.
4 *
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9 #ifndef _EMBEDDED_RPC__SPIDEV_MASTER_TRANSPORT_H_
10 #define _EMBEDDED_RPC__SPIDEV_MASTER_TRANSPORT_H_
11
12 #include "erpc_framed_transport.h"
13
20 // Classes
23
24 namespace erpc {
30 class SpidevMasterTransport : public FramedTransport
31 {
32 public:
39 SpidevMasterTransport(const char *spidev, uint32_t speed_Hz);
40
44 virtual ~SpidevMasterTransport(void);
45
51 erpc_status_t init(void);
52
53 protected:
54 int m_spidevHandle;
55 const char *m_spidev;
56 uint32_t m_speed_Hz;
58 private:
68 virtual erpc_status_t underlyingReceive(uint8_t *data, uint32_t size);
69
79 virtual erpc_status_t underlyingSend(const uint8_t *data, uint32_t size);
80 };
81
82 } // namespace erpc
83
86 #endif // _EMBEDDED_RPC__SPIDEV_MASTER_TRANSPORT_H_
erpc::FramedTransport
Base class for framed transport layers.
Definition: erpc_framed_transport.h:56
erpc_status_t
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:87
erpc_framed_transport.h
erpc::SpidevMasterTransport::m_spidev
const char * m_spidev
Definition: erpc_spidev_master_transport.h:55
erpc
Definition: erpc_arbitrated_client_manager.h:25
erpc::SpidevMasterTransport::SpidevMasterTransport
SpidevMasterTransport(const char *spidev, uint32_t speed_Hz)
Constructor.
Definition: erpc_spidev_master_transport.cpp:85
erpc::SpidevMasterTransport::~SpidevMasterTransport
virtual ~SpidevMasterTransport(void)
Destructor.
Definition: erpc_spidev_master_transport.cpp:92
erpc::SpidevMasterTransport::m_spidevHandle
int m_spidevHandle
Definition: erpc_spidev_master_transport.h:54
erpc::SpidevMasterTransport::m_speed_Hz
uint32_t m_speed_Hz
Definition: erpc_spidev_master_transport.h:56
erpc::SpidevMasterTransport::init
erpc_status_t init(void)
Initialize SPI peripheral.
Definition: erpc_spidev_master_transport.cpp:107
erpc::SpidevMasterTransport
Very basic transport to send/receive messages via SPIdev.
Definition: erpc_spidev_master_transport.h:30