Sanyo LC75711 VFD controller/driver for upto 16 Dot Matrix Characters
The component page is here.
Diff: LC75711.cpp
- Revision:
- 2:cb6f2b7930c8
- Parent:
- 1:bcf010fcacae
diff -r bcf010fcacae -r cb6f2b7930c8 LC75711.cpp
--- a/LC75711.cpp Wed Sep 13 18:25:24 2017 +0000
+++ b/LC75711.cpp Fri Sep 15 17:38:40 2017 +0000
@@ -3,6 +3,7 @@
*
* Copyright (c) 2017, v01: WH, Initial version
* 2017, v02: WH, Cleaned up docs
+ * 2017, v03: WH, Modified setBlink
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -98,19 +99,13 @@
/** Set the Blink mode
*
- * @param bool Blink mode
- * @param int grids selected grids for Blinking enable/disable (default = all)
+ * @param int grids selected grids for Blinking enable (default = all)
* @return none
*/
-void LC75711::setBlink(bool on, int grids) {
+void LC75711::setBlink(int grids) {
// Sanity check and update of local shadow
- if (on) {
- _blink = _blink | (grids & LC75711_GR_MSK); // Set grid bits
- }
- else {
- _blink = _blink & ~(grids & LC75711_GR_MSK); // Clr grid bits
- }
+ _blink = _blink | (grids & LC75711_GR_MSK); // Set grid bits
_writeCmd((LC75711_BLNK_REG | LC75711_BLNK_ON), // B16..B23, Command register & value
((_blink >> 8) & 0xFF), // B8..B15, GR8..GR16
@@ -118,6 +113,21 @@
LC75711_BLNK_DLY); // Command Delay
}
+/** Clr the Blink mode
+ *
+ * @param int grids selected grids for Blinking disable (default = all)
+ * @return none
+ */
+void LC75711::clrBlink(int grids) {
+
+ // Sanity check and update of local shadow
+ _blink = _blink & ~(grids & LC75711_GR_MSK); // Clr grid bits
+
+ _writeCmd((LC75711_BLNK_REG | LC75711_BLNK_ON), // B16..B23, Command register & value
+ ((_blink >> 8) & 0xFF), // B8..B15, GR8..GR16
+ ( _blink & 0xFF), // B0..B7, GR1..GR7
+ LC75711_BLNK_DLY); // Command Delay
+}
/** Set Brightness
*
LC75711 VFD Driver for upto 16 Dot Matrix Characters,