summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2020-01-04 19:13:56 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2020-01-04 19:13:56 -0800
commite01381a40290f1dcf8eb1ff467a621050f5a9948 (patch)
tree7420bc114eba77cfe45cfe40abdcbb26e564ddd6 /main.c
parentfbd4c9cc4f101cf2dacb3521517facfbd36c41ac (diff)
downloadchristmas_lights-e01381a40290f1dcf8eb1ff467a621050f5a9948.tar.gz
christmas_lights-e01381a40290f1dcf8eb1ff467a621050f5a9948.tar.xz
consistent function braces
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;
}