summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/main.c b/main.c
index e7ed542..f96a707 100644
--- a/main.c
+++ b/main.c
@@ -10,7 +10,8 @@
static struct colour seq[6];
static bool interrupted = false;
-void red_green() {
+void red_green()
+{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmemset-elt-size"
memset(seq, 0, 2 * sizeof(seq[0]));
@@ -32,7 +33,8 @@ void red_green() {
}
}
-void rainbow() {
+void rainbow()
+{
memset(seq, 0, 6 * sizeof(seq[0]));
seq[0].r = 255;
@@ -58,7 +60,8 @@ void rainbow() {
}
}
-void sound_reactive() {
+void sound_reactive()
+{
memset(seq, 0, 3 * sizeof(seq[0]));
int offset = 0;
@@ -87,7 +90,8 @@ void sound_reactive() {
}
}
-int main() {
+int main()
+{
DDRB |= (1 << LED_PIN);
PORTB &= ~(1 << LED_PIN);
@@ -114,7 +118,8 @@ int main() {
return 0;
}
-ISR(PCINT0_vect) {
+ISR(PCINT0_vect)
+{
if (!(PINB & (1 << ISR_PIN)))
interrupted = true;
}