aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/main.c')
-rw-r--r--src/app/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/app/main.c b/src/app/main.c
index 6fe7cd7..5b35286 100644
--- a/src/app/main.c
+++ b/src/app/main.c
@@ -6,6 +6,7 @@
/* Definitions for pins */
#define PORTB_PLL_MUXOUT (1 << 0)
+#define PORTB_LED_STATUS (1 << 1)
#define PORTB_PLL_LE (1 << 4)
#define PORTB_PLL_DATA (1 << 3)
#define PORTB_PLL_CLK (1 << 2)
@@ -74,8 +75,8 @@ int main(void)
seconds = 0;
/* Configure GPIO */
- PORTB = PORTB_PLL_LE;
- DDRB = PORTB_PLL_CLK | PORTB_PLL_LE | PORTB_PLL_DATA;
+ PORTB = PORTB_PLL_LE | PORTB_LED_STATUS;
+ DDRB = PORTB_PLL_CLK | PORTB_PLL_LE | PORTB_PLL_DATA | PORTB_LED_STATUS;
/* initialise timer interrupt */
inittimer();
@@ -105,15 +106,15 @@ int main(void)
while (1) {
/*
- // We actually dont use the timer, but the code is kept around as a reference.
const uint32_t second = seconds % 60uL;
const uint32_t minute = seconds / 60uL;
-
if ((PINB & PORTB_PLL_MUXOUT) == 0) {
delay_ms(600);
}
*/
- delay_ms(1000);
+ delay_ms(200);
+
+ set_pin(PORTB_LED_STATUS, seconds % 4 < 2);
}
return 0;