binary Clock
|
Main logic of the Binary Clock firmware. Handles calling all other functions other than interrupt driven ISRs. More...
#include <avr/io.h>
#include "timer_4313.h"
#include "RTC_DS3231.h"
#include "LED.h"
#include "UART.h"
#include "i2c.h"
#include "hardware.h"
#include "color.h"
#include "ports.h"
#include "global_defines.h"
#include <stdint.h>
Macros | |
#define | COMMAND_LENGTH 6 |
number of bytes in a valid UART command. More... | |
Enumerations | |
enum | state_t { RUN_TIME, RUN_MANUAL } |
Current state of the clock. More... | |
Functions | |
int | main (void) |
Variables | |
state_t | system_state = RUN_TIME |
keeps track of the system state. More... | |
uint8_t | uart_command_received = 0 |
valid command received flag. More... | |
uint8_t | LED_multiplex_timer_count = 0 |
count of mutiplex handler timer events. More... | |
uint8_t | command_buffer [COMMAND_LENGTH] |
where UART commands are buffered. More... | |
Main logic of the Binary Clock firmware. Handles calling all other functions other than interrupt driven ISRs.
#define COMMAND_LENGTH 6 |
number of bytes in a valid UART command.
enum state_t |
int main | ( | void | ) |
Runs the main program.
Order of opperation:
uint8_t command_buffer[COMMAND_LENGTH] |
where UART commands are buffered.
uint8_t LED_multiplex_timer_count = 0 |
count of mutiplex handler timer events.
uint8_t uart_command_received = 0 |
valid command received flag.