diff options
Diffstat (limited to 'trafficlight.h')
| -rw-r--r-- | trafficlight.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/trafficlight.h b/trafficlight.h index efc2306..f1f94a9 100644 --- a/trafficlight.h +++ b/trafficlight.h @@ -20,9 +20,20 @@ typedef struct Traffic{ uint8_t green; } Traffic; +typedef struct Bcd{ + uint32_t port; + uint8_t A; + uint8_t B; + uint8_t C; + uint8_t D; +} Bcd; + extern Traffic tf1; extern Traffic tf2; extern Traffic tf_ped; +extern Bcd bcd1; +extern Bcd bcd2; +extern Bcd bcd_ped; extern bool switch_pressed; extern uint32_t period_1; extern uint32_t period_2; @@ -33,4 +44,5 @@ void Traffic_Handler(Traffic *tf, uint32_t timer); void set_tf_color(Traffic tf, uint8_t color); void PortInit(uint32_t port, uint32_t clk, uint32_t input, uint32_t output); void TimerInit(uint32_t timer, void(*timer_handler)(), uint32_t clk, uint32_t delay); +void BcdWrite(Bcd bcd, uint32_t timer, bool ped); |
