|
LRAUV
revA
|
Provides pointers for poking and peeking at LPC3XXX registers. More...
#include <LPC3Reg.h>

Public Member Functions | |
| LPC3Reg (unsigned long baseAddress, int bytesMapped) | |
| virtual | ~LPC3Reg () |
Static Public Member Functions | |
| static bool | IsDropweightOK (void) |
| Returns true if the drop weight is present, false if not. More... | |
| static bool | IsBurnwireActive () |
| Returns true if the burn wire is burning, false if not. More... | |
Static Public Attributes | |
| static volatile int & | AdcClkCtrl1_ = *( SysCtrlPhys_.map_ + 0x60 / sizeof( int ) ) |
| static volatile int & | AdcClkCtrl_ = *( SysCtrlPhys_.map_ + 0xB4 / sizeof( int ) ) |
| static volatile int & | TimClkCtrl_ = *( SysCtrlPhys_.map_ + 0xBC / sizeof( int ) ) |
| static volatile int & | U3ClkPhys_ = *( SysCtrlPhys_.map_ + 0xD0 / sizeof( int ) ) |
| static volatile int & | U4ClkPhys_ = *( SysCtrlPhys_.map_ + 0xD4 / sizeof( int ) ) |
| static volatile int & | U6ClkPhys_ = *( SysCtrlPhys_.map_ + 0xDC / sizeof( int ) ) |
| static volatile int & | UartClkCtrl_ = *( SysCtrlPhys_.map_ + 0xE4 / sizeof( int ) ) |
| static volatile int & | Sic1Er_ = *( Sic1_.map_ + 0x0 / sizeof( int ) ) |
| static volatile int & | Sic1Rsr_ = *( Sic1_.map_ + 0x4 / sizeof( int ) ) |
| static volatile int & | Sic1Sr_ = *( Sic1_.map_ + 0x8 / sizeof( int ) ) |
| static volatile int & | Sic1Apr_ = *( Sic1_.map_ + 0xC / sizeof( int ) ) |
| static volatile int & | Sic1Atr_ = *( Sic1_.map_ + 0x10 / sizeof( int ) ) |
| static volatile int & | Sic1Itr_ = *( Sic1_.map_ + 0x14 / sizeof( int ) ) |
| static volatile int & | Hsu1Ctrl_ = *( Hsu1RxPhys_.map_ + 0x0C / sizeof( int ) ) |
| static volatile int & | Hsu1RX_ = *( Hsu1RxPhys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | Hsu2Level_ = *( Hsu2RxPhys_.map_ + 0x04 / sizeof( int ) ) |
| static volatile int & | Hsu2RX_ = *( Hsu2RxPhys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | Hsu7RX_ = *( Hsu7RxPhys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | P3InpStatePhys_ = *( PioPhys_.map_ + 0x0 / sizeof( int ) ) |
| static volatile int & | PioOutpSetPhys_ = *( PioPhys_.map_ + 0x04 / sizeof( int ) ) |
| static volatile int & | PioOutpClrPhys_ = *( PioPhys_.map_ + 0x08 / sizeof( int ) ) |
| static volatile int & | PioMuxSetPhys_ = *( PioPhys_.map_ + 0x28 / sizeof( int ) ) |
| static volatile int & | PioMuxClrPhys_ = *( PioPhys_.map_ + 0x104 / sizeof( int ) ) |
| static volatile int & | P0InpStatePhys_ = *( PioPhys_.map_ + 0x40 / sizeof( int ) ) |
| static volatile int & | P0OutpSetPhys_ = *( PioPhys_.map_ + 0x44 / sizeof( int ) ) |
| static volatile int & | P0OutpClrPhys_ = *( PioPhys_.map_ + 0x48 / sizeof( int ) ) |
| static volatile int & | P3MuxSetPhys_ = *( PioPhys_.map_ + 0x110 / sizeof( int ) ) |
| static volatile int & | P3MuxClrPhys_ = *( PioPhys_.map_ + 0x114 / sizeof( int ) ) |
| static volatile int & | AdcSelect_ = *( Adc_.map_ + 0x04 / sizeof( int ) ) |
| static volatile int & | AdcCtrl_ = *( Adc_.map_ + 0x08 / sizeof( int ) ) |
| static volatile int & | AdcValue_ = *( Adc_.map_ + 0x48 / sizeof( int ) ) |
| static volatile int & | UartCtrlPhys_ = *( UartGenCtrlPhys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | UartClkModePhys_ = *( UartGenCtrlPhys_.map_ + 0x04 / sizeof( int ) ) |
| static volatile int & | U3LsrPhys_ = *( Uart3Phys_.map_ + 0x14 / sizeof( int ) ) |
| static volatile int & | U3DllPhys_ = *( Uart3Phys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | U4DllPhys_ = *( Uart4Phys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | U4LsrPhys_ = *( Uart4Phys_.map_ + 0x14 / sizeof( int ) ) |
| static volatile int & | U5LsrPhys_ = *( Uart5Phys_.map_ + 0x14 / sizeof( int ) ) |
| static volatile int & | U6LsrPhys_ = *( Uart6Phys_.map_ + 0x14 / sizeof( int ) ) |
| static volatile int & | U6DllPhys_ = *( Uart6Phys_.map_ + 0x00 / sizeof( int ) ) |
| static volatile int & | U6IERPhys_ = *( Uart6Phys_.map_ + 0x04 / sizeof( int ) ) |
| static volatile int & | WDTimCtrl_ = *( WDTPhys_.map_ + 0x04 / sizeof( int ) ) |
| static volatile int & | WDTimCounter_ = *( WDTPhys_.map_ + 0x08 / sizeof( int ) ) |
| static volatile int & | WDTimMCtrl_ = *( WDTPhys_.map_ + 0x0C / sizeof( int ) ) |
| static volatile int & | WDTimMatch0_ = *( WDTPhys_.map_ + 0x10 / sizeof( int ) ) |
| static volatile int & | WDTimEMR_ = *( WDTPhys_.map_ + 0x14 / sizeof( int ) ) |
| static volatile int & | WDTimPulse_ = *( WDTPhys_.map_ + 0x18 / sizeof( int ) ) |
| static volatile int & | WDTimRes_ = *( WDTPhys_.map_ + 0x1C / sizeof( int ) ) |
Private Types | |
| enum | GFChan { CHAN_0 = 0x4, CHAN_1 = 0x20000, CHAN_2 = 0x40000, CHAN_4 = 0x800, CHAN_5 = 0x1000 } |
| Ground fault channel definitions. More... | |
Private Member Functions | |
| LPC3Reg (const LPC3Reg &old) | |
Static Private Member Functions | |
| static void | SoftwareReset (void) |
| Force an immediate reset. More... | |
| static void | InitializeHBC (void) |
| Get ready to heartbeat. More... | |
| static void | CheckBatt (void) |
| Monitors the batteries. More... | |
| static bool | InitializeWDT (void) |
| Fire up the watchdog timer. More... | |
| static void | StrobeWDT (void) |
| Kick the dog. More... | |
| static void | StrobeHBC (void) |
| Strobe the heartbeat counter. More... | |
| static bool | PowerOffLoads (void) |
| Removes power from the load control backplane. More... | |
| static bool | PowerOnLoads (void) |
| Applies power to the load control backplane. More... | |
| static bool | QueryShorepower (void) |
| Returns true if shore power is on, false if not. More... | |
| static bool | QueryBattPower (void) |
| Returns true if battery power is on, false if not. More... | |
| static bool | QueryBackplanePower (void) |
| Returns true if LOAD_CONT_STATE is asserted (note signal is active low) More... | |
| static bool | WaterDetected (void) |
| Returns true if water is detected in the pressure hull. More... | |
| static bool | CFMissing (void) |
| Returns true if CF card is missing (NOT detected) More... | |
| static void | ActivateBurnwire (void) |
| Activate the burnwire to drop the weight. More... | |
| static void | DeactivateBurnwire (void) |
| Deactivate the burnwire to NOT drop the weight. More... | |
| static void | DeactivateRadio (void) |
| Deactivate the radio(s) so they are not powered in emergency mode. More... | |
| static void | SWReset (void) |
| static void | UninitializeWDT (void) |
| Shut down the watchdog timer. More... | |
| static void | ActivateGF (GFChan channel) |
| Ground fault circuit handling. More... | |
| static void | DeactivateGF (GFChan channel) |
Private Attributes | |
| int | devFD_ |
| int * | map_ |
| unsigned long | baseAddress_ |
| int | bytesMapped_ |
Static Private Attributes | |
| static bool | BurnwireActive_ |
| static LPC3Reg | SysCtrlPhys_ = LPC3Reg( 0x40004000, 0xFF ) |
| static LPC3Reg | Sic1_ = LPC3Reg( 0x4000C000, 0x18 ) |
| static LPC3Reg | Hsu1RxPhys_ = LPC3Reg( 0x40014000, 0x10 ) |
| static LPC3Reg | Hsu2RxPhys_ = LPC3Reg( 0x40018000, 0x10 ) |
| static LPC3Reg | Hsu7RxPhys_ = LPC3Reg( 0x4001C000, 0x10 ) |
| static LPC3Reg | PioPhys_ = LPC3Reg( 0x40028000, 0x200 ) |
| static LPC3Reg | Adc_ = LPC3Reg( 0x40048000, 0x50 ) |
| static LPC3Reg | UartGenCtrlPhys_ = LPC3Reg( 0x40054000, 0x10 ) |
| static LPC3Reg | Uart3Phys_ = LPC3Reg( 0x40080000, 0xFF ) |
| static LPC3Reg | Uart4Phys_ = LPC3Reg( 0x40088000, 0xFF ) |
| static LPC3Reg | Uart5Phys_ = LPC3Reg( 0x40090000, 0xFF ) |
| static LPC3Reg | Uart6Phys_ = LPC3Reg( 0x40098000, 0xFF ) |
| static LPC3Reg | WDTPhys_ = LPC3Reg( 0x4003C000, 0xFF ) |
| static bool | HeartbeatHi_ |
| Keeps track of flipping the state of the heartbeat signal. More... | |
| static bool | BackplanePowerOn_ |
| True == backplane power applied. More... | |
Friends | |
| class | CBIT |
| class | SBIT |
| class | IBIT |
| class | Supervisor |
| class | CommandLine |
| class | LoadControl |
| class | VerticalControl |
Provides pointers for poking and peeking at LPC3XXX registers.
| LPC3Reg::LPC3Reg | ( | unsigned long | baseAddress, |
| int | bytesMapped | ||
| ) |
References baseAddress_, bytesMapped_, devFD_, FATAL, map_, and MAP_MASK.
|
virtual |
References baseAddress_, bytesMapped_, devFD_, FATAL, map_, and MAP_MASK.
|
private |
|
staticprivate |
Activate the burnwire to drop the weight.
References BurnwireActive_, CPU_BURNWIRE_FIRE, CPU_BURNWIRE_OFF, Timespan::Milliseconds(), PioOutpClrPhys_, PioOutpSetPhys_, and Timespan::sleepFor().
Referenced by CBIT::checkDepth(), CBIT::checkLeak(), CommandLine::commandBurn(), and VerticalControl::overrideVertical().
|
staticprivate |
|
staticprivate |
Returns true if CF card is missing (NOT detected)
References CF_CARD_PRESENT, and P3InpStatePhys_.
Referenced by CBIT::monitorCFCard().
|
staticprivate |
Monitors the batteries.
|
staticprivate |
Deactivate the burnwire to NOT drop the weight.
References BurnwireActive_, CPU_BURNWIRE_OFF, Timespan::Milliseconds(), PioOutpClrPhys_, PioOutpSetPhys_, and Timespan::sleepFor().
Referenced by CommandLine::commandBurn(), and CBIT::initialize().
|
staticprivate |
References PioOutpClrPhys_.
Referenced by CBIT::scanGFChan(), and CBIT::uninitialize().
|
staticprivate |
Deactivate the radio(s) so they are not powered in emergency mode.
References EMERG_RADIO_OFF, Timespan::Milliseconds(), PioOutpClrPhys_, PioOutpSetPhys_, and Timespan::sleepFor().
Referenced by CBIT::initialize().
|
staticprivate |
Get ready to heartbeat.
References HeartbeatHi_, LPC3250_HEARTBEAT, and PioOutpSetPhys_.
Referenced by CBIT::initialize().
|
staticprivate |
Fire up the watchdog timer.
References TimClkCtrl_, WDTimCounter_, WDTimCtrl_, WDTimEMR_, WDTimMCtrl_, WDTimPulse_, and WDTimRes_.
Referenced by CBIT::initialize().
|
inlinestatic |
Returns true if the burn wire is burning, false if not.
References BurnwireActive_.
Referenced by DropWeight::run().
|
static |
Returns true if the drop weight is present, false if not.
References DROP_WEIGHT_STATE, and P3InpStatePhys_.
Referenced by DropWeight::run().
|
staticprivate |
Removes power from the load control backplane.
References BackplanePowerOn_, CPU_LOAD_CONT_BLANK, CPU_LOAD_CONT_OFF, LOAD_CONT_STATE, Timespan::Milliseconds(), P0OutpClrPhys_, P0OutpSetPhys_, P3InpStatePhys_, PioOutpSetPhys_, and Timespan::sleepFor().
Referenced by CBIT::uninitialize().
|
staticprivate |
Applies power to the load control backplane.
References BackplanePowerOn_, CPU_LOAD_CONT_BLANK, CPU_LOAD_CONT_OFF, CPU_LOAD_CONT_ON, LOAD_CONT_STATE, Timespan::Milliseconds(), P0OutpClrPhys_, P0OutpSetPhys_, P3InpStatePhys_, PioOutpClrPhys_, PioOutpSetPhys_, and Timespan::sleepFor().
Referenced by CBIT::checkBackplanePower(), and LoadControl::initialize().
|
staticprivate |
Returns true if LOAD_CONT_STATE is asserted (note signal is active low)
References BackplanePowerOn_, LOAD_CONT_STATE, and P3InpStatePhys_.
Referenced by CBIT::checkBackplanePower().
|
staticprivate |
Returns true if battery power is on, false if not.
References BATT_POWER_STATE, and P3InpStatePhys_.
Referenced by CBIT::checkMainBattery().
|
staticprivate |
Returns true if shore power is on, false if not.
References P3InpStatePhys_, and SHORE_POWER_STATE.
Referenced by CBIT::monitorShorePower().
|
staticprivate |
Force an immediate reset.
References WDTimMCtrl_.
|
staticprivate |
Strobe the heartbeat counter.
References HeartbeatHi_, LPC3250_HEARTBEAT, PioOutpClrPhys_, and PioOutpSetPhys_.
Referenced by CBIT::assertVitals().
|
staticprivate |
|
staticprivate |
References Timespan::Milliseconds(), PioOutpClrPhys_, PioOutpSetPhys_, Timespan::sleepFor(), and SW_RESIN.
Referenced by CBIT::checkBackplanePower().
|
staticprivate |
Shut down the watchdog timer.
Uninit function.
References TimClkCtrl_, WDTimCounter_, WDTimCtrl_, WDTimEMR_, WDTimMatch0_, WDTimMCtrl_, and WDTimPulse_.
Referenced by CBIT::uninitialize().
|
staticprivate |
Returns true if water is detected in the pressure hull.
References P3InpStatePhys_, and WATER_SENSOR_STATE.
Referenced by CBIT::checkLeak().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprivate |
True == backplane power applied.
Referenced by PowerOffLoads(), PowerOnLoads(), and QueryBackplanePower().
|
private |
Referenced by LPC3Reg(), and ~LPC3Reg().
|
staticprivate |
Referenced by ActivateBurnwire(), DeactivateBurnwire(), and IsBurnwireActive().
|
private |
Referenced by LPC3Reg(), and ~LPC3Reg().
|
private |
Referenced by LPC3Reg(), and ~LPC3Reg().
|
staticprivate |
Keeps track of flipping the state of the heartbeat signal.
Referenced by InitializeHBC(), and StrobeHBC().
|
static |
|
static |
|
static |
Referenced by UartStream::waitForBufferEmpty().
|
static |
|
static |
|
private |
Referenced by LPC3Reg(), and ~LPC3Reg().
|
static |
|
static |
Referenced by UartStream::disableUART(), PowerOffLoads(), and PowerOnLoads().
|
static |
Referenced by UartStream::enableUART(), PowerOffLoads(), and PowerOnLoads().
|
static |
Referenced by CFMissing(), IsDropweightOK(), PowerOffLoads(), PowerOnLoads(), QueryBackplanePower(), QueryBattPower(), QueryShorepower(), and WaterDetected().
|
static |
|
static |
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by ActivateBurnwire(), DeactivateBurnwire(), DeactivateGF(), DeactivateRadio(), PowerOnLoads(), StrobeHBC(), and SWReset().
|
static |
Referenced by ActivateBurnwire(), ActivateGF(), DeactivateBurnwire(), DeactivateRadio(), InitializeHBC(), PowerOffLoads(), PowerOnLoads(), StrobeHBC(), and SWReset().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by InitializeWDT(), and UninitializeWDT().
|
static |
|
static |
|
static |
Referenced by UartStream::waitForBufferEmpty().
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by UartStream::waitForBufferEmpty().
|
static |
Referenced by UartStream::waitForBufferEmpty().
|
static |
|
static |
|
static |
|
static |
Referenced by UartStream::waitForBufferEmpty().
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by UartStream::initializePort().
|
static |
Referenced by InitializeWDT(), StrobeWDT(), and UninitializeWDT().
|
static |
Referenced by InitializeWDT(), and UninitializeWDT().
|
static |
Referenced by InitializeWDT(), and UninitializeWDT().
|
static |
Referenced by StrobeWDT(), and UninitializeWDT().
|
static |
Referenced by InitializeWDT(), SoftwareReset(), and UninitializeWDT().
|
static |
Referenced by InitializeWDT(), and UninitializeWDT().
|
static |
Referenced by CBIT::initialize(), and InitializeWDT().