fremoclock
1_3A01
FREMO Clock - Software for UTG
|
User function called by timer ISR. More...
Go to the source code of this file.
Data Structures | |
struct | fclock_t |
A struct with hour and minute. More... | |
Macros | |
#define | CLOCK_MIDNIGHT { 0, 0 } |
"00:00" alias "24:00" More... | |
#define | CLOCK_STATUS_RUN 0 |
Status Bit of pulse generator: start/stop. More... | |
#define | CLOCK_STATUS_TIME 1 |
Status Bit of pulse generator: with/without increment of actual time. More... | |
#define | CLOCK_TIME_FACTOR_MIN 10 |
minimum *10 (10 = 1:1,0) More... | |
#define | CLOCK_TIME_FACTOR_MAX 119 |
maximum *10 (119 = 1:11.9) More... | |
#define | CLOCK_PULSE_WIDTH_MIN 5 |
minimum pulse width in 0.1s (5 = 500ms) More... | |
#define | CLOCK_PULSE_WIDTH_MAX 19 |
maximum pulse width in 0.1s (19 = 1.9s) More... | |
Functions | |
void | ClockKernelInit (void) |
Initialization of the pulse generator. More... | |
void | SysTimerUserInterrupt (void) |
This function is called by SysHWTimer every 1ms. More... | |
void | SysTimerUserInterrupt10 (void) |
This function is called by SysHWTimer every 10ms. More... | |
void | SysTimerUserInterrupt100 (void) |
This function is called by SysHWTimer every 100ms. More... | |
void | ClockSetStatus (uint8_t ucStatus) |
Set status of pulse generator. More... | |
uint8_t | ClockReadStatus (void) |
Read status of pulse generator. More... | |
uint8_t | ClockIsRunning (void) |
Value used as parameter to ClockSetStatus() to start clock. More... | |
void | ClockSetPeriod (uint16_t uiPeriod) |
Set length of model minute in 100ms. More... | |
uint16_t | ClockReadPeriod (void) |
Get length of model minute in 100ms. More... | |
void | ClockSetPulse (uint16_t uiPulse) |
Set length of pulse length in 100ms. More... | |
uint16_t | ClockReadPulse (void) |
Get length of pulse length in 100ms. More... | |
void | ClockSetTime (fclock_t newValue) |
Set actual time. More... | |
fclock_t | ClockGetTime (void) |
Get actual time. More... | |
void | ClockSetTimeFactor (uint8_t ucFactor) |
Set time factor. More... | |
uint8_t | ClockReadTimeFactor (void) |
Get time factor. More... | |
void | ClockSetStartTimeMinute (uint8_t ucMinute) |
Set the minute of the start time. More... | |
uint8_t | ClockReadStartTimeMinute (void) |
Get the minute of the start time. More... | |
void | ClockSetStartTimeHour (uint8_t ucHour) |
Set the hour of the start time. More... | |
uint8_t | ClockReadStartTimeHour (void) |
Get the hour of the start time. More... | |
void | ClockSetEndTimeMinute (uint8_t ucMinute) |
Set the minute of the end time. More... | |
uint8_t | ClockReadEndTimeMinute (void) |
Get the minute of the end time. More... | |
void | ClockSetEndTimeHour (uint8_t ucHour) |
Set the hour of the end time. More... | |
uint8_t | ClockReadEndTimeHour (void) |
Get the hour of the end time. More... | |
User function called by timer ISR.
Subroutines for clock kernel with:
Software:
Targets:
History:
Definition in file ClockKernel.h.
#define CLOCK_MIDNIGHT { 0, 0 } |
"00:00" alias "24:00"
Definition at line 74 of file ClockKernel.h.
#define CLOCK_PULSE_WIDTH_MAX 19 |
maximum pulse width in 0.1s (19 = 1.9s)
Definition at line 100 of file ClockKernel.h.
#define CLOCK_PULSE_WIDTH_MIN 5 |
minimum pulse width in 0.1s (5 = 500ms)
Definition at line 99 of file ClockKernel.h.
#define CLOCK_STATUS_RUN 0 |
Status Bit of pulse generator: start/stop.
Definition at line 85 of file ClockKernel.h.
#define CLOCK_STATUS_TIME 1 |
Status Bit of pulse generator: with/without increment of actual time.
Definition at line 92 of file ClockKernel.h.
#define CLOCK_TIME_FACTOR_MAX 119 |
maximum *10 (119 = 1:11.9)
Definition at line 97 of file ClockKernel.h.
#define CLOCK_TIME_FACTOR_MIN 10 |
minimum *10 (10 = 1:1,0)
Definition at line 96 of file ClockKernel.h.
fclock_t ClockGetTime | ( | void | ) |
Get actual time.
Atomic access to variable clock
.
Definition at line 317 of file ClockKernel.c.
uint8_t ClockIsRunning | ( | void | ) |
Value used as parameter to ClockSetStatus() to start clock.
Definition at line 228 of file ClockKernel.c.
void ClockKernelInit | ( | void | ) |
Initialization of the pulse generator.
Definition at line 107 of file ClockKernel.c.
uint8_t ClockReadEndTimeHour | ( | void | ) |
Get the hour of the end time.
endTimeHour
Definition at line 446 of file ClockKernel.c.
uint8_t ClockReadEndTimeMinute | ( | void | ) |
Get the minute of the end time.
endTimeMinute
Definition at line 422 of file ClockKernel.c.
uint16_t ClockReadPeriod | ( | void | ) |
Get length of model minute in 100ms.
The read is done with interrupts disabled.
Definition at line 255 of file ClockKernel.c.
uint16_t ClockReadPulse | ( | void | ) |
Get length of pulse length in 100ms.
The read is done with interrupts disabled.
clockPulse
Definition at line 286 of file ClockKernel.c.
uint8_t ClockReadStartTimeHour | ( | void | ) |
Get the hour of the start time.
startTimeHour
Definition at line 398 of file ClockKernel.c.
uint8_t ClockReadStartTimeMinute | ( | void | ) |
Get the minute of the start time.
startTimeMinute
Definition at line 374 of file ClockKernel.c.
uint8_t ClockReadStatus | ( | void | ) |
Read status of pulse generator.
The read is done with interrupts disabled.
Definition at line 214 of file ClockKernel.c.
uint8_t ClockReadTimeFactor | ( | void | ) |
Get time factor.
Definition at line 350 of file ClockKernel.c.
void ClockSetEndTimeHour | ( | uint8_t | ucHour | ) |
Set the hour of the end time.
ucHour | new value of variable endTimeMinute |
Definition at line 434 of file ClockKernel.c.
void ClockSetEndTimeMinute | ( | uint8_t | ucMinute | ) |
Set the minute of the end time.
ucMinute | new value of variable endTimeMinute |
Definition at line 410 of file ClockKernel.c.
void ClockSetPeriod | ( | uint16_t | uiPeriod | ) |
Set length of model minute in 100ms.
The write is done with interrupts disabled.
uiPeriod | the new value of clockPeriod |
Definition at line 239 of file ClockKernel.c.
void ClockSetPulse | ( | uint16_t | uiPulse | ) |
Set length of pulse length in 100ms.
The write is done with interrupts disabled.
uiPulse | the new value for clockPulse |
Definition at line 270 of file ClockKernel.c.
void ClockSetStartTimeHour | ( | uint8_t | ucHour | ) |
Set the hour of the start time.
ucHour | new value of variable startTimeHour |
Definition at line 386 of file ClockKernel.c.
void ClockSetStartTimeMinute | ( | uint8_t | ucMinute | ) |
Set the minute of the start time.
ucMinute | new value of variable startTimeMinute |
Definition at line 362 of file ClockKernel.c.
void ClockSetStatus | ( | uint8_t | ucStatus | ) |
Set status of pulse generator.
Bits used are:
The write is done with interrupts disabled.
ucStatus | the new status |
Definition at line 187 of file ClockKernel.c.
void ClockSetTime | ( | fclock_t | newValue | ) |
Set actual time.
Atomic access to variable clock.
newValue | the new value for clock . |
Definition at line 301 of file ClockKernel.c.
void ClockSetTimeFactor | ( | uint8_t | ucFactor | ) |
Set time factor.
ucFactor | the new time factor. |
Definition at line 331 of file ClockKernel.c.
void SysTimerUserInterrupt | ( | void | ) |
This function is called by SysHWTimer every 1ms.
Be careful, not to overload this isr. Runs with global interrupts disabled.
Definition at line 135 of file ClockKernel.c.
void SysTimerUserInterrupt10 | ( | void | ) |
This function is called by SysHWTimer every 10ms.
Be careful, not to overload this isr. Runs with global interrupts disabled.
Definition at line 145 of file ClockKernel.c.
void SysTimerUserInterrupt100 | ( | void | ) |
This function is called by SysHWTimer every 100ms.
Be careful, not to overload this isr. Runs with global interrupts disabled.
Definition at line 155 of file ClockKernel.c.