Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Namespaces | Functions
lampda::hal Namespace Reference

Hardware Abstraction Layer, handle the platform specific interactions. Can be changed to support different platforms. More...

Namespaces

namespace  bluetooth
 Handle the platform specific bluetooth operations.
 
namespace  gpio
 handler for the GeneralPurposeInputOutputs
 
namespace  microphone
 Handle the platform specific microphone operations.
 
namespace  queues
 Implementation of inter thread queues.
 
namespace  registers
 Define the interaction layer with the system specific registers.
 
namespace  serial
 Serial port HAL layer.
 
namespace  strip
 Define the interaction layer with an indexable strip.
 
namespace  threads
 Define tasks and threads specifics.
 

Functions

uint32_t time_ms (void)
 Returns the number of milliseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.
 
uint64_t time_us (void)
 Returns the number of microseconds since the Arduino board began running the current program.
 
void delay_ms (uint32_t dwMs)
 Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 1000 milliseconds in a second.)
 
void delay_us (uint64_t dwUs)
 Pauses the program for the amount of time (in microseconds) specified as parameter.
 
uint32_t time_s ()
 Get the current time, in seconds.
 
uint32_t time_min ()
 Get the current time, in minutes.
 
void delay_s (uint32_t s)
 pause the current task for the given number of seconds
 

Detailed Description

Hardware Abstraction Layer, handle the platform specific interactions. Can be changed to support different platforms.

Function Documentation

◆ delay_ms()

void lampda::hal::delay_ms ( uint32_t  dwMs)

Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 1000 milliseconds in a second.)

Parameters
dwMsthe number of milliseconds to pause (uint32_t)

◆ delay_us()

void lampda::hal::delay_us ( uint64_t  dwUs)

Pauses the program for the amount of time (in microseconds) specified as parameter.

Parameters
dwUsthe number of microseconds to pause (uint32_t)

◆ time_ms()

uint32_t lampda::hal::time_ms ( void  )

Returns the number of milliseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.

Returns
Number of milliseconds since the program started (uint32_t)

◆ time_us()

uint64_t lampda::hal::time_us ( void  )

Returns the number of microseconds since the Arduino board began running the current program.

This number will overflow (go back to zero), after approximately 70 minutes. On 16 MHz Arduino boards (e.g. Duemilanove and Nano), this function has a resolution of four microseconds (i.e. the value returned is always a multiple of four). On 8 MHz Arduino boards (e.g. the LilyPad), this function has a resolution of eight microseconds.

Note
There are 1,000 microseconds in a millisecond and 1,000,000 microseconds in a second.