# SFBHWPinsHost.h File Reference

Host-specific shims around pin definitions. More...

`#include "SFBTypes.h"`
`#include "SFBAssert.h"`

Include dependency graph for SFBHWPinsHost.h:

Go to the source code of this file.

## Data Structures
struct | SFBHWHostRegister
| An incomplete cut at host-side simulation of the SFB hardware registers. More...
class | SFBHWHostRegisterMap
class | SFBHWHostRegisterAccess
## Defines
#define | micros() microsFunction()
| The number of microseconds of uptime.
#define | millis() millisFunction()
| The number of milliseconds of uptime.
## Functions
u64 | microseconds ()
| The number of microseconds of uptime.
u32 | milliseconds ()
| The number of milliseconds of uptime.
u32 | seconds ()
| The number of seconds of uptime.
## Variables
SFBHWHostRegisterMap | hostRegisters

## Detailed Description

Host-specific shims around pin definitions.

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.

## Define Documentation

#define micros | ( |  | ) | microsFunction()

The number of microseconds of uptime.

Rolls over after about 70 minutes. Regardless of the definition of this macro shown above, on the actual hardware this call is extremely fast, just fetching a single hardware register requiring no more than a couple assembly instructions.

#define millis | ( |  | ) | millisFunction()

The number of milliseconds of uptime.

Rolls over after about 49 days. Regardless of the definition of this macro shown above, on the actual hardware this call is extremely fast, just loading one memory location, requiring no more than a couple assembly instructions.

millis() is much faster than milliseconds(), but is not as accurate; millis() may miss ticks due to interrupt load.

Examples:
  i2cDACFast.cpp, i2cEeprom.cpp, netled.cpp, profile3.cpp, sdcard2.cpp, and speed4.cpp.

## Function Documentation

u64 microseconds | ( |  | ) |

The number of microseconds of uptime.

Rolls over after about a half a million years. microseconds() is quite fast, except for the overhead of dealing in `u64` size, and its value is exact, unaffected by interrupt load.

u32 milliseconds | ( |  | ) |

The number of milliseconds of uptime.

Rolls over after about 180 years. milliseconds() is somewhat slow compared to millis(), because it performs a non-power-of-2 division, but its value is exact, unaffected by interrupt load.

u32 seconds | ( |  | ) |

The number of seconds of uptime.

Rolls over after about 180 years. seconds is somewhat slow (requires a division) but its value is exact, unaffected by interrupt load.

Examples:
  i2cDAC.cpp.