A class for LED outputs using the MAX7219 LED display driver.  
 More...
#include <AH/Hardware/ExtendedInputOutput/MAX7219.hpp>
A class for LED outputs using the MAX7219 LED display driver. 
The SPI interface is used.
- Todo:
 - Wiring diagram for SPI connection. 
 
Definition at line 21 of file MAX7219.hpp.
 
◆ MAX7219()
◆ begin()
◆ pinMode()
  
  
      
        
          | void pinMode  | 
          ( | 
          pin_t  | 
          pin,  | 
         
        
           | 
           | 
          uint8_t  | 
          mode  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
The pinMode function is not implemented because the mode is OUTPUT by definition. 
Implements ExtendedIOElement.
Definition at line 39 of file MAX7219.hpp.
 
 
◆ digitalWrite()
  
  
      
        
          | void digitalWrite  | 
          ( | 
          pin_t  | 
          pin,  | 
         
        
           | 
           | 
          uint8_t  | 
          val  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Set the state of a given output pin. 
- Parameters
 - 
  
    | pin | The output pin to set.  | 
    | val | The value to set the output to. (Either HIGH (1) or LOW (0))  | 
  
   
Implements ExtendedIOElement.
Definition at line 53 of file MAX7219.hpp.
 
 
◆ digitalRead()
  
  
      
        
          | int digitalRead  | 
          ( | 
          pin_t  | 
          pin | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Get the current state of a given output. 
- Parameters
 - 
  
    | pin | The output to read the state from.  | 
  
   
- Return values
 - 
  
    | 0 | The state of the output is LOW.  | 
    | 1 | The state of the output is HIGH.  | 
  
   
Implements ExtendedIOElement.
Definition at line 68 of file MAX7219.hpp.
 
 
◆ analogRead()
The analogRead function is deprecated because a MAX7219 is always digital. 
- Parameters
 - 
  
    | pin | The output to read the state from.  | 
  
   
- Return values
 - 
  
    | 0 | The state of the output is LOW.  | 
    | 1023 | The state of the output is HIGH.  | 
  
   
Implements ExtendedIOElement.
Definition at line 80 of file MAX7219.hpp.
 
 
◆ analogWrite()
The analogWrite function is deprecated because a MAX7219 is always digital. 
- Parameters
 - 
  
    | pin | The output to set.  | 
    | val | The value to set the output to. A value greater or equal to 0x80 will set the output to a HIGH state, a value less than 0x80 will set the output to a LOW state. | 
  
   
- Note
 - This function is just implemented for compatibility. Don't use it in new code. 
 
Implements ExtendedIOElement.
Definition at line 97 of file MAX7219.hpp.
 
 
◆ update()
◆ 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.
 
 
◆ pins()
◆ length()
  
  
      
        
          | static constexpr uint16_t length  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticconstexprinherited   | 
  
 
 
◆ beginAll()
◆ pin()
Get the extended IO pin number of a given physical pin of this extended IO element. 
- Parameters
 - 
  
    | pin | The zero-based physical pin number of this IO element.  | 
  
   
- Returns
 - The global, unique extended IO pin number for the given pin. 
 
Definition at line 28 of file ExtendedIOElement.cpp.
 
 
◆ operator[]()
Get the extended IO pin number of a given physical pin of this extended IO element. 
 It is alias for ExtendedIOElement::pin. 
- Parameters
 - 
  
    | pin | The zero-based physical pin number of this IO element.  | 
  
   
- Returns
 - The global, unique extended IO pin number for the given pin. 
 
Definition at line 43 of file ExtendedIOElement.cpp.
 
 
◆ getLength()
  
  
      
        
          | pin_t getLength  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
Get the number of pins this IO element has. 
- Returns
 - The number of pins this IO element has. 
 
Definition at line 45 of file ExtendedIOElement.cpp.
 
 
◆ getEnd()
Get the largest global extended IO pin number that belongs to this extended IO element. 
Definition at line 47 of file ExtendedIOElement.cpp.
 
 
◆ getStart()
Get the smallest global extended IO pin number that belongs to this extended IO element. 
Definition at line 49 of file ExtendedIOElement.cpp.
 
 
◆ getAll()
◆ buffer
◆ 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
◆ start
◆ end
◆ offset
  
  
      
        
          | pin_t offset = NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS | 
         
       
   | 
  
staticprivateinherited   | 
  
 
 
◆ elements
◆ next
◆ previous
The documentation for this class was generated from the following file: