From 64255d5fc752a4169bdb4910c881cd4234087dc3 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 7 May 2019 17:14:13 +0200 Subject: [PATCH] Star Wars Returns --- kaleid/kernel/io/spkr.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/kaleid/kernel/io/spkr.c b/kaleid/kernel/io/spkr.c index 877d8d9..252cb31 100644 --- a/kaleid/kernel/io/spkr.c +++ b/kaleid/kernel/io/spkr.c @@ -72,25 +72,26 @@ void IoDoTone(uint tone, uint time) void IoDoStarWars(void) { + struct Note { uint tone; uint time; }; - struct Note Score[36] = { {440, 200}, {110, 200}, {440, 200}, {110, 200}, - {440, 200}, {110, 200}, {349, 140}, {110, 100}, - {523, 60}, {110, 100}, {440, 200}, {110, 200}, - {349, 140}, {110, 100}, {523, 60}, {110, 100}, - {440, 200}, {110, 200}, + struct Note Score[40] = { {440, 200}, {110, 200}, {440, 200}, {110, 200}, + {440, 200}, {110, 200}, {349, 140}, {87, 100}, + {523, 60}, {87, 100}, {440, 200}, {110, 200}, + {349, 140}, {87, 100}, {523, 60}, {87, 100}, + {440, 200}, {110, 200}, {440, 200}, {110, 200}, {659, 200}, {110, 200}, {659, 200}, {110, 200}, - {659, 200}, {110, 200}, {698, 140}, {110, 100}, - {523, 60}, {110, 100}, {415, 200}, {110, 200}, - {349, 140}, {110, 100}, {523, 60}, {110, 100}, - {440, 200}, {110, 200} + {659, 200}, {87, 200}, {698, 140}, {87, 100}, + {523, 60}, {87, 100}, {415, 200}, {87, 200}, + {349, 140}, {87, 100}, {523, 60}, {87, 100}, + {440, 200}, {110, 200}, {110, 200}, {110, 200} } ; - for (int i=0; i<36 ; i++) { + for (int i=0; i<40 ; i++) { IoDoTone(Score[i].tone, Score[i].time); } }