You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.0 KiB
62 lines
1.0 KiB
#include "system.h"
|
|
#include "pio.h"
|
|
#include "pacer.h"
|
|
|
|
|
|
/** Define PIO pins driving LED matrix rows. */
|
|
static const pio_t rows[] =
|
|
{
|
|
LEDMAT_ROW1_PIO, LEDMAT_ROW2_PIO, LEDMAT_ROW3_PIO,
|
|
LEDMAT_ROW4_PIO, LEDMAT_ROW5_PIO, LEDMAT_ROW6_PIO,
|
|
LEDMAT_ROW7_PIO
|
|
};
|
|
|
|
|
|
/** Define PIO pins driving LED matrix columns. */
|
|
static const pio_t cols[] =
|
|
{
|
|
LEDMAT_COL1_PIO, LEDMAT_COL2_PIO, LEDMAT_COL3_PIO,
|
|
LEDMAT_COL4_PIO, LEDMAT_COL5_PIO
|
|
};
|
|
|
|
|
|
static const uint8_t bitmap[] =
|
|
{
|
|
0x30, 0x46, 0x40, 0x46, 0x30
|
|
};
|
|
|
|
|
|
|
|
static void display_column (uint8_t row_pattern, uint8_t current_column)
|
|
{
|
|
|
|
/* TODO */
|
|
|
|
}
|
|
|
|
|
|
int main (void)
|
|
{
|
|
uint8_t current_column = 0;
|
|
|
|
system_init ();
|
|
pacer_init (500);
|
|
|
|
/* TODO: Initialise LED matrix pins. */
|
|
|
|
|
|
while (1)
|
|
{
|
|
pacer_wait ();
|
|
|
|
display_column (bitmap[current_column], current_column);
|
|
|
|
current_column++;
|
|
|
|
if (current_column > (LEDMAT_COLS_NUM - 1))
|
|
{
|
|
current_column = 0;
|
|
}
|
|
}
|
|
}
|