SELKIELogger  1.0.0
Collaboration diagram for SN3218 Control Functions:

Classes

struct  i2c_sn3218_state
 SN3218 State representation. More...
 

Functions

bool i2c_sn3218_reset (const int busHandle)
 Reset device to defaults. More...
 
bool i2c_sn3218_update (const int busHandle, const i2c_sn3218_state *state)
 Configure SN3218 chip to match state object. More...
 

Detailed Description

Function Documentation

◆ i2c_sn3218_reset()

bool i2c_sn3218_reset ( const int  busHandle)

Reset device to defaults.

Sends a reset command to connected SN3218 device on this I2C bus

Parameters
busHandleHandle for I2C bus opened with i2c_openConnection()
Returns
true on successful write, false otherwise

Definition at line 32 of file I2C-SN3218.c.

◆ i2c_sn3218_update()

bool i2c_sn3218_update ( const int  busHandle,
const i2c_sn3218_state state 
)

Configure SN3218 chip to match state object.

Sends configuration commands followed by an update command to a connected SN3218 device.

As we cannot read state from the chip, all LEDs must be configured on each request.

Parameters
busHandleHandle for I2C bus opened with i2c_openConnection()
statePointer to i2c_sn3218_state object
Returns
true on successful write of all commands, false otherwise

Definition at line 50 of file I2C-SN3218.c.