| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- File List
- File Members

erpc_dspi_master_transport.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014-2016, Freescale Semiconductor, Inc.
3 * Copyright 2016 NXP
4 * All rights reserved.
5 *
6 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 */
9
10 #ifndef _EMBEDDED_RPC__DSPI_MASTER_TRANSPORT_H_
11 #define _EMBEDDED_RPC__DSPI_MASTER_TRANSPORT_H_
12
13 #include "erpc_framed_transport.h"
14
15 #include "fsl_dspi.h"
16
17 #include <stdlib.h>
18
25 // Classes
28
29 namespace erpc {
35 class DspiMasterTransport : public FramedTransport
36 {
37 public:
45 DspiMasterTransport(SPI_Type *spiBaseAddr, uint32_t baudRate, uint32_t srcClock_Hz);
46
50 virtual ~DspiMasterTransport(void);
51
57 virtual erpc_status_t init(void);
58
59 protected:
60 SPI_Type *m_spiBaseAddr;
61 uint32_t m_baudRate;
62 uint32_t m_srcClock_Hz;
64 private:
74 virtual erpc_status_t underlyingReceive(uint8_t *data, uint32_t size);
75
85 virtual erpc_status_t underlyingSend(const uint8_t *data, uint32_t size);
86 };
87
88 } // namespace erpc
89
92 #endif // _EMBEDDED_RPC__DSPI_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::DspiMasterTransport::init
virtual erpc_status_t init(void)
Initialize DSPI peripheral configuration structure with values specified in DspiTransport constructor...
Definition: erpc_dspi_master_transport.cpp:115
erpc::DspiMasterTransport::m_srcClock_Hz
uint32_t m_srcClock_Hz
Definition: erpc_dspi_master_transport.h:62
erpc::DspiMasterTransport::DspiMasterTransport
DspiMasterTransport(SPI_Type *spiBaseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
Constructor.
Definition: erpc_dspi_master_transport.cpp:103
erpc::DspiMasterTransport::m_spiBaseAddr
SPI_Type * m_spiBaseAddr
Definition: erpc_dspi_master_transport.h:60
erpc::DspiMasterTransport::~DspiMasterTransport
virtual ~DspiMasterTransport(void)
Destructor.
Definition: erpc_dspi_master_transport.cpp:110
erpc
Definition: erpc_arbitrated_client_manager.h:25
erpc::DspiMasterTransport
Very basic transport to send/receive messages via DSPI.
Definition: erpc_dspi_master_transport.h:35
erpc::DspiMasterTransport::m_baudRate
uint32_t m_baudRate
Definition: erpc_dspi_master_transport.h:61