Sanyo LC75711 VFD controller/driver for upto 16 Dot Matrix Characters

Dependents:   mbed_LC75711

The component page is here.

Files at this revision

API Documentation at this revision

Comitter:
wim
Date:
Wed Sep 13 18:25:24 2017 +0000
Parent:
0:5eb5fee234e8
Child:
2:cb6f2b7930c8
Commit message:
Fixed doxygen comments

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
LC75711_UDC.inc Show annotated file Show diff for this revision Revisions of this file
--- a/LC75711.cpp	Tue Sep 12 18:36:56 2017 +0000
+++ b/LC75711.cpp	Wed Sep 13 18:25:24 2017 +0000
@@ -2,6 +2,7 @@
  * Note: The LC75710, LC75711 and LC75712 differ only in the built-in character ROM
  *
  * Copyright (c) 2017, v01: WH, Initial version
+ *               2017, v02: WH, Cleaned up docs  
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -29,8 +30,8 @@
 
  /** Constructor for class for driving Sanyo LC75711 VFD controller
   *
-  * @brief Supports upto 16 Grids of 35 matrix segments. Also supports 3-8 additional segments (depending on number of grids).
-  *        SPI bus interface device. 
+  *  @brief Supports upto 16 Grids of 35 matrix segments. Also supports 3-8 additional segments (depending on number of grids).
+  *         SPI bus interface device. 
   *  @param  PinName mosi, sclk, cs SPI bus pins
   *  @param  Mode selects number of Grids and Segments (default 11 Grids, 35 matrix segments, 8 additional segments)
   */
@@ -40,6 +41,7 @@
 }
 
 /** Init the LC75711 interface and the controller
+  *
   * @param  none
   * @return none
   */ 
@@ -78,7 +80,10 @@
 
 
 /** Clear the screen and locate to 0
- */  
+  *
+  * @param none
+  * @return none  
+  */  
 void LC75711::cls() {
 
   for (int cnt=0; cnt<LC75711_DISPLAY_MEM; cnt++) {
@@ -94,7 +99,8 @@
 /** 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/disable (default = all)
+  * @return none  
   */
 void LC75711::setBlink(bool on, int grids) {
   
@@ -133,6 +139,7 @@
 /** Set the Display mode On/off
   *
   * @param bool display mode
+  * @return none  
   */
 void LC75711::setDisplay(bool on) {
   char display;
@@ -154,7 +161,8 @@
 /** Set User Defined Characters (UDC)
   *
   * @param unsigned char udc_idx   The Index of the UDC (0..7)
-  * @param UDCData_t udc_data      The bitpattern for the UDC (7 bytes)       
+  * @param UDCData_t udc_data      The bitpattern for the UDC (7 bytes)
+  * @return none  
   */
 void LC75711::setUDC(unsigned char udc_idx, UDCData_t udc_data) {
   char data;
@@ -197,8 +205,9 @@
 
 
 /** Write Data to LC75711
-  *  @Param char data Character code
-  *  @Param char address Parameter for data
+  *
+  *  @param char data Character code
+  *  @param char address Parameter for data
   *  @return none
   */  
 void LC75711::writeData(char data, char address){
@@ -213,8 +222,9 @@
 }  
 
 /** Write Additional Data to LC75711
-  *  @Param char adata Additional code (annunciator)
-  *  @Param char address Parameter for data
+  *
+  *  @param char adata Additional code (annunciator)
+  *  @param char address Parameter for data
   *  @return none
   */  
 void LC75711::writeAData(char adata, char address){
@@ -230,11 +240,12 @@
 
 
 /** Set Address
-  *  @Param char RAM address for data displayed at Grid1 (0..63)
-  *  @Param char RAM address for adata displayed at Grid1 (0..15) 
+  *
+  *  @param char RAM address for data displayed at Grid1 (0..63)
+  *  @param char RAM address for adata displayed at Grid1 (0..15) 
   *  @return none
   *
-  * Note that a Shift (L/R) command will change the Address of data displayed at Grid1
+  *  Note that a Shift (L/R) command will change the Address of data displayed at Grid1
   */  
 void LC75711::_setAddress(char data_addr, char adata_addr){
 
@@ -250,10 +261,11 @@
 
 
 /** Write command and parameters to LC75711
-  *  @Param char cmd Command byte
-  *  @Param char data1 Parameters for command
-  *  @Param char data0 Parameters for command  
-  *  @Param char delay Delay for command execution
+  *
+  *  @param char cmd Command byte
+  *  @param char data1 Parameters for command
+  *  @param char data0 Parameters for command  
+  *  @param char delay Delay for command execution
   *  @return none
   */  
 void LC75711::_writeCmd(char cmd, char data1, char data0, char delay){
@@ -280,6 +292,7 @@
 
 
 /** Helper to reverse all command or databits. The LC75711 expects LSB first, whereas SPI is MSB first
+  *
   *  @param  char data
   *  @return bitreversed data
   */ 
@@ -321,6 +334,7 @@
 /** Locate cursor to a screen column
   *
   * @param column  The horizontal position from the left, indexed from 0
+  * @return none  
   */
 void LC75711_ASTON::locate(int column) {
   //sanity check
@@ -342,7 +356,9 @@
 
 
 /** Clear the screen and locate to 0
+  *
   * @param bool clrAll Clear Icons also (default = false)
+  * @return none  
   */ 
 void LC75711_ASTON::cls(bool clrAll) {  
 
@@ -400,6 +416,9 @@
 }
 
 /** Write a single character (Stream implementation)
+  * 
+  * @param value char to print
+  * @return value;
   */
 int LC75711_ASTON::_putc(int value) {
     int addr;
@@ -434,7 +453,11 @@
     return value;
 }
 
-// get a single character (Stream implementation)
+/** Get a single character (Stream implementation)
+  *
+  * @param none  
+  * @return -1
+  */
 int LC75711_ASTON::_getc() {
     return -1;
 }
--- a/LC75711.h	Tue Sep 12 18:36:56 2017 +0000
+++ b/LC75711.h	Wed Sep 13 18:25:24 2017 +0000
@@ -2,6 +2,7 @@
  * Note: The LC75710, LC75711 and LC75712 differ only in the built-in character ROM
  *
  * Copyright (c) 2017, v01: WH, Initial version
+ *               2017, v02: WH, Cleaned up docs 
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -376,21 +377,25 @@
     
  /** Constructor for class for driving Sanyo LC75711 VFD controller
   *
-  * @brief Supports upto 16 Grids of 35 matrix segments. Also supports 3-8 additional segments (depending on number of grids).
-  *        SPI bus interface device. 
+  *  @brief Supports upto 16 Grids of 35 matrix segments. Also supports 3-8 additional segments (depending on number of grids).
+  *         SPI bus interface device. 
   *  @param  PinName mosi, sclk, cs SPI bus pins
   *  @param  Mode selects number of Grids and Segments (default 11 Grids, 35 matrix segments, 8 additional segments)
   */
   LC75711(PinName mosi, PinName sclk, PinName cs, Mode mode = Grid11_Add8);
       
   /** Clear the screen and locate to 0
-   */ 
+    *
+    * @param none
+    * @return none
+    */ 
   void cls();  
 
   /** Set the Blink mode
     *
     * @param bool blink mode
     * @param int  grids selected grids for Blinking enable/disable (default = all)
+    * @return none    
     */
   void setBlink(bool on, int grids = LC75711_GR_ALL);
   
@@ -404,6 +409,7 @@
   /** Set the Display mode On/off
     *
     * @param bool display mode
+    * @return none    
     */
   void setDisplay(bool on);
 
@@ -411,21 +417,24 @@
   /** Set User Defined Characters (UDC)
     *
     * @param unsigned char udc_idx   The Index of the UDC (0..7)
-    * @param UDCData_t udc_data      The bitpattern for the UDC (7 bytes)       
+    * @param UDCData_t udc_data      The bitpattern for the UDC (7 bytes)
+    * @return none    
     */
   void setUDC(unsigned char udc_idx, UDCData_t udc_data);
 
  
- /** Write Data to LC75711
-    *  @Param char data Character code
-    *  @Param char address Parameter for data
+  /** Write Data to LC75711
+    *
+    *  @param char data Character code
+    *  @param char address Parameter for data
     *  @return none
     */  
   void writeData(char data, char address);
 
   /** Write Additional Data to LC75711
-    *  @Param char adata Additional code (annunciator)
-    *  @Param char address Parameter for data
+    *
+    *  @param char adata Additional code (annunciator)
+    *  @param char address Parameter for data
     *  @return none
     */  
   void writeAData(char adata, char address);
@@ -438,12 +447,14 @@
   int _blink; // Local shadow
     
   /** Init the SPI interface and the controller
+    *
     * @param  none
     * @return none
     */ 
   void _init();
 
   /** Helper to reverse all command or databits. The LC75711 expects LSB first, whereas SPI is MSB first
+    *
     *  @param  char data
     *  @return bitreversed data
     */ 
@@ -451,20 +462,22 @@
 
 
   /** Set Address
-    *  @Param char RAM address for data displayed at Grid1 (0..63)
-    *  @Param char RAM address for adata displayed at Grid1 (0..15) 
+    *
+    *  @param char RAM address for data displayed at Grid1 (0..63)
+    *  @param char RAM address for adata displayed at Grid1 (0..15) 
     *  @return none
     *
-    * Note that a Shift (L/R) command will change the Address of data displayed at Grid1
+    *  Note that a Shift (L/R) command will change the Address of data displayed at Grid1
     */  
   void _setAddress(char data_addr=0, char adata_addr=0);
 
 
   /** Write command and parameters to LC75711
-    *  @Param char cmd Command byte
-    *  @Param char data1 Parameters for command
-    *  @Param char data0 Parameters for command  
-    *  @Param char delay Delay for command execution
+    *
+    *  @param char cmd Command byte
+    *  @param char data1 Parameters for command
+    *  @param char data0 Parameters for command  
+    *  @param char delay Delay for command execution
     *  @return none
     */  
   void _writeCmd(char cmd, char data1, char data0, char delay);
@@ -497,7 +510,7 @@
 
   /** Enums for Icons
    *
-   *  @Brief Aston display uses Grid 11 to show Icons.
+   *  @brief Aston display uses Grid 11 to show Icons.
    *         The Icons are each connnected to one of the 35 segments. 
    *         Icons are controlled by redefining UDC_0. 
    *  Icon Enums encode UDC_0 byte index in 8 MSBs and encode Icon bit/segment in 8 LSBs
@@ -538,6 +551,7 @@
     /** Write a character to the Display
      *
      * @param c The character to write to the display
+     * @return char written
      */
     int putc(int c);
 
@@ -552,10 +566,12 @@
      /** Locate cursor to a screen column
      *
      * @param column  The horizontal position from the left, indexed from 0
+     * @return none     
      */
     void locate(int column);
     
     /** Clear the screen and locate to 0
+     *
      * @param bool clrAll Clear Icons also (default = false)
      */
     void cls(bool clrAll = false);
@@ -574,7 +590,6 @@
      */
     void clrIcon(Icon icon);
 
-
    /** Number of screen columns
     *
     * @param none
@@ -582,24 +597,6 @@
     */
     int columns();   
 
-   /** Write databyte to LC75711
-     *  @param  int address display memory location to write byte
-     *  @param  char data byte written at given address
-     *  @return none
-     */ 
-//    void writeData(int address, char data){
-//      LC75711::writeData(address, data);
-//    }        
- 
-   /** Write Display datablock to LC75711
-    *  @param  DisplayData_t data Array of LC75711_DISPLAY_MEM (=48) bytes for displaydata (starting at address 0)
-    *  @param  length number bytes to write (valid range 0..(ASTON_NR_GRIDS * LC75711_BYTES_PER_GRID) == 36, starting at address 0)   
-    *  @return none
-    */   
-//    void writeData(DisplayData_t data, int length = (ASTON_NR_GRIDS * LC75711_BYTES_PER_GRID)) {
-//      LC75711::writeData(data, length);
-//    }  
-
 protected:  
     // Stream implementation functions
     virtual int _putc(int value);
--- a/LC75711_UDC.inc	Tue Sep 12 18:36:56 2017 +0000
+++ b/LC75711_UDC.inc	Wed Sep 13 18:25:24 2017 +0000
@@ -25,7 +25,7 @@
 #include "LC75711_Config.h"
 
 #if(LC75711_UDC == 1)
-// User Defined Characters (UDCs) are defined by a 7 byte bitpattern. The P0..P5 form the character pattern.
+// User Defined Characters (UDCs) are defined by a 7 byte bitpattern. The P0..P4 form the character pattern.
 //     P7 P6 P5 P4 P3 P2 P1 P0 
 // 0   x  x  x  0  1  1  1  0
 // 1   x  x  x  1  0  0  0  1