diff --git a/main.c b/main.c index 0b6b52d..ee1e687 100644 --- a/main.c +++ b/main.c @@ -81,8 +81,23 @@ volatile uint8_t frame_count = 0; /**< number of frames passed */ #define MUX_S2_PORT B /**< port to select multiplexer output */ #define MUX_S2_PIN 5 /**< pin to select multiplexer output */ +/** number to be display and changed using the buttons */ +struct number_t { + uint16_t number; /**< number to display (0-9999, 0xffff=off) */ + uint8_t up; /**< which of the 16 buttons is to increment the number */ + uint8_t down; /**< which of the 16 buttons is to decrement the number */ +}; /** episode, scene, take, video 1, audio 1, video 2, audio 2 number (does not have to be in this order) */ -uint16_t numbers[7] = {0}; +struct number_t numbers[] = { + {0, 2, 3}, + {0, 14, 15}, + {0, 10, 11}, + {0, 6, 7}, + {0, 1, 0}, + {0, 13, 12}, + {0, 5, 4}, +}; + #define POWER_SWITCH_PORT B /**< port to switch power of all devices (including this micro-controller) */ #define POWER_SWITCH_PIN 8 /**< pin to switch power of all devices (including this micro-controller) */ @@ -498,10 +513,10 @@ void main(void) // display numbers on TM1637 for (uint8_t number=0; number