|
Programmable Clock with RTOS 0.0.1
Implementaiton of a programmable clock using RTOS with STM32GO microcontroller.
|
Interfaces for clock process. More...
Go to the source code of this file.
Macros | |
| #define | STATIC static |
| #define | TOTAL_CLOCK_STATES 4U |
| #define | RTC_INIT_PASYNC 127 |
| #define | RTC_INIT_PSYNC 255 |
| #define | RTC_INITIAL_HOUR 0x12 |
| #define | RTC_INITIAL_MIN 0x00 |
| #define | RTC_INITIAL_SEC 0x00 |
| #define | RTC_INITIAL_SSEC 0x00 |
| #define | RTC_INITIAL_MDAY 0x01 |
| #define | RTC_INITIAL_YEAR 0x00 |
| #define | RTC_INITIAL_YEARH 20 |
| #define | TIMER_DISPLAY_ID (void *)(uint32_t)1 |
| #define | ALARM_TRIGGERED 1U |
| #define | ALARM_DEACTIVATED 0U |
| #define | ACTIVE 1U |
| #define | INACTIVE 0U |
| #define | TICKS 0u |
Functions | |
| void | Clock_Init (void) |
| Use once to Initialize the clock. | |
| void | Clock_Task (void) |
| Run periodically. It allows to configure the clock. | |
Interfaces for clock process.
void Clock_Init( void ) : Use once to Initialize the clock. Don't requires any parameter void Clock_Task( void ) : Run continuosuly. It allows to configure the clock
| #define ACTIVE 1U |
Statement is true
| #define ALARM_DEACTIVATED 0U |
Alarm inactive
| #define ALARM_TRIGGERED 1U |
Alarm active
| #define INACTIVE 0U |
Statement is false
| #define TICKS 0u |
The maximum amount of time
| #define TIMER_DISPLAY_ID (void *)(uint32_t)1 |
ID for timer used to update display
| #define TOTAL_CLOCK_STATES 4U |
Total states in event machine
| void Clock_Init | ( | void | ) |
Use once to Initialize the clock.
Initializes RTC peripheral using 32.768kHz external clock Sets time and date to 12:00:00 JAN 1 1999
< Value for RTC async prediv
< Value for RTC sync prediv
< Initial RTC hour
< Initial RTC minutes
< Initial RTC seconds
< Initial RTC subseconds
< Initial RTC day
< Initial RTC year 2 last digit
< Initial RTC year 2 first dig
< ID for timer used to update display
| void Clock_Task | ( | void | ) |
Run periodically. It allows to configure the clock.
Verifies if clockQueue has elements to read, if it's true passes the received message(s) to eventmachine for processing data according to its type
< The maximum amount of time
< Statement is true
< Statement is false
< The maximum amount of time