-
Notifications
You must be signed in to change notification settings - Fork 0
/
led_shift_ctrl.h
58 lines (42 loc) · 1.29 KB
/
led_shift_ctrl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Shift.h
*
* Created on: Oct 1, 2013
* Author: Evan Tchelepi
*/
#ifndef SHIFT_H_
#define SHIFT_H_
/*defined variables and descriptions*/
#define SRCLK_PIN PB2 /*This is pin 10 on the board*/
#define RCLK_PIN PB1 /*I THINK this is pin 9*/
/*defined variables and descriptions*/
#define SRCLK_ANODE_PIN PB5 /*Pin 13 on the board*/
#define RCLK_ANODE_PIN PB4 /*Pin 12 on the board*/
//How many of the shift registers are there daisey chained?
#define number_of_74hc595s 1
/*We have multiple banks of LED output*/
#define SER_PIN_BANK_1 PB0 /**/
#define SER_PIN_BANK_2 PB3 /**/
#define SER_PIN_BANK_3 PB4 /**/
#define SER_PIN_BANK_4 PB5 /**/
#define SER_PIN_BANK_5 PB6 /**/
#define SER_PIN_BANK_6 PB7 /**/
#define PIN_8 PB0 //PD4
#define PIN_9 PB1 //PD4
#define PIN_10 PB2 //PD4
#define LED PB5 //PD4
#define SIZE_OF_BANK 16 // The size of each LED bank
#define NUM_TRI_LEDS 52
#define NUM_COLORS_PER_LED 3
/*The size of a LED color pattern. This is how many times we need to flash
* a color value inorder to create the illusion of a color*/
#define COLOR_DEPTH 64
#define QUEUE_SIZE 10
/*Define types we need for our design*/
typedef struct tri_color_led
{
char RED;
char GREEN;
char BLUe;
}TRI_COLOR_LED;
#endif /* SHIFT_H_ */