#ifndef MATRIX_H #define MATRIX_H #include #include #define N_ROWS 5 #define N_COLS 10 struct row_t { uint8_t bytes[N_COLS]; }; struct matrix_t { union { row_t rows[N_ROWS]; uint8_t bytes[sizeof(row_t) * N_ROWS]; }; }; extern matrix_t matrix; void matrix_init(); void writeRow(const uint8_t& nRow, const uint16_t& values); void nextRow(); #endif