diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2020-01-04 19:13:56 -0800 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2020-01-04 19:13:56 -0800 |
commit | e01381a40290f1dcf8eb1ff467a621050f5a9948 (patch) | |
tree | 7420bc114eba77cfe45cfe40abdcbb26e564ddd6 /main.c | |
parent | fbd4c9cc4f101cf2dacb3521517facfbd36c41ac (diff) | |
download | christmas_lights-e01381a40290f1dcf8eb1ff467a621050f5a9948.tar.gz christmas_lights-e01381a40290f1dcf8eb1ff467a621050f5a9948.tar.xz |
consistent function braces
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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; } |