34#ifndef _FREERTOS_DRIVERS_TI_TIVADEV_HXX_
35#define _FREERTOS_DRIVERS_TI_TIVADEV_HXX_
43#include "driverlib/rom.h"
44#include "driverlib/rom_map.h"
45#include "driverlib/interrupt.h"
46#include "driverlib/timer.h"
47#include "driverlib/uart.h"
48#include "usblib/usblib.h"
49#include "usblib/usbcdc.h"
50#include "usblib/usb-ids.h"
51#include "usblib/device/usbdevice.h"
52#include "usblib/device/usbdcdc.h"
113 unsigned long msg_param,
void *msg_data);
123 static uint32_t
rx_callback(
void *data,
unsigned long event,
124 unsigned long msg_param,
void *msg_data);
134 static uint32_t
tx_callback(
void *data,
unsigned long event,
135 unsigned long msg_param,
void *msg_data);
182 TivaUart(
const char *
name,
unsigned long base, uint32_t interrupt,
183 uint32_t baud = 115200, uint32_t mode =
CS8,
bool hw_fifo =
true,
200 int ioctl(
File *file,
unsigned long int key,
unsigned long data)
override;
269 int ioctl(
File *file,
unsigned long int key,
unsigned long data)
override;
299 bool fast_mode =
false);
Base class for a CAN device for the Arduino environment.
const char * name
device name
Private data for an I2C device.
An object that can schedule itself on an executor to run.
This class provides a counting semaphore API.
Private data for a serial device.
Specialization of CAN driver for Tiva CAN.
int ioctl(File *file, unsigned long int key, unsigned long data) override
Request an ioctl transaction.
unsigned long interrupt
interrupt of this device
void interrupt_handler()
handle an interrupt.
uint8_t canState
current state of the CAN-bus.
unsigned long base
base address of this device
void enable() override
function to enable device
bool txPending
transmission currently pending
void tx_msg() override
function to try and transmit a message
TivaCan()
Default constructor.
void disable() override
function to disable device
Private data for this implementation of serial.
void interrupt_handler()
handle an interrupt.
static uint32_t control_callback(void *data, unsigned long event, unsigned long msg_param, void *msg_data)
Handles CDC driver notifications related to control and setup of the device.
int woken
task woken metadata for ISR
void tx_char() OVERRIDE
Function to try and transmit a character.
bool txPending
true if a transmission is in progress or pending
bool connected
connection status
tUSBDCDCDevice usbdcdcDevice
CDC serial device instance.
SelectInfo selInfoWr
Metadata for select() logic.
uint32_t interrupt
interrupt number for device
ssize_t write(File *file, const void *buf, size_t count) OVERRIDE
Write to a file or device.
bool select(File *file, int mode) OVERRIDE
Device select method.
static uint32_t tx_callback(void *data, unsigned long event, unsigned long msg_param, void *msg_data)
Handles CDC driver notifications related to transmission.
static uint32_t rx_callback(void *data, unsigned long event, unsigned long msg_param, void *msg_data)
Handles CDC driver notifications related to reception.
void disable() override
function to disable device
tLineCoding lineCoding
line encoding for the device
void enable() override
function to enable device
TivaCdc()
Default constructor.
bool enabled
enabled status
Specialization of Serial driver for Tiva UART.
bool stop_
current transaction ends in a stop if true
void disable() OVERRIDE
function to disable device
struct i2c_msg * msg_
message for current transaction
TivaI2C()
Default constructor.
int count_
current count index within transaction
OSSem sem
Semaphore to wakeup task level from ISR.
unsigned long interrupt
interrupt of this device
int transfer(struct i2c_msg *msg, bool stop) OVERRIDE
Method to transmit/receive the data.
void interrupt_handler()
handle an interrupt.
unsigned long base
base address of this device
void enable() OVERRIDE
function to enable device
Specialization of Serial driver for Tiva UART.
uint8_t nineBit_
true if using 9-bit reception
void(* TxEnableMethod)()
Function point for the tx enable assert and deassert methods.
uint8_t hwFIFO_
enable HW FIFO
void tx_char() override
Try and transmit a message.
void disable() override
function to disable device
void interrupt_handler()
handle an interrupt.
void send()
Send data until there is no more space left.
Mode
These mode bits need to be OR-ed together for the mode argument and ioctl.
@ CSTOPB
send two stop bits instead of 1
uint8_t uartMode_
uart config (mode) flags
void set_mode()
Sets the port baud rate and mode from the class variables.
void enable() override
function to enable device
uint32_t baud_
desired baud rate
TxEnableMethod txEnableAssert_
function pointer to a method that asserts the transmit enable.
uint32_t interrupt_
interrupt of this device
TxEnableMethod txEnableDeassert_
function pointer to a method that deasserts the transmit enable.
uint32_t base_
base address of this device
TivaUart()
Default constructor.
int ioctl(File *file, unsigned long int key, unsigned long data) override
Request an ioctl transaction.
Notifiable * txComplete_
Notifiable to invoke when the transmit engine has finished operation.
uint8_t txPending_
transmission currently pending
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.
Select wakeup information.