Skip to content

Commit

Permalink
eRPC updates 07/2023
Browse files Browse the repository at this point in the history
-- LPI2C, LPSPI transports added
-- Use MU_SendMsg blocking call in MU transport
-- Increased the StaticQueue in rpmsg_lite_transport - could be 2U * ERPC_DEFAULT_BUFFERS_COUNT for zero copy cases
-- Aligned UartTransport::init in erpc_uart_cmsis_transport.cpp to changes in driver that removes ARM_USART_CONTROL_TX/ARM_USART_CONTROL_RX controls
-- Aligned retarget_cpp_streamed_io.c to latest used MDK 5.38a version
-- Avoid using argc and argv main function parameters in erpc Googletest based projects
  • Loading branch information
MichalPrincNXP committed Jul 17, 2023
1 parent e8e2e63 commit 5cac701
Show file tree
Hide file tree
Showing 24 changed files with 848 additions and 104 deletions.
2 changes: 1 addition & 1 deletion doxygen/Doxyfile.erpc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "eRPC API Reference"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Rev. 1.10.0"
PROJECT_NUMBER = "Rev. 1.11.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile.erpcgen
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "eRPC Generator (erpcgen)"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Rev. 1.10.0"
PROJECT_NUMBER = "Rev. 1.11.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 3 additions & 3 deletions erpc_c/infra/erpc_version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright 2016-2022 NXP
* Copyright 2016-2023 NXP
* All rights reserved.
*
*
Expand All @@ -20,9 +20,9 @@
////////////////////////////////////////////////////////////////////////////////

//! @brief String version of eRPC.
#define ERPC_VERSION "1.10.0"
#define ERPC_VERSION "1.11.0"
//! @brief Integer version of eRPC.
#define ERPC_VERSION_NUMBER 11000
#define ERPC_VERSION_NUMBER 11100

/*! @} */

Expand Down
30 changes: 30 additions & 0 deletions erpc_c/setup/erpc_setup_lpi2c_slave.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2022-2023 NXP
* All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include "erpc_lpi2c_slave_transport.hpp"
#include "erpc_manually_constructed.hpp"
#include "erpc_transport_setup.h"

using namespace erpc;

////////////////////////////////////////////////////////////////////////////////
// Variables
////////////////////////////////////////////////////////////////////////////////

static ManuallyConstructed<LPI2cSlaveTransport> s_transport;

////////////////////////////////////////////////////////////////////////////////
// Code
////////////////////////////////////////////////////////////////////////////////

erpc_transport_t erpc_transport_lpi2c_slave_init(void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
{
s_transport.construct(reinterpret_cast<LPI2C_Type *>(baseAddr), baudRate, srcClock_Hz);
(void)s_transport->init();
return reinterpret_cast<erpc_transport_t>(s_transport.get());
}
28 changes: 28 additions & 0 deletions erpc_c/setup/erpc_setup_lpspi_slave.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2022-2023 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include "erpc_lpspi_slave_transport.hpp"
#include "erpc_manually_constructed.hpp"
#include "erpc_transport_setup.h"

using namespace erpc;

////////////////////////////////////////////////////////////////////////////////
// Variables
////////////////////////////////////////////////////////////////////////////////

ERPC_MANUALLY_CONSTRUCTED(LPSpiSlaveTransport, s_transport);

////////////////////////////////////////////////////////////////////////////////
// Code
////////////////////////////////////////////////////////////////////////////////

erpc_transport_t erpc_transport_lpspi_slave_init(void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
{
s_transport.construct(reinterpret_cast<LPSPI_Type *>(baseAddr), baudRate, srcClock_Hz);
(void)s_transport->init();
return reinterpret_cast<erpc_transport_t>(s_transport.get());
}
36 changes: 35 additions & 1 deletion erpc_c/setup/erpc_transport_setup.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2016, Freescale Semiconductor, Inc.
* Copyright 2016-2021 NXP
* Copyright 2016-2022 NXP
* Copyright 2019 ACRIOS Systems s.r.o.
* All rights reserved.
*
Expand Down Expand Up @@ -132,6 +132,23 @@ erpc_transport_t erpc_transport_dspi_master_init(void *baseAddr, uint32_t baudRa
erpc_transport_t erpc_transport_dspi_slave_init(void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz);
//@}

//! @name LPSPI transport setup
//@{

/*!
* @brief Create a LPSPI slave transport.
*
* Create LPSPI slave transport instance, to be used at slave core.
*
* @param[in] baseAddr Base address of LPSPI peripheral used in this transport layer.
* @param[in] baudRate LPSPI baud rate.
* @param[in] srcClock_Hz LPSPI source clock in Hz.
*
* @return Return NULL or erpc_transport_t instance pointer.
*/
erpc_transport_t erpc_transport_lpspi_slave_init(void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz);
//@}

//! @name SPIdev transport setup
//@{

Expand Down Expand Up @@ -373,6 +390,23 @@ erpc_transport_t erpc_transport_usb_cdc_init(void *serialHandle, void *serialCon
erpc_transport_t erpc_transport_i2c_slave_init(void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz);
//@}

//! @name LPI2C transport setup
//@{

/*!
* @brief Create an LPI2C slave transport.
*
* Create LPI2C slave transport instance, to be used at slave core.
*
* @param[in] baseAddr Base address of LPI2C peripheral used in this transport layer.
* @param[in] baudRate SPI baud rate.
* @param[in] srcClock_Hz LPI2C source clock in Hz.
*
* @return Return NULL or erpc_transport_t instance pointer.
*/
erpc_transport_t erpc_transport_lpi2c_slave_init(void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz);
//@}

//@}

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions erpc_c/transports/erpc_i2c_slave_transport.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 NXP
* Copyright 2021-2023 NXP
* All rights reserved.
*
*
Expand All @@ -9,7 +9,7 @@
#ifndef _EMBEDDED_RPC__I2C_SLAVE_TRANSPORT_H_
#define _EMBEDDED_RPC__I2C_SLAVE_TRANSPORT_H_

#include "<cstdlib>"
#include <cstdlib>
#include "erpc_config_internal.h"
#if ERPC_THREADS
#include "erpc_threading.h"
Expand Down
Loading

0 comments on commit 5cac701

Please sign in to comment.