|
Open Model Railroad Network (OpenMRN)
|
#include <algorithm>#include <cstdint>#include <fcntl.h>#include <sys/select.h>#include "inc/hw_types.h"#include "inc/hw_memmap.h"#include "inc/hw_ints.h"#include "driverlib/rom.h"#include "driverlib/rom_map.h"#include "usblib/usblib.h"#include "usblib/usbcdc.h"#include "usblib/usb-ids.h"#include "usblib/device/usbdevice.h"#include "usblib/device/usbdcdc.h"#include "TivaDev.hxx"Go to the source code of this file.
Macros | |
| #define | gcc |
| not sure why this is needed | |
| #define | TIVA_USB_PACKET_SIZE 64 |
| This is fixed and equals the USB packet size that the CDC device will advertise to be able to receive. | |
| #define | TIVA_USB_BUFFER_SIZE (TIVA_USB_PACKET_SIZE * 4) |
| This is the size of the RX buffer in bytes. | |
| #define | NUM_STRING_DESCRIPTORS (sizeof(stringDescriptors) / sizeof(uint8_t *)) |
| number of string descriptors | |
Functions | |
| void | usb0_interrupt_handler (void) |
| Handle interrupts for USB0. | |
Variables | |
| const uint8_t | langDescriptor [] |
| The languages supported by this device. | |
| const uint8_t | manufacturerString [] |
| The manufacturur string. | |
| const uint8_t | productString [] |
| The product string. | |
| const uint8_t | serialNumberString [] |
| The serial number string. | |
| const uint8_t | controlInterfaceString [] |
| The configuration interface description string. | |
| const uint8_t | configString [] |
| The configuration description string. | |
| const uint8_t *const | stringDescriptors [] |
| The descriptor string table. | |
| static TivaCdc * | instances [1] = {NULL} |
| Instance pointers help us get context from the interrupt handler(s) | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
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 a USB CDC device driver layer specific to TivaWare.
Definition in file TivaUsbCdcDevice.cxx.
| #define gcc |
not sure why this is needed
Definition at line 36 of file TivaUsbCdcDevice.cxx.
| #define NUM_STRING_DESCRIPTORS (sizeof(stringDescriptors) / sizeof(uint8_t *)) |
number of string descriptors
Definition at line 142 of file TivaUsbCdcDevice.cxx.
| #define TIVA_USB_BUFFER_SIZE (TIVA_USB_PACKET_SIZE * 4) |
This is the size of the RX buffer in bytes.
This is a performance parameter and larger values will result in higher max throughput.
Definition at line 66 of file TivaUsbCdcDevice.cxx.
| #define TIVA_USB_PACKET_SIZE 64 |
This is fixed and equals the USB packet size that the CDC device will advertise to be able to receive.
This is a performance parameter, 64 is the largest packet size permitted by USB for virtual serial ports.
Definition at line 61 of file TivaUsbCdcDevice.cxx.
| void usb0_interrupt_handler | ( | void | ) |
Handle interrupts for USB0.
Definition at line 426 of file TivaUsbCdcDevice.cxx.
| const uint8_t configString[] |
The configuration description string.
Definition at line 119 of file TivaUsbCdcDevice.cxx.
| const uint8_t controlInterfaceString[] |
The configuration interface description string.
Definition at line 108 of file TivaUsbCdcDevice.cxx.
|
static |
Instance pointers help us get context from the interrupt handler(s)
Definition at line 145 of file TivaUsbCdcDevice.cxx.
| const uint8_t langDescriptor[] |
The languages supported by this device.
Definition at line 70 of file TivaUsbCdcDevice.cxx.
| const uint8_t manufacturerString[] |
The manufacturur string.
Definition at line 79 of file TivaUsbCdcDevice.cxx.
| const uint8_t productString[] |
The product string.
Definition at line 88 of file TivaUsbCdcDevice.cxx.
| const uint8_t serialNumberString[] |
The serial number string.
Definition at line 99 of file TivaUsbCdcDevice.cxx.
| const uint8_t* const stringDescriptors[] |
The descriptor string table.
Definition at line 131 of file TivaUsbCdcDevice.cxx.