-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathled.h
23 lines (18 loc) · 759 Bytes
/
led.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// led.h
// Module to support 16 X 32 LED
// Translated from https://learn.adafruit.com/connecting-a-16x32-rgb-led-matrix-panel-to-a-raspberry-pi/experimental-python-code
// Refered : https://www.cs.sfu.ca/CourseCentral/433/bfraser/other/2015-student-howtos/Adafruit16x32LEDMatrixGuideForBBB-Code/test_ledMatrix.c
#ifndef __LED_H
#define __LED_H
// export GPIOs and set Directions to out for them
int LED_init(void);
void LED_cleanup(void);
// display rectangle on LED
// @params:
// two vertexs for diagonal of the rectangle
// (x1, y1) : one of Vertex for rectangle
// (x2, y2) : the other vertex for rectangle
void LED_display_rectangle(int x1, int y1, int x2, int y2, int color);
// Clean up LED
void LED_clean_display(void);
#endif