piano 4 octaves, 8 notes, 3 threads, 2 outputs, no bug, clean code, comments, remove old .h
Fork of Nucleo_piano_CS435 by
Diff: button_value.h
- Revision:
- 3:ca0d5d72f842
diff -r 35f13b7f3659 -r ca0d5d72f842 button_value.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/button_value.h Mon Jul 02 18:01:08 2018 +0000 @@ -0,0 +1,29 @@ +#ifndef BUTTON_VALUE_H_ +#define BUTTON_VALUE_H_ + +#define PERIOD(x) 1.0 / (x * 1000000.0) + +#define ALL_BUTTONS 0x0; +#define NO_BUTTONS 0xF; + +#define DO 0xE; // DO +#define BUTTON_1_2 0xC; +#define BUTTON_1_2_3 0x8; +#define BUTTON_1_2_4 0x4; +#define BUTTON_1_3 0xA; +#define BUTTON_1_3_4 0x2; +#define BUTTON_1_4 0x6; + +#define RE 0xD; // RE +#define BUTTON_2_3 0x9; +#define BUTTON_2_3_4 0x1; +#define BUTTON_2_4 0x5; + +#define MI 0xB; // MI +#define BUTTON_3_4 0x3; + +#define FA 0x7; // FA + +void check_buttons(); + +#endif \ No newline at end of file