template<typename GpioExpander, GpioExpander & expander, typename GpioExpander::Pin pin>
class modm::GpioExpanderPin< GpioExpander, expander, pin >
Create an modm::GpioIO compatible interface from any IO-expander conforming to the modm::GpioExpander interface.
This allows the transparent usage of IO Expander pins in classes that require Gpios as template arguments.
- Note
- For every pin access a blocking bus transfer is performed, therefore do not expect these gpios to be fast!
Usage: 
However, instead of using this class like that, prefer using the alias-template types provided by the IO-expander of your choice for better readability:
Expander expander;
 
typedef Expander::P0< expander > Rs;
typedef Expander::P1< expander > Rw;
typedef Expander::P2< expander > E;
typedef Expander::P3< expander > Backlight;
 
Backlight::set();
 
- Warning
- Access to the IO-expander is blocking and can silently fail! If this is undesirable for you application, you need to write your own wrapper!
- Precondition
- The IO-expander needs to be initialized externally, if required.
- See also
- modm::GpioExpander 
- 
modm::GpioIO
- Template Parameters
- 
  
  
- Author
- Sascha Schade 
- 
Niklas Hauser