text: /*
   * Copyright (c) 2020 SeeedStudio.
   * All rights reserved.
   *
   *
   * SPDX-License-Identifier: BSD-3-Clause
   */
  
  #include "erpc_manually_constructed.h"
  #include "erpc_arduino_uart_transport.h"
  #include "erpc_transport_setup.h"
  
  using namespace erpc;
  
  ////////////////////////////////////////////////////////////////////////////////
  // Variables
  ////////////////////////////////////////////////////////////////////////////////
  
  static ManuallyConstructed<UartTransport> s_transport;
  
  ////////////////////////////////////////////////////////////////////////////////
  // Code
  ////////////////////////////////////////////////////////////////////////////////
  erpc_transport_t erpc_transport_uart_init(HardwareSerial *port, unsigned long baudrate)
  {
      s_transport.construct(port, baudrate);
      if (s_transport->init() == kErpcStatus_Success)
      {
          return reinterpret_cast<erpc_transport_t>(s_transport.get());
      }
      return NULL;
  }
  
  void erpc_transport_uart_deinit(void)
  {
      return;
  }
  