From 42c8cb280666c7326b1e2381d328acf65d1189a5 Mon Sep 17 00:00:00 2001 From: Cervenka Dusan Date: Tue, 24 Oct 2023 14:41:17 +0200 Subject: [PATCH] Use using keyword to fix warnings Signed-off-by: Cervenka Dusan --- .../transports/erpc_dspi_master_transport.hpp | 3 +++ .../transports/erpc_dspi_slave_transport.hpp | 3 +++ .../transports/erpc_i2c_slave_transport.hpp | 3 +++ .../transports/erpc_lpi2c_slave_transport.hpp | 3 +++ .../transports/erpc_lpspi_slave_transport.hpp | 3 +++ .../erpc_rpmsg_tty_rtos_transport.hpp | 11 +++++++---- erpc_c/transports/erpc_serial_transport.hpp | 19 +++++++++++-------- .../transports/erpc_spi_master_transport.hpp | 3 +++ .../transports/erpc_spi_slave_transport.hpp | 3 +++ .../erpc_spidev_master_transport.hpp | 3 +++ erpc_c/transports/erpc_tcp_transport.hpp | 4 ++++ .../transports/erpc_uart_cmsis_transport.hpp | 3 +++ erpc_c/transports/erpc_usb_cdc_transport.hpp | 3 +++ 13 files changed, 52 insertions(+), 12 deletions(-) diff --git a/erpc_c/transports/erpc_dspi_master_transport.hpp b/erpc_c/transports/erpc_dspi_master_transport.hpp index 629fdd82..108a0d42 100644 --- a/erpc_c/transports/erpc_dspi_master_transport.hpp +++ b/erpc_c/transports/erpc_dspi_master_transport.hpp @@ -63,6 +63,9 @@ class DspiMasterTransport : public FramedTransport uint32_t m_srcClock_Hz; /*!< Source clock of DSPI peripheral used in this transport layer */ private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from DSPI peripheral. * diff --git a/erpc_c/transports/erpc_dspi_slave_transport.hpp b/erpc_c/transports/erpc_dspi_slave_transport.hpp index 27dbf0a2..65cc214d 100644 --- a/erpc_c/transports/erpc_dspi_slave_transport.hpp +++ b/erpc_c/transports/erpc_dspi_slave_transport.hpp @@ -78,6 +78,9 @@ class DspiSlaveTransport : public FramedTransport #endif private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from DSPI peripheral. * diff --git a/erpc_c/transports/erpc_i2c_slave_transport.hpp b/erpc_c/transports/erpc_i2c_slave_transport.hpp index 84b67edd..6cd23287 100644 --- a/erpc_c/transports/erpc_i2c_slave_transport.hpp +++ b/erpc_c/transports/erpc_i2c_slave_transport.hpp @@ -78,6 +78,9 @@ class I2cSlaveTransport : public FramedTransport #endif private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from I2C peripheral. * diff --git a/erpc_c/transports/erpc_lpi2c_slave_transport.hpp b/erpc_c/transports/erpc_lpi2c_slave_transport.hpp index b047daef..53ab6c9a 100644 --- a/erpc_c/transports/erpc_lpi2c_slave_transport.hpp +++ b/erpc_c/transports/erpc_lpi2c_slave_transport.hpp @@ -77,6 +77,9 @@ class LPI2cSlaveTransport : public FramedTransport #endif private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from LPI2C peripheral. * diff --git a/erpc_c/transports/erpc_lpspi_slave_transport.hpp b/erpc_c/transports/erpc_lpspi_slave_transport.hpp index e7a12000..8e0bd40f 100644 --- a/erpc_c/transports/erpc_lpspi_slave_transport.hpp +++ b/erpc_c/transports/erpc_lpspi_slave_transport.hpp @@ -78,6 +78,9 @@ class LPSpiSlaveTransport : public FramedTransport #endif private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from LPSPI peripheral. * diff --git a/erpc_c/transports/erpc_rpmsg_tty_rtos_transport.hpp b/erpc_c/transports/erpc_rpmsg_tty_rtos_transport.hpp index 03308164..5d97ae49 100644 --- a/erpc_c/transports/erpc_rpmsg_tty_rtos_transport.hpp +++ b/erpc_c/transports/erpc_rpmsg_tty_rtos_transport.hpp @@ -100,8 +100,11 @@ class RPMsgTTYRTOSTransport : public FramedTransport, public RPMsgBase rpmsg_queue_handle m_rpmsg_queue; /*!< Handle of RPMsg queue. */ struct rpmsg_lite_endpoint *m_rpmsg_ept; /*!< Pointer to RPMsg Lite Endpoint structure. */ + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! - * @brief Adds ability to framed transport to overwrite MessageBuffer when sending data. + * @brief Adds ability to framed transport to overwrite MessageBuffer when receiving data. * * Usually we don't want to do that. * @@ -111,10 +114,10 @@ class RPMsgTTYRTOSTransport : public FramedTransport, public RPMsgBase * * @return erpc_status_t kErpcStatus_Success when it finished successful otherwise error. */ - virtual erpc_status_t underlyingSend(MessageBuffer *message, uint32_t size, uint32_t offset) override; + virtual erpc_status_t underlyingReceive(MessageBuffer *message, uint32_t size, uint32_t offset) override; /*! - * @brief Adds ability to framed transport to overwrite MessageBuffer when receiving data. + * @brief Adds ability to framed transport to overwrite MessageBuffer when sending data. * * Usually we don't want to do that. * @@ -124,7 +127,7 @@ class RPMsgTTYRTOSTransport : public FramedTransport, public RPMsgBase * * @return erpc_status_t kErpcStatus_Success when it finished successful otherwise error. */ - virtual erpc_status_t underlyingReceive(MessageBuffer *message, uint32_t size, uint32_t offset) override; + virtual erpc_status_t underlyingSend(MessageBuffer *message, uint32_t size, uint32_t offset) override; /*! * @brief This function read data. diff --git a/erpc_c/transports/erpc_serial_transport.hpp b/erpc_c/transports/erpc_serial_transport.hpp index f9fc75a0..6b41ae11 100644 --- a/erpc_c/transports/erpc_serial_transport.hpp +++ b/erpc_c/transports/erpc_serial_transport.hpp @@ -65,27 +65,30 @@ class SerialTransport : public FramedTransport erpc_status_t init(uint8_t vtime, uint8_t vmin); private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! - * @brief Write data to Serial peripheral. + * @brief Receive data from Serial peripheral. * - * @param[in] data Buffer to send. - * @param[in] size Size of data to send. + * @param[inout] data Preallocated buffer for receiving data. + * @param[in] size Size of data to read. * * @retval kErpcStatus_ReceiveFailed Serial failed to receive data. * @retval kErpcStatus_Success Successfully received all data. */ - virtual erpc_status_t underlyingSend(const uint8_t *data, uint32_t size) override; + virtual erpc_status_t underlyingReceive(uint8_t *data, uint32_t size) override; /*! - * @brief Receive data from Serial peripheral. + * @brief Write data to Serial peripheral. * - * @param[inout] data Preallocated buffer for receiving data. - * @param[in] size Size of data to read. + * @param[in] data Buffer to send. + * @param[in] size Size of data to send. * * @retval kErpcStatus_ReceiveFailed Serial failed to receive data. * @retval kErpcStatus_Success Successfully received all data. */ - virtual erpc_status_t underlyingReceive(uint8_t *data, uint32_t size) override; + virtual erpc_status_t underlyingSend(const uint8_t *data, uint32_t size) override; private: int m_serialHandle; /*!< Serial handle id. */ diff --git a/erpc_c/transports/erpc_spi_master_transport.hpp b/erpc_c/transports/erpc_spi_master_transport.hpp index ea2650f8..e2de9bae 100644 --- a/erpc_c/transports/erpc_spi_master_transport.hpp +++ b/erpc_c/transports/erpc_spi_master_transport.hpp @@ -65,6 +65,9 @@ class SpiMasterTransport : public FramedTransport uint32_t m_srcClock_Hz; /*!< Source clock of SPI peripheral used in this transport layer */ private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from SPI peripheral. * diff --git a/erpc_c/transports/erpc_spi_slave_transport.hpp b/erpc_c/transports/erpc_spi_slave_transport.hpp index 3559bbc4..865cb2b9 100644 --- a/erpc_c/transports/erpc_spi_slave_transport.hpp +++ b/erpc_c/transports/erpc_spi_slave_transport.hpp @@ -79,6 +79,9 @@ class SpiSlaveTransport : public FramedTransport #endif private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from SPI peripheral. * diff --git a/erpc_c/transports/erpc_spidev_master_transport.hpp b/erpc_c/transports/erpc_spidev_master_transport.hpp index 84ca26b0..354af858 100644 --- a/erpc_c/transports/erpc_spidev_master_transport.hpp +++ b/erpc_c/transports/erpc_spidev_master_transport.hpp @@ -56,6 +56,9 @@ class SpidevMasterTransport : public FramedTransport uint32_t m_speed_Hz; /*!< SPI clock speed in Hz. */ private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from SPI peripheral. * diff --git a/erpc_c/transports/erpc_tcp_transport.hpp b/erpc_c/transports/erpc_tcp_transport.hpp index af2c660b..1e171fbf 100644 --- a/erpc_c/transports/erpc_tcp_transport.hpp +++ b/erpc_c/transports/erpc_tcp_transport.hpp @@ -97,6 +97,10 @@ class TCPTransport : public FramedTransport Thread m_serverThread; /*!< Pointer to server thread. */ bool m_runServer; /*!< Thread is executed while this is true. */ + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + + /*! * @brief This function connect client to the server. * diff --git a/erpc_c/transports/erpc_uart_cmsis_transport.hpp b/erpc_c/transports/erpc_uart_cmsis_transport.hpp index d36a5b85..04fb5751 100644 --- a/erpc_c/transports/erpc_uart_cmsis_transport.hpp +++ b/erpc_c/transports/erpc_uart_cmsis_transport.hpp @@ -83,6 +83,9 @@ class UartTransport : public FramedTransport Semaphore m_txSemaphore; /*!< Semaphore used by RTOS to block task until the sending is not complete */ #endif private: + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from UART peripheral. * diff --git a/erpc_c/transports/erpc_usb_cdc_transport.hpp b/erpc_c/transports/erpc_usb_cdc_transport.hpp index c712975a..ccd7b5ab 100644 --- a/erpc_c/transports/erpc_usb_cdc_transport.hpp +++ b/erpc_c/transports/erpc_usb_cdc_transport.hpp @@ -96,6 +96,9 @@ class UsbCdcTransport : public FramedTransport uint8_t *m_usbRingBuffer; uint32_t m_usbRingBufferLength; + using FramedTransport::underlyingReceive; + using FramedTransport::underlyingSend; + /*! * @brief Receive data from USB CDC peripheral. *