JeeLib
An easy interface to the port headers, the RF12 driver library, timers, low-power code, and more.
 All Classes Files Functions Variables Enumerations Macros Pages
DimmerPlug Class Reference

Interface for the Dimmer Plug - see https://jeelabs.org/dp. More...

#include <Ports.h>

Inheritance diagram for DimmerPlug:
DeviceI2C

Public Types

enum  {
  MODE1, MODE2, PWM0, PWM1,
  PWM2, PWM3, PWM4, PWM5,
  PWM6, PWM7, PWM8, PWM9,
  PWM10, PWM11, PWM12, PWM13,
  PWM14, PWM15, GRPPWM, GRPFREQ,
  LEDOUT0, LEDOUT1, LEDOUT2, LEDOUT3,
  SUBADR1, SUBADR2, SUBADR3, ALLCALLADR
}
 

Public Member Functions

 DimmerPlug (PortI2C &port, byte addr)
 
void begin ()
 
byte getReg (byte reg) const
 
void setReg (byte reg, byte value) const
 
void setMulti (byte reg,...) const
 
- Public Member Functions inherited from DeviceI2C
 DeviceI2C (const PortI2C &p, uint8_t me)
 
bool isPresent () const
 see if a device answers at an I2C address
 
uint8_t send () const
 Create a start condition on the I2C bus, and set things up for sending data to this device. More...
 
uint8_t receive () const
 Create a start condition on the I2C bus, and set things up for receiving data from this device. More...
 
void stop () const
 Create a stop condition on the I2C bus, ending the current transfer.
 
uint8_t write (uint8_t data) const
 Write a byte to the currently addressed device. More...
 
uint8_t read (uint8_t last) const
 Read a byte from the currently addressed device. More...
 
void setAddress (uint8_t me)
 

Detailed Description

Interface for the Dimmer Plug - see https://jeelabs.org/dp.


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