PT2258 Arduino Library
PT2258 Class Reference

#include <PT2258.h>

Public Member Functions

 PT2258 (uint8_t address)
 PT2258 Datatype declaration Class Constructor. More...
 
void attenuation (uint8_t channel, uint8_t attenuation)
 Set the individual channel attenuation in db. More...
 
void attenuationAll (uint8_t attenuation)
 Set the attenuation of all the channels at once in db. More...
 
uint8_t begin (void)
 Start the I2C communication. More...
 
void mute (bool mute)
 Mute control for all the channels. No matter the volume, the channels will stay silent. It has to be disabled to hear something. More...
 
void volume (uint8_t channel, uint8_t volume)
 Set the individual channel volume. More...
 
void volumeAll (uint8_t volume)
 Set the volume of all the channels at once. More...
 

Private Member Functions

void PT2258Send (uint8_t a, uint8_t b)
 Send the datas to the IC. More...
 

Private Attributes

uint8_t address
 

Constructor & Destructor Documentation

◆ PT2258()

PT2258::PT2258 ( uint8_t  _address)

PT2258 Datatype declaration Class Constructor.

Parameters
addressSet the I2C address of the IC address (read the PT2258 address on top for correct use).

Member Function Documentation

◆ attenuation()

void PT2258::attenuation ( uint8_t  channel,
uint8_t  attenuation 
)

Set the individual channel attenuation in db.

Parameters
channelChannel to set, form 1 to 6
dbAttenuation in db from 0 (0db) to 79 (79db)

◆ attenuationAll()

void PT2258::attenuationAll ( uint8_t  attenuation)

Set the attenuation of all the channels at once in db.

Parameters
dbAttenuation in db from 0 (0db) to 79 (79db)

◆ begin()

uint8_t PT2258::begin ( void  )

Start the I2C communication.

Returns
Return 1:successful, 0:connection error

◆ mute()

void PT2258::mute ( bool  mute)

Mute control for all the channels. No matter the volume, the channels will stay silent. It has to be disabled to hear something.

Parameters
muteMute active (1, true) or mute not active (0, false)

◆ PT2258Send()

void PT2258::PT2258Send ( uint8_t  a,
uint8_t  b 
)
private

Send the datas to the IC.

Parameters
a10dB byte value
b1dB byte value

◆ volume()

void PT2258::volume ( uint8_t  channel,
uint8_t  volume 
)

Set the individual channel volume.

Parameters
channelChannel to set, form 1 to 6
volumeVolume from 0 (min) to 100 (max)

◆ volumeAll()

void PT2258::volumeAll ( uint8_t  volume)

Set the volume of all the channels at once.

Parameters
volumeVolume from 0 (min) to 100 (max)

Field Documentation

◆ address

uint8_t PT2258::address
private
Parameters
current- IC address

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