aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Martindale <awiamartindale@googlemail.com>2011-09-07 13:49:21 +0100
committerAdam Martindale <awiamartindale@googlemail.com>2011-09-07 13:49:21 +0100
commit3b1f8bc3e446dfc18a25987b25247abfbcee730e (patch)
tree7936b634c42e629236f5789dc4627b432a5c59c5
parentcd0fdd04f3108f61482919309b2a2da5c33f6872 (diff)
parent89557022d57e3d72ea9021691d70c80763fa31b6 (diff)
downloadpunchingbag-3b1f8bc3e446dfc18a25987b25247abfbcee730e.tar
punchingbag-3b1f8bc3e446dfc18a25987b25247abfbcee730e.tar.gz
Merge branch 'master' of gitorious.org:punchingbag/punchingbag
-rwxr-xr-xArduino/Libraies/AS1107/AS1107.cpp5
-rwxr-xr-xArduino/Libraies/AS1107/AS1107.h8
2 files changed, 8 insertions, 5 deletions
diff --git a/Arduino/Libraies/AS1107/AS1107.cpp b/Arduino/Libraies/AS1107/AS1107.cpp
index c61819e..45a722c 100755
--- a/Arduino/Libraies/AS1107/AS1107.cpp
+++ b/Arduino/Libraies/AS1107/AS1107.cpp
@@ -428,8 +428,11 @@ AS1107::AS1107(byte cspin, byte clkpin, byte datapin)
// ------------------------------------------------------------------------------------
// Initializes Arduino and AS1107
// buffer is the initial screen buffer
-void AS1107::Init(byte * buffer)
+void AS1107::Init(byte * buffer, byte _Maxx, byte _Maxy, byte _cNum)
{
+ Maxx = _Maxx;
+ Maxy = _Maxy;
+ HighestCtrlNum = _cNum;
_buffer = buffer;
CalculateCharOffsets();
// Clear Screen buffer
diff --git a/Arduino/Libraies/AS1107/AS1107.h b/Arduino/Libraies/AS1107/AS1107.h
index 80b01da..7e9b2ab 100755
--- a/Arduino/Libraies/AS1107/AS1107.h
+++ b/Arduino/Libraies/AS1107/AS1107.h
@@ -36,7 +36,7 @@ class AS1107
void WriteRegister2(byte chip, byte reg, byte data);
void WriteRegister(byte chip, byte reg, byte data);
void WriteColumn( byte column, byte data);
- void Init(byte *buffer);
+ void Init(byte *buffer, byte Maxx, byte Maxy, byte cNum);
void SetBuffer(byte *buffer);
void SetLed(int x, int y, byte value);
void Clear();
@@ -59,9 +59,9 @@ class AS1107
// ***************************************
// Set your module configuration here
// ***************************************
- static const byte Maxx=8; // maximum x - Pixels of the Module
- static const byte Maxy=19; // maximum y - Pixels of the Module
- static const byte HighestCtrlNum=5; // Number of Matrix modules -1 (0 = single module)
+ byte Maxx; // maximum x - Pixels of the Module
+ byte Maxy; // maximum y - Pixels of the Module
+ byte HighestCtrlNum; // Number of Matrix modules -1 (0 = single module)
private:
byte _cspin;