Sanyo LC75711 VFD controller/driver for upto 16 Dot Matrix Characters
The component page is here.
Revision 2:cb6f2b7930c8, committed 2017-09-15
- Comitter:
- wim
- Date:
- Fri Sep 15 17:38:40 2017 +0000
- Parent:
- 1:bcf010fcacae
- Child:
- 3:8101f714d38d
- Commit message:
- Modified setBlink(), added clrBlink()
Changed in this revision
| LC75711.cpp | Show annotated file Show diff for this revision Revisions of this file |
| LC75711.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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
*
--- a/LC75711.h Wed Sep 13 18:25:24 2017 +0000
+++ b/LC75711.h 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
@@ -393,11 +394,17 @@
/** 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 setBlink(bool on, int grids = LC75711_GR_ALL);
+ void setBlink(int grids = LC75711_GR_ALL);
+
+ /** Clr the Blink mode
+ *
+ * @param int grids selected grids for Blinking disable (default = all)
+ * @return none
+ */
+ void clrBlink(int grids = LC75711_GR_ALL);
/** Set Brightness
*
LC75711 VFD Driver for upto 16 Dot Matrix Characters,