/* * melody.h * * Created: 16.02.2016 17:21:33 * Author: Martin Danek */ #define PAUSE_SHORT 50 #ifndef MELODY_H_ #define MELODY_H_ void melodyStart(void) { for (int i = 0; i < 3; i ++) { SPK_ON; ARGB_GREEN_ON; MRGB_GREEN_ON; _delay_ms(PAUSE_SHORT); SPK_OFF; ARGB_GREEN_OFF; MRGB_GREEN_OFF; _delay_ms(PAUSE_SHORT); } } void melodyFire(void) { SPK_ON; _delay_ms(30); SPK_OFF; _delay_ms(30); SPK_ON; _delay_ms(30); SPK_OFF; } void melodyHit(void) { SPK_ON; _delay_ms(100); SPK_OFF; _delay_ms(100); SPK_ON; _delay_ms(100); SPK_OFF; _delay_ms(100); SPK_ON; _delay_ms(200); SPK_OFF; } void melodyInvalid(void) { SPK_ON; _delay_ms(100); SPK_OFF; _delay_ms(100); SPK_ON; _delay_ms(100); SPK_OFF; _delay_ms(100); } #endif /* MELODY_H_ */