34 lines
918 B
C
34 lines
918 B
C
|
/*
|
||
|
Charliplexing.h - Library for controlling the charliplexed led board
|
||
|
from JimmiePRodgers.com
|
||
|
Created by Alex Wenger, December 30, 2009.
|
||
|
Modified by Matt Mets, May 28, 2010.
|
||
|
Released into the public domain.
|
||
|
*/
|
||
|
|
||
|
#ifndef Charliplexing_h
|
||
|
#define Charliplexing_h
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
#define SINGLE_BUFFER 0
|
||
|
#define DOUBLE_BUFFER 1
|
||
|
#define GRAYSCALE 2
|
||
|
|
||
|
#define DISPLAY_COLS 14 // Number of columns in the display
|
||
|
#define DISPLAY_ROWS 9 // Number of rows in the display
|
||
|
#define SHADES 8 // Number of distinct shades to display, including black, i.e. OFF
|
||
|
|
||
|
extern volatile unsigned int LedSign_tcnt2;
|
||
|
|
||
|
void LedSignInit(uint8_t mode);
|
||
|
void LedSignSet(uint8_t x, uint8_t y, uint8_t c);
|
||
|
void LedSignSetBrightness(uint8_t brightness);
|
||
|
void LedSignFlip(bool blocking);
|
||
|
void LedSignClear(int set);
|
||
|
void LedSignHorizontal(int y, int set);
|
||
|
void LedSignVertical(int x, int set);
|
||
|
|
||
|
#endif
|