Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Arduino 1.0 compliant

  • Loading branch information...
commit d10f9a00421ccd121dd8c607feed052d26eb8655 1 parent dd535ea
@PaintYourDragon PaintYourDragon authored
Showing with 8 additions and 4 deletions.
  1. +7 −3 HT1632.cpp
  2. +1 −1  HT1632.h
View
10 HT1632.cpp
@@ -277,7 +277,7 @@ void HT1632LEDMatrix::setTextColor(uint8_t c) {
textcolor = c;
}
-#if (ARDUINO >= 100)
+#if ARDUINO >= 100
size_t HT1632LEDMatrix::write(uint8_t c) {
#else
void HT1632LEDMatrix::write(uint8_t c) {
@@ -291,6 +291,9 @@ void HT1632LEDMatrix::write(uint8_t c) {
drawChar(cursor_x, cursor_y, c, textcolor, textsize);
cursor_x += textsize*6;
}
+#if ARDUINO >= 100
+ return 1;
+#endif
}
@@ -384,7 +387,8 @@ void HT1632::clrPixel(uint16_t i) {
}
void HT1632::dumpScreen() {
-Serial.println("---------------------------------------");
+ Serial.println("---------------------------------------");
+
for (uint16_t i=0; i<(WIDTH*HEIGHT/8); i++) {
Serial.print("0x");
Serial.print(ledmatrix[i], HEX);
@@ -455,7 +459,7 @@ void HT1632::writeRAM(uint8_t addr, uint8_t data) {
}
-uint8_t HT1632::sendcommand(uint8_t cmd) {
+void HT1632::sendcommand(uint8_t cmd) {
uint16_t data = 0;
data = HT1632_COMMAND;
data <<= 8;
View
2  HT1632.h
@@ -47,7 +47,7 @@ class HT1632 {
int8_t WIDTH, HEIGHT;
int8_t _data, _cs, _wr, _rd;
uint8_t ledmatrix[48]; // 16 * 24 / 8
- uint8_t sendcommand(uint8_t c);
+ void sendcommand(uint8_t c);
void writedata(uint16_t d, uint8_t bits);
void writeRAM(uint8_t addr, uint8_t data);
};
Please sign in to comment.
Something went wrong with that request. Please try again.