SFBHWPinsHost.h File Reference

More...

#include "SFBTypes.h"

Include dependency graph for SFBHWPinsHost.h:

Go to the source code of this file.

Data Structures

class  SFBHWHostRegister
 An incomplete cut at host-side simulation of the SFB hardware registers. More...
class  SFBHWHostRegisterMap
 An incomplete cut at host-side simulation of the SFB hardware registers. More...

Defines

#define SFB_PORT_IN_MAP(offset, port)   hostRegisters.portInMap(offset,port)
#define SFB_PORT_PINMODE_REGISTER(offset)   hostRegisters.portInMap(offset,SFBHWHostRegisterMap::PINMODE_REGISTER_PORT)
#define REFLEX_RGB_RED_ON   BUG_UNIMPLEMENTED()
#define REFLEX_RGB_RED_OFF   BUG_UNIMPLEMENTED()
#define REFLEX_RGB_GREEN_ON   BUG_UNIMPLEMENTED()
#define REFLEX_RGB_GREEN_OFF   BUG_UNIMPLEMENTED()
#define REFLEX_RGB_BLUE_ON   BUG_UNIMPLEMENTED()
#define REFLEX_RGB_BLUE_OFF   BUG_UNIMPLEMENTED()
#define SFB_PORT_DIR_REGISTER(port)   SFB_PORT_IN_MAP(0x00,port)
#define SFB_PORT_MASK_REGISTER(port)   SFB_PORT_IN_MAP(0x10,port)
#define SFB_PORT_PIN_REGISTER(port)   SFB_PORT_IN_MAP(0x14,port)
#define SFB_PORT_SET_REGISTER(port)   SFB_PORT_IN_MAP(0x18,port)
#define SFB_PORT_CLR_REGISTER(port)   SFB_PORT_IN_MAP(0x1C,port)
#define SFB_PORT_GET_BIT_MASK(port, bit)   (SFB_PORT_PIN_REGISTER(port)&(bit))
#define SFB_PORT_SET_BIT_MASK(port, mask)   (SFB_PORT_SET_REGISTER(port) |= (mask))
#define SFB_PORT_CLR_BIT_MASK(port, mask)   (SFB_PORT_CLR_REGISTER(port) |= (mask))
#define SFB_PORT_WRITE_BIT_MASK(port, mask, value)   ((value==LOW)?SFB_PORT_CLR_BIT_MASK(port,mask):SFB_PORT_SET_BIT_MASK(port,mask))

Functions

void reenterBootloader () __attribute__((noreturn))
void reenterBrainstem () __attribute__((noreturn))
 Attempt to reenter the tertiary bootloader.
void hwpins_startup_initialization ()
void debugRGB (int rgbBits, int wait)
void debugRGBNum (int num, int bits, int loops)
 debugRGB* -- Low-level last ditch output signallers.
void _dieOnBoard_ (u32 blinkCode, const char *file, int lineno) __attribute__((noreturn))
 Internal method called during failed assertions and other fatal events.

Variables

SFBHWHostRegisterMap hostRegisters


Detailed Description

Author:
David H. Ackley.
Date:
(C) 2008 All rights reserved.
Code License:
The GNU Lesser General Public License
License Note:
All code samples shown in documentation are placed into the public domain.

Function Documentation

void reenterBrainstem (  ) 

Attempt to reenter the tertiary bootloader.

Normally this is performed by branching to address 0x2200, where the tertiary bootloader starts, but if the watchdog timer has been enabled that won't work, so this method turns into reenterBootloader in that case.


Generated on Thu Sep 17 07:39:04 2009 for SFB by doxygen 1.5.9