micro-ELC
Public Member Functions | List of all members
RelaysDriver Class Referenceabstract

This class defines an interface for any class that can control an array of relays. More...

#include <RelaysDriver.h>

Inheritance diagram for RelaysDriver:
Inheritance graph
[legend]

Public Member Functions

virtual void set (uint16_t bits)=0
 activate relays corresponding to a bit that's 1. More...
 
virtual void begin ()=0
 this function should be called on startup. It sets up pinmodes. More...
 

Detailed Description

This class defines an interface for any class that can control an array of relays.

Note
I use the term "relay," loosely. Solid-state components that can switch power (transistors, triacs and mosfets) are actually better since they can switch faster and last longer.

Member Function Documentation

◆ begin()

virtual void RelaysDriver::begin ( )
pure virtual

this function should be called on startup. It sets up pinmodes.

Implemented in RelaysDriverBasic< N >.

◆ set()

virtual void RelaysDriver::set ( uint16_t  bits)
pure virtual

activate relays corresponding to a bit that's 1.

Note
1 is the LSB, e.g. 001 turns on the first relay.
Parameters
bitsThink of this number as an array of bits. Bits that there is no relay for are ignored.

Implemented in RelaysDriverBasic< N >.


The documentation for this class was generated from the following file: