modm API documentation
modm::is31fl3733< I2cMaster > Class Template Reference

#include <modm/driver/display/is31fl3733.hpp>

Inheritance diagram for modm::is31fl3733< I2cMaster >:
modm::I2cDevice< I2cMaster >

Classes

struct  LedData
 

Public Typedefs

using LedBinaryData = uint16_t[SizeX]
 

Public Types

enum  Addr : uint8_t { GND = 0b00, SCL = 0b01, SDA = 0b10, VCC = 0b11 }
 
enum  Register : uint16_t {
  LED_ON_OFF = 0x8000, LED_OPEN = 0x8018, LED_SHORT = 0x8030, PWM = 0x8100,
  AUTO_BREATH_MODE = 0x8200, CONFIGURATION = 0x8300, GLOBAL_CURRENT_CONTROL = 0x8301, ABM_1 = 0x8302,
  ABM_2 = 0x8306, ABM_3 = 0x830A, TIME_UPDATE = 0x830E, SW_PULL_UP = 0x830F,
  CS_PULL_DOWN = 0x8310, RESET = 0x8311, COMMAND = 0xFD, COMMAND_WRITE_LOCK = 0xFE,
  INTERRUPT_MASK = 0xF0, INTERRUPT_STATUS = 0xF1
}
 
enum  Resistor : uint8_t {
  None = 0, kOhm_0_5 = 1, kOhm_1 = 2, kOhm_2 = 3,
  kOhm_4 = 4, kOhm_8 = 5, kOhm_16 = 6, kOhm_32 = 7
}
 

Public Member Functions

 Is31fl3733 (uint8_t address=addr ())
 
bool enable (uint8_t x, uint8_t y)
 
void enableAll ()
 
bool disable (uint8_t x, uint8_t y)
 
void disableAll ()
 
bool setPwm (uint8_t x, uint8_t y, uint8_t pwm)
 
void setAllPwm (uint8_t pwm)
 
LedBinaryData & ledsOpen ()
 
LedBinaryData & ledsShort ()
 
bool reset ()
 
bool setGlobalCurrent (uint8_t current)
 
bool clearSoftwareShutdown ()
 
bool setSwPullUp (Resistor value)
 
bool setCsPullDown (Resistor value)
 
bool triggerOpenShortDetection ()
 
bool readOpenShort ()
 
bool writeOnOff ()
 
bool writePwm ()
 
bool writeRegister (Register reg, uint8_t value, uint8_t offset=0)
 
bool readRegister (Register reg, uint8_t *const value, uint8_t offset=0)
 
void attachConfigurationHandler (I2c::ConfigurationHandler handler)
 
bool ping ()
 
bool read (uint8_t *buffer, std::size_t size)
 Starts a write transaction and waits until finished.
 
void setAddress (uint8_t address)
 
bool write (const uint8_t *buffer, std::size_t size)
 Starts a write transaction and waits until finished.
 
bool writeRead (const uint8_t *writeBuffer, std::size_t writeSize, uint8_t *readBuffer, std::size_t readSize)
 Starts a write-read transaction and waits until finished.
 

Static Public Member Functions

static constexpr uint8_t addr (Addr addr2=Addr::GND, Addr addr1=Addr::GND)
 Available I2C addresses.
 

Static Public Attributes

static constexpr uint8_t SizeX {12}
 
static constexpr uint8_t SizeY {16}
 

Protected Member Functions

bool setPage (Register reg)
 
bool isTransactionRunning ()
 
bool runTransaction ()
 Starts our own transaction and waits until finished.
 
bool startTransaction ()
 Starts the transaction with our own transaction object.
 
bool startTransaction (modm::I2cTransaction *transaction)
 Starts the transaction with a separate transaction object.
 
bool wasTransactionSuccessful ()
 

Static Protected Member Functions

static constexpr bool hasPage (Register reg)
 
static constexpr uint8_t getPage (Register reg)
 

Protected Attributes

struct modm::Is31fl3733::LedData modm_packed
 
uint16_t led_open [SizeX]
 
uint16_t led_short [SizeX]
 
LedData data
 
uint8_t current_page {0xff}
 
uint8_t buffer [2]
 
I2cWriteReadTransaction transaction
 

Static Protected Attributes

static constexpr uint8_t LED_ON_OFF_size = 0x18
 
static constexpr uint8_t LED_OPEN_size = LED_ON_OFF_size
 
static constexpr uint8_t LED_SHORT_size = LED_ON_OFF_size
 
static constexpr uint8_t PWM_size = 0xC0
 
static constexpr uint8_t AUTO_BREATH_MODE_size = PWM_size
 

Detailed Description

template<class I2cMaster>
class modm::is31fl3733< I2cMaster >

Author
Niklas Hauser

Member Function Documentation

void modm::I2cDevice< I2cMaster, 10 , I2cWriteReadTransaction >::attachConfigurationHandler ( I2c::ConfigurationHandler  handler)
inheritedinline

Attaches a configuration handler, which is called before a transaction, whenever the configuration has to be changed.

bool modm::I2cDevice< I2cMaster, 10 , I2cWriteReadTransaction >::isTransactionRunning ( )
inheritedinlineprotected
Returns
true when transaction is busy.
bool modm::I2cDevice< I2cMaster, 10 , I2cWriteReadTransaction >::ping ( )
inheritedinline
Return Values
truedevice responds to address
falseno device with address found
void modm::I2cDevice< I2cMaster, 10 , I2cWriteReadTransaction >::setAddress ( uint8_t  address)
inheritedinline

Sets a new address of the slave device.

Parameters
addressthe slave address not yet shifted left (address < 128).
bool modm::I2cDevice< I2cMaster, 10 , I2cWriteReadTransaction >::wasTransactionSuccessful ( )
inheritedinlineprotected
Returns
true when transaction did not return an error.

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