Fast Digital I/O functions and template class. 
  
  | 
        
          | static void badPinCheck | ( | uint8_t | pin | ) |  |  | inlinestatic | 
 
Check for valid pin number 
- Parameters
- 
  
    | [in] | pin | Number of pin to be checked. |  
 
 
 
      
        
          | void badPinNumber | ( | void |  | ) |  | 
      
 
generate bad pin number error 
 
 
  
  | 
        
          | static void fastBitWriteSafe | ( | volatile uint8_t * | address, |  
          |  |  | uint8_t | bit, |  
          |  |  | bool | level |  
          |  | ) |  |  |  | inlinestatic | 
 
fast write helper 
- Parameters
- 
  
    | [in] | address | I/O register address |  | [in] | bit | bit number to write |  | [in] | level | value for bit |  
 
 
 
  
  | 
        
          | static bool fastDigitalRead | ( | uint8_t | pin | ) |  |  | inlinestatic | 
 
read pin value 
- Parameters
- 
  
    | [in] | pin | Arduino pin number |  
 
- Returns
- value read 
 
 
  
  | 
        
          | static void fastDigitalToggle | ( | uint8_t | pin | ) |  |  | inlinestatic | 
 
toggle a pin 
- Parameters
- 
  
    | [in] | pin | Arduino pin number |  
 
If the pin is in output mode toggle the pin level. If the pin is in input mode toggle the state of the 20K pull-up. 
 
 
  
  | 
        
          | static void fastDigitalWrite | ( | uint8_t | pin, |  
          |  |  | bool | level |  
          |  | ) |  |  |  | inlinestatic | 
 
Set pin value 
- Parameters
- 
  
    | [in] | pin | Arduino pin number |  | [in] | level | value to write |  
 
 
 
  
  | 
        
          | static void fastPinConfig | ( | uint8_t | pin, |  
          |  |  | bool | mode, |  
          |  |  | bool | level |  
          |  | ) |  |  |  | inlinestatic | 
 
set pin configuration 
- Parameters
- 
  
    | [in] | pin | Arduino pin number |  | [in] | mode | If true set output mode else input mode |  | [in] | level | If mode is output, set level high/low. If mode is input, enable or disable the pin's 20K pull-up. |  
 
 
 
  
  | 
        
          | static void fastPinMode | ( | uint8_t | pin, |  
          |  |  | bool | mode |  
          |  | ) |  |  |  | inlinestatic | 
 
set pin mode 
- Parameters
- 
  
    | [in] | pin | Arduino pin number |  | [in] | mode | if true set output mode else input mode |  
 
fastPinMode does not enable or disable the 20K pull-up for input mode. 
 
 
  
  | 
        
          | const uint8_t digitalPinCount = sizeof(pinMap)/sizeof(pin_map_t) |  | static |