A class for 8-digit 7-segment displays with a MAX7219 driver.  
 More...
#include <AH/Hardware/LEDs/MAX7219SevenSegmentDisplay.hpp>
A class for 8-digit 7-segment displays with a MAX7219 driver. 
Definition at line 49 of file MAX7219SevenSegmentDisplay.hpp.
 
◆ MAX7219SevenSegmentDisplay()
◆ begin()
◆ display() [1/3]
  
  
      
        
          | uint8_t display  | 
          ( | 
          long  | 
          number,  | 
         
        
           | 
           | 
          uint8_t  | 
          startDigit = 0,  | 
         
        
           | 
           | 
          uint8_t  | 
          endDigit = 7  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Display a long integer number to the display. 
The number will be right-aligned.
- Parameters
 - 
  
    | number | The number to display.  | 
    | startDigit | The digit (zero-based, counting from the right) to start printing the number.  
 Digits: 7 6 5 4 3 2 1 0  | 
    | endDigit | The last digit (zero-based, counting from the right) that can be printed. If the number is larger than endDigit - startDigit, the number is truncated on the left. If the number is smaller than endDigit - startDigit, the leftmost digits including endDigit are cleared.  | 
  
   
- Returns
 - The number of digits that have been overwritten (
endDigit - startDigit).  
Definition at line 83 of file MAX7219SevenSegmentDisplay.hpp.
 
 
◆ display() [2/3]
  
  
      
        
          | uint8_t display  | 
          ( | 
          const char *  | 
          text,  | 
         
        
           | 
           | 
          uint8_t  | 
          startPos = 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Display a string of text to the display. 
Full stops are printed to the decimal point between characters.
- Parameters
 - 
  
    | text | The null-terminated string to display.  | 
    | startPos | The position to start printing.  | 
  
   
Definition at line 108 of file MAX7219SevenSegmentDisplay.hpp.
 
 
◆ display() [3/3]
  
  
      
        
          | uint8_t display  | 
          ( | 
          const uint8_t(&)  | 
          characters[N],  | 
         
        
           | 
           | 
          uint8_t  | 
          startPos = 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
 
◆ printHex()
  
  
      
        
          | void printHex  | 
          ( | 
          uint8_t  | 
          digit,  | 
         
        
           | 
           | 
          uint8_t  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Print a single hexadecimal digit. 
- Parameters
 - 
  
    | digit | The digit to print to [0, 7].  | 
    | value | The 4-bit value to print [0, 15]. | 
  
   
- Todo:
 - Rename to 
printHexChar and create function that actually prints longer hexadecimal numbers.  
Definition at line 164 of file MAX7219SevenSegmentDisplay.hpp.
 
 
◆ init()
◆ clear()
◆ send()
  
  
      
        
          | void send  | 
          ( | 
          uint8_t  | 
          digit,  | 
         
        
           | 
           | 
          uint8_t  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineinherited   | 
  
 
Send the value to the given digit. 
- Parameters
 - 
  
    | digit | The digit or row to set [0, 7].  | 
    | value | The value to set the row to.  | 
  
   
Definition at line 71 of file MAX7219_Base.hpp.
 
 
◆ sendRaw()
  
  
      
        
          | void sendRaw  | 
          ( | 
          uint8_t  | 
          opcode,  | 
         
        
           | 
           | 
          uint8_t  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineinherited   | 
  
 
Send a raw opcode and value to the MAX7219. 
- Parameters
 - 
  
    | opcode | The opcode to send.  | 
    | value | The value to send.  | 
  
   
Definition at line 83 of file MAX7219_Base.hpp.
 
 
◆ setIntensity()
  
  
      
        
          | void setIntensity  | 
          ( | 
          uint8_t  | 
          intensity | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Set the intensity of the LEDs. 
- Parameters
 - 
  
    | intensity | The intensity [0, 15].  | 
  
   
Definition at line 98 of file MAX7219_Base.hpp.
 
 
◆ DECODEMODE
  
  
      
        
          | constexpr uint8_t DECODEMODE = 9 | 
         
       
   | 
  
staticconstexprinherited   | 
  
 
 
◆ INTENSITY
  
  
      
        
          | constexpr uint8_t INTENSITY = 10 | 
         
       
   | 
  
staticconstexprinherited   | 
  
 
 
◆ SCANLIMIT
  
  
      
        
          | constexpr uint8_t SCANLIMIT = 11 | 
         
       
   | 
  
staticconstexprinherited   | 
  
 
 
◆ SHUTDOWN
  
  
      
        
          | constexpr uint8_t SHUTDOWN = 12 | 
         
       
   | 
  
staticconstexprinherited   | 
  
 
 
◆ DISPLAYTEST
  
  
      
        
          | constexpr uint8_t DISPLAYTEST = 15 | 
         
       
   | 
  
staticconstexprinherited   | 
  
 
 
◆ loadPin
◆ settings
The documentation for this class was generated from the following file: