45 lines
808 B
C
45 lines
808 B
C
|
#include <stdio.h>
|
||
|
#include <stdint.h>
|
||
|
#include <wiringPi.h>
|
||
|
|
||
|
#ifdef WIRING_PI_DEBUG
|
||
|
#include "wiring_debug.h"
|
||
|
#endif
|
||
|
|
||
|
#include "display.h"
|
||
|
|
||
|
#define INPUT_A 22
|
||
|
#define INPUT_B 23
|
||
|
#define LOAD 24
|
||
|
#define CLOCK 25
|
||
|
#define PAUSE 1
|
||
|
|
||
|
#define BOARD_SIZE_X 64
|
||
|
#define BOARD_SIZE_Y 40
|
||
|
#define BOARD_PIXEL_COUNT BOARD_SIZE_X * BOARD_SIZE_Y
|
||
|
|
||
|
#define BLOCK_SIZE_X 4
|
||
|
#define BLOCK_SIZE_Y 8
|
||
|
#define BLOCK_PIXEL_COUNT BLOCK_SIZE_X * BLOCK_SIZE_Y
|
||
|
#define BOARD_BLOCK_COUNT 80
|
||
|
|
||
|
uint32_t display_block_array[BOARD_BLOCK_COUNT];
|
||
|
|
||
|
void
|
||
|
display_setup(void)
|
||
|
{
|
||
|
wiringPiSetup();
|
||
|
|
||
|
pinMode(INPUT_A, OUTPUT);
|
||
|
digitalWrite(INPUT_A, LOW);
|
||
|
|
||
|
pinMode(INPUT_B, OUTPUT);
|
||
|
digitalWrite(INPUT_B, LOW);
|
||
|
|
||
|
pinMode(LOAD, OUTPUT);
|
||
|
digitalWrite(LOAD, LOW);
|
||
|
|
||
|
pinMode(CLOCK, OUTPUT);
|
||
|
digitalWrite(CLOCK, LOW);
|
||
|
}
|