Defines | |
#define | TIME_RATE_PSK31 4800 |
The change in the CCP_1 register for each interrupt period. 1mS for PSK31, 104uS for 9600 baud APRS, 3.3mS for 300 baud HF-APRS. | |
#define | TIME_RATE_APRS 500 |
#define | TIME_RATE_HF_APRS 16000 |
#define | TIME_ROLLOVER_PSK31 100 |
The number of interrupts in a 100mS time period. | |
#define | TIME_ROLLOVER_APRS 960 |
#define | TIME_ROLLOVER_HF_APRS 30 |
Functions | |
uint8_t | timeGetTicks () |
Running 8-bit counter that ticks every 100mS. | |
void | timeInit () |
Initialize the real-time clock. | |
uint8_t | timeGetHours () |
Get the time since boot in hours. | |
uint8_t | timeGetMinutes () |
Get the time since boot in minutes. | |
void | timeSetDutyCycle (uint8_t dutyCycle) |
Set the blink duty cycle of the heartbeat LED. | |
void | timeSetRunFlag () |
Set a flag to indicate the flight time should run. | |
void | timeSetMode (TIME_MODE mode) |
Set the time base for PSK31 or APRS. | |
void | timeUpdate () |
Variables | |
uint8_t | timeTicks |
A counter that ticks every 100mS. | |
uint16_t | timeInterruptCount |
Counts the number of 1mS interrupts for a 100mS time period. | |
uint8_t | time100ms |
Counts the number of 100mS time periods in 1 second. | |
uint8_t | timeSeconds |
System time in seconds. | |
uint8_t | timeMinutes |
System time in minutes. | |
uint8_t | timeHours |
System time in hours. | |
uint8_t | timeDutyCycle |
Desired LED duty cycle 0 to 9. | |
uint16_t | timeCompare |
Time compare register 1 value. | |
uint16_t | timeRate |
The CCP1 timer delta between each interrupt. | |
bool_t | timeUpdateFlag |
Flag set true once per second. | |
bool_t | timeRunFlag |
Flag that indicate the flight time should run. | |
uint16_t | timeInterruptCountRollOver |
The number of interrupts in a 100mS time period. The value changes based on the current mode. | |
TIME_MODE | timeMode |
The current time base mode. |
The interrupt clock PRI is 104uS (9600 bps).
#define TIME_RATE_APRS 500 |
Referenced by timeInit(), and timeSetMode().
#define TIME_RATE_HF_APRS 16000 |
Referenced by timeSetMode().
#define TIME_RATE_PSK31 4800 |
The change in the CCP_1 register for each interrupt period. 1mS for PSK31, 104uS for 9600 baud APRS, 3.3mS for 300 baud HF-APRS.
Referenced by timeSetMode().
#define TIME_ROLLOVER_APRS 960 |
Referenced by timeInit(), and timeSetMode().
#define TIME_ROLLOVER_HF_APRS 30 |
Referenced by timeSetMode().
#define TIME_ROLLOVER_PSK31 100 |
uint8_t timeGetHours | ( | ) |
Get the time since boot in hours.
References timeHours.
Referenced by ballastCheck(), and cutDownCheck().
uint8_t timeGetMinutes | ( | ) |
Get the time since boot in minutes.
References timeMinutes.
Referenced by ballastCheck().
uint8_t timeGetTicks | ( | ) |
Running 8-bit counter that ticks every 100mS.
References timeTicks.
Referenced by gpsSetup().
void timeInit | ( | ) |
Initialize the real-time clock.
References TIME_DUTYCYCLE_70, TIME_MODE_APRS, TIME_RATE_APRS, TIME_ROLLOVER_APRS, timeCompare, timeDutyCycle, timeHours, timeInterruptCount, timeInterruptCountRollOver, timeMinutes, timeMode, timeRate, timeRunFlag, timeSeconds, timeTicks, and timeUpdateFlag.
Referenced by main().
void timeSetDutyCycle | ( | uint8_t | dutyCycle | ) |
Set the blink duty cycle of the heartbeat LED.
The LED blinks at a 1Hz rate.
dutyCycle | TIME_DUTYCYCLE_xx constant |
References timeDutyCycle.
Referenced by gpsSetup(), and main().
void timeSetMode | ( | TIME_MODE | mode | ) |
Set the time base for PSK31 or APRS.
mode | TIME_MODE_APRS or TIME_MODE_PSK31 constant |
References TIME_MODE_APRS, TIME_MODE_HF_APRS, TIME_MODE_PSK31, TIME_RATE_APRS, TIME_RATE_HF_APRS, TIME_RATE_PSK31, TIME_ROLLOVER_APRS, TIME_ROLLOVER_HF_APRS, TIME_ROLLOVER_PSK31, timeInterruptCount, timeInterruptCountRollOver, timeMode, and timeRate.
Referenced by psk31TxPacket(), and tncTxPacket().
void timeSetRunFlag | ( | ) |
Set a flag to indicate the flight time should run.
This flag is typically set when the payload lifts off.
References timeRunFlag.
Referenced by main().
void timeUpdate | ( | ) |
References IO_LED, psk31TimeUpdate(), serialUpdate(), TIME_MODE_PSK31, timeCompare, timeDutyCycle, timeHours, timeInterruptCount, timeInterruptCountRollOver, timeMinutes, timeMode, timeRate, timeRunFlag, timeSeconds, timeTicks, timeUpdateFlag, and tncTimeUpdate().
System time in hours.
Referenced by timeGetHours(), timeInit(), timeUpdate(), and tncStatusPacket().
Counts the number of 1mS interrupts for a 100mS time period.
Referenced by timeInit(), timeSetMode(), and timeUpdate().
The number of interrupts in a 100mS time period. The value changes based on the current mode.
Referenced by timeInit(), timeSetMode(), and timeUpdate().
System time in minutes.
Referenced by timeGetMinutes(), timeInit(), timeUpdate(), and tncStatusPacket().
The CCP1 timer delta between each interrupt.
Referenced by timeInit(), timeSetMode(), and timeUpdate().
Flag that indicate the flight time should run.
Referenced by timeInit(), timeSetRunFlag(), and timeUpdate().