Macros | |
#define | RTC_CLOCK_SOURCE_LSI |
#define | RTC_ASYNCH_PREDIV 0x7F |
#define | RTC_SYNCH_PREDIV 0xF9 |
#define | RtcTicksPerSecond (1UL) |
#define | RtcTicksPerMinute (RtcTicksPerSecond * 60UL) |
#define | RtcTicksPerHour (RtcTicksPerMinute * 60UL) |
#define | RtcTicksPerDay (RtcTicksPerHour * 24UL) |
#define | CPU_LOAD_SET_IDLE() |
#define | CPU_LOAD_SET_ACTIVE() |
Functions | |
void | HAL_RTC_MspInit (RTC_HandleTypeDef *hrtc) |
RTC MSP Initialization This function configures the hardware resources used in this example. More... | |
void | HAL_RTC_MspDeInit (RTC_HandleTypeDef *hrtc) |
RTC MSP De-Initialization This function frees the hardware resources used in this example: More... | |
void | EwBspClockInit (void) |
Initialises the system clock and the real time clock. More... | |
void | EwBspClockTickIncrement (void) |
The function EwBspClockTickIncrement increments the millisecond counter, which is used by the Runtime Environment (RTE) to trigger timer events. More... | |
unsigned long | EwBspClockGetTicks (void) |
The function EwBspClockGetTicks returns the current ticks counter value. More... | |
unsigned long | EwBspClockGetTime (void) |
Returns the current time in seconds since 01.01.1970. More... | |
void | EwBspClockSetTime (unsigned long aTime) |
Sets the given time in seconds since 01.01.1970 at real time clock (RTC). More... | |
int | EwBspClockGetCpuLoad (void) |
Returns the current CPU load as percent value. More... | |
void | EwBspClockCpuLoadSetActive (void) |
Starts the CPU load counting. Call this function whenever CPU processing is needed. More... | |
void | EwBspClockCpuLoadSetIdle (void) |
Stops the CPU load counting. Call this function whenever CPU processing is currently not needed since the program execution is waiting for some system event. More... | |
Variables | |
const unsigned long | DaysToMonth [] |
const unsigned long | DaysToMonthInLeapYear [] |
static volatile unsigned long | EmWiSystemTicks = 0 |
static RTC_HandleTypeDef | RtcHandle |
volatile int | XTAL_Min |
volatile int | XTAL_Hour |
volatile int | XTAL_Sec |
volatile int | XTAL_Day |
volatile int | XTAL_Month |
volatile int | XTAL_Year |
#define CPU_LOAD_SET_ACTIVE | ( | ) |
#define CPU_LOAD_SET_IDLE | ( | ) |
#define RTC_ASYNCH_PREDIV 0x7F |
#define RTC_CLOCK_SOURCE_LSI |
< Defines to select adaquate clock source
#define RTC_SYNCH_PREDIV 0xF9 |
#define RtcTicksPerDay (RtcTicksPerHour * 24UL) |
#define RtcTicksPerHour (RtcTicksPerMinute * 60UL) |
#define RtcTicksPerMinute (RtcTicksPerSecond * 60UL) |
#define RtcTicksPerSecond (1UL) |
Starts the CPU load counting. Call this function whenever CPU processing is needed.
Stops the CPU load counting. Call this function whenever CPU processing is currently not needed since the program execution is waiting for some system event.
int EwBspClockGetCpuLoad | ( | void | ) |
Returns the current CPU load as percent value.
unsigned long EwBspClockGetTicks | ( | void | ) |
The function EwBspClockGetTicks returns the current ticks counter value.
References EmWiSystemTicks.
unsigned long EwBspClockGetTime | ( | void | ) |
Returns the current time in seconds since 01.01.1970.
References DaysToMonth, DaysToMonthInLeapYear, RtcHandle, RtcTicksPerDay, RtcTicksPerHour, and RtcTicksPerMinute.
Initialises the system clock and the real time clock.
References EmWiSystemTicks, RTC_ASYNCH_PREDIV, RTC_SYNCH_PREDIV, RtcHandle, and SystemCoreClock.
void EwBspClockSetTime | ( | unsigned long | aTime | ) |
The function EwBspClockTickIncrement increments the millisecond counter, which is used by the Runtime Environment (RTE) to trigger timer events.
References EmWiSystemTicks.
void HAL_RTC_MspDeInit | ( | RTC_HandleTypeDef * | hrtc | ) |
RTC MSP De-Initialization This function frees the hardware resources used in this example:
hrtc | RTC handle pointer |
None |
void HAL_RTC_MspInit | ( | RTC_HandleTypeDef * | hrtc | ) |
RTC MSP Initialization This function configures the hardware resources used in this example.
hrtc | RTC handle pointer |
None |
References PeriphClkInitStruct.
const unsigned long DaysToMonth[] |
const unsigned long DaysToMonthInLeapYear[] |
timer tick for Embedded Wizard UI applications
|
static |
RTC handler declaration
|
static |
volatile int XTAL_Day |
volatile int XTAL_Hour |
volatile int XTAL_Min |
volatile int XTAL_Month |
volatile int XTAL_Sec |
volatile int XTAL_Year |