52 #ifndef CLOCKKERNEL_H_ 53 #define CLOCKKERNEL_H_ 74 #define CLOCK_MIDNIGHT { 0, 0 } 75 // CLOCK_MIDNIGHT should be defined as 'const fclock_t', but C sucks: 85 #define CLOCK_STATUS_RUN 0 92 #define CLOCK_STATUS_TIME 1 96 #define CLOCK_TIME_FACTOR_MIN 10 97 #define CLOCK_TIME_FACTOR_MAX 119 99 #define CLOCK_PULSE_WIDTH_MIN 5 100 #define CLOCK_PULSE_WIDTH_MAX 19 uint8_t ClockReadEndTimeHour(void)
Get the hour of the end time.
A struct with hour and minute.
uint8_t ClockReadStartTimeHour(void)
Get the hour of the start time.
void SysTimerUserInterrupt10(void)
This function is called by SysHWTimer every 10ms.
void ClockSetPeriod(uint16_t uiPeriod)
Set length of model minute in 100ms.
void ClockSetTime(fclock_t newValue)
Set actual time.
uint8_t minute
minute value 0..59
void SysTimerUserInterrupt(void)
This function is called by SysHWTimer every 1ms.
void ClockSetPulse(uint16_t uiPulse)
Set length of pulse length in 100ms.
uint16_t ClockReadPulse(void)
Get length of pulse length in 100ms.
uint8_t ClockReadStartTimeMinute(void)
Get the minute of the start time.
void ClockSetStartTimeMinute(uint8_t ucMinute)
Set the minute of the start time.
uint16_t ClockReadPeriod(void)
Get length of model minute in 100ms.
void SysTimerUserInterrupt100(void)
This function is called by SysHWTimer every 100ms.
uint8_t hour
hour value 0..23
uint8_t ClockReadStatus(void)
Read status of pulse generator.
fclock_t ClockGetTime(void)
Get actual time.
uint8_t ClockReadTimeFactor(void)
Get time factor.
void ClockSetStatus(uint8_t ucStatus)
Set status of pulse generator.
void ClockSetEndTimeHour(uint8_t ucHour)
Set the hour of the end time.
uint8_t ClockReadEndTimeMinute(void)
Get the minute of the end time.
uint8_t ClockIsRunning(void)
Value used as parameter to ClockSetStatus() to start clock.
void ClockSetTimeFactor(uint8_t ucFactor)
Set time factor.
void ClockSetStartTimeHour(uint8_t ucHour)
Set the hour of the start time.
void ClockSetEndTimeMinute(uint8_t ucMinute)
Set the minute of the end time.
void ClockKernelInit(void)
Initialization of the pulse generator.