Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
mbed_async_usbserial.cxx File Reference
#include "mbed.h"
#include "USBSerial.h"
#include "Serial.hxx"
#include "os/os.h"
#include "utils/macros.h"
#include "portmacro.h"
#include "utils/Atomic.hxx"
#include "executor/Notifiable.hxx"
#include <stdlib.h>

Go to the source code of this file.

Classes

class  MbedAsyncUSBSerial
 This class is an empty wrapper around MBed's USB CDC class. More...
 

Macros

#define TX_DATA_SIZE   64
 Number of bytes in the send buffer.
 
#define RX_DATA_SIZE   64
 Number of bytes in the receive buffer.
 

Functions

void * operator new (size_t size)
 C++ operator (not sure why this is needed).
 
void * operator new[] (size_t size)
 C++ operator (not sure why this is needed).
 
void operator delete (void *ptr)
 C++ operator (not sure why this is needed).
 
void operator delete[] (void *ptr)
 C++ operator (not sure why this is needed).
 
int __cxa_guard_acquire (__guard *)
 C++ operator (not sure why this is needed).
 
void __cxa_guard_release (__guard *)
 C++ operator (not sure why this is needed).
 
void __cxa_guard_abort (__guard *)
 C++ operator (not sure why this is needed).
 
void __cxa_pure_virtual (void)
 C++ operator (not sure why this is needed).
 

Variables

__extension__ typedef int __guard
 not sure why this is needed.
 
static Atomic critical_lock
 Mutex for the USB-serial object.
 
MbedAsyncUSBSerial g_mbed_usb_serial ("/dev/serUSB0")
 Global object for the mbed usb serial.
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file implements an USB-Serial driver on top of the mbed library. Currently it is tested on the LPC23xx and LPC17xx processors.

Author
Balazs Racz
Date
4 May 2013

Definition in file mbed_async_usbserial.cxx.

Macro Definition Documentation

◆ RX_DATA_SIZE

#define RX_DATA_SIZE   64

Number of bytes in the receive buffer.

Definition at line 50 of file mbed_async_usbserial.cxx.

◆ TX_DATA_SIZE

#define TX_DATA_SIZE   64

Number of bytes in the send buffer.

Definition at line 48 of file mbed_async_usbserial.cxx.

Function Documentation

◆ __cxa_guard_abort()

void __cxa_guard_abort ( __guard )

C++ operator (not sure why this is needed).

Definition at line 379 of file mbed_async_usbserial.cxx.

◆ __cxa_guard_acquire()

int __cxa_guard_acquire ( __guard g)

C++ operator (not sure why this is needed).

Definition at line 371 of file mbed_async_usbserial.cxx.

◆ __cxa_guard_release()

void __cxa_guard_release ( __guard g)

C++ operator (not sure why this is needed).

Definition at line 375 of file mbed_async_usbserial.cxx.

◆ __cxa_pure_virtual()

void __cxa_pure_virtual ( void  )

C++ operator (not sure why this is needed).

Definition at line 381 of file mbed_async_usbserial.cxx.

◆ operator delete()

void operator delete ( void *  ptr)

C++ operator (not sure why this is needed).

Definition at line 365 of file mbed_async_usbserial.cxx.

◆ operator delete[]()

void operator delete[] ( void *  ptr)

C++ operator (not sure why this is needed).

Definition at line 370 of file mbed_async_usbserial.cxx.

◆ operator new()

void * operator new ( size_t  size)

C++ operator (not sure why this is needed).

Definition at line 358 of file mbed_async_usbserial.cxx.

◆ operator new[]()

void * operator new[] ( size_t  size)

C++ operator (not sure why this is needed).

Definition at line 363 of file mbed_async_usbserial.cxx.

Variable Documentation

◆ __guard

__extension__ typedef int __guard

not sure why this is needed.

Definition at line 64 of file mbed_async_usbserial.cxx.

◆ critical_lock

Atomic critical_lock
static

Mutex for the USB-serial object.

Definition at line 76 of file mbed_async_usbserial.cxx.