Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TivaDCC.hxx File Reference
#include <algorithm>
#include <cstdint>
#include "driverlib/interrupt.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/timer.h"
#include "driverlib/uart.h"
#include "freertos/can_ioctl.h"
#include "inc/hw_memmap.h"
#include "inc/hw_timer.h"
#include "inc/hw_types.h"
#include "inc/hw_uart.h"
#include "driverlib/prcm.h"
#include "driverlib/utils.h"
#include "freertos_drivers/common/FixedQueue.hxx"
#include "Devtab.hxx"
#include "RailcomDriver.hxx"
#include "dcc/DccOutput.hxx"
#include "dcc/Packet.hxx"
#include "dcc/RailCom.hxx"
#include "executor/Notifiable.hxx"

Go to the source code of this file.

Classes

class  TivaDCC< HW >
 A device driver for sending DCC packets. More...
 
struct  TivaDCC< HW >::Timing
 Structure for supporting bit timing. More...
 

Functions

static const uint32_t usec_to_clocks (uint32_t usec)
 Converts a time length given in microseconds to the number of clock cycles.
 
static uint32_t nsec_to_clocks (uint32_t nsec)
 Converts a time length given in nanoseconds to the number of clock cycles.
 

Variables

uint8_t spreadSpectrum
 If non-zero, enables the jitter feature to spread the EMC spectrum of DCC signal.
 

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.

Device class prototype for DCC driver on TivaWare.

Author
Stuart W. Baker
Date
6 May 2014

Definition in file TivaDCC.hxx.

Macro Definition Documentation

◆ gcc

#define gcc

Definition at line 38 of file TivaDCC.hxx.

Function Documentation

◆ nsec_to_clocks()

static uint32_t nsec_to_clocks ( uint32_t  nsec)
static

Converts a time length given in nanoseconds to the number of clock cycles.

Parameters
nsecis time given in nanoseconds.
Returns
time given in clock cycles.

Definition at line 927 of file TivaDCC.hxx.

◆ usec_to_clocks()

static const uint32_t usec_to_clocks ( uint32_t  usec)
static

Converts a time length given in microseconds to the number of clock cycles.

Parameters
usecis time given in microseconds.
Returns
time given in clock cycles.

Definition at line 920 of file TivaDCC.hxx.

Variable Documentation

◆ spreadSpectrum

uint8_t spreadSpectrum

If non-zero, enables the jitter feature to spread the EMC spectrum of DCC signal.

Definition at line 77 of file TivaDCC.hxx.