|
MHVLib
20111011
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_Timer8.h>Go to the source code of this file.
| typedef struct mhv_timestamp MHV_TIMESTAMP |
| typedef enum mhv_weekday MHV_WEEKDAY |
| enum mhv_month |
| enum mhv_weekday |
| uint8_t mhv_daysInMonth | ( | MHV_MONTH | month, |
| uint16_t | year | ||
| ) |
Get the number of days in a month
| month | the month |
| year | the year |
Definition at line 151 of file MHV_RTC.cpp.
| bool mhv_isLeapYear | ( | uint16_t | year | ) |
Determine if a year is a leap year
Definition at line 89 of file MHV_RTC.cpp.
| bool mhv_timestampGreaterThanOrEqual | ( | MHV_TIMESTAMP * | first, |
| MHV_TIMESTAMP * | second | ||
| ) |
Compare 2 timestamps
| first | the first timestamp |
| second | the second timestamp |
Definition at line 72 of file MHV_RTC.cpp.
| void mhv_timestampIncrement | ( | MHV_TIMESTAMP * | timestamp, |
| uint32_t | seconds, | ||
| uint16_t | milliseconds | ||
| ) |
Increment a timestamp
| timestamp | the timestamp to increment |
| seconds | the number of seconds to increment by |
| milliseconds | the number of milliseconds to increment by |
Definition at line 102 of file MHV_RTC.cpp.
| void mhv_timestampIncrement | ( | MHV_TIMESTAMP * | timestamp, |
| MHV_TIMESTAMP * | timestamp2 | ||
| ) |
Increment a timestamp
| timestamp | the timestamp to increment |
| timestamp2 | the timestamp to increment by |
Definition at line 118 of file MHV_RTC.cpp.
| bool mhv_timestampLessThan | ( | MHV_TIMESTAMP * | first, |
| MHV_TIMESTAMP * | second | ||
| ) |
A Realtime clock
Takes a trigger from a timer, and keeps time.
Recommended values: Clock Prescaler Top Ticks/ms 16MHz 64 249 1 Compare 2 timestamps
| first | the first timestamp |
| second | the second timestamp |
Definition at line 52 of file MHV_RTC.cpp.