PU2CLR SI4844 Arduino Library 1.1.7
Arduino Library for Si4844 Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
Basic Functions

Functions

void SI4844::getCommandResponse (int response_size, uint8_t *response)
 Returns with the command response.

 
bool SI4844::getDataStatusInterruptFromDevice ()
 Get the Data Status From Device.
 
uint16_t SI4844::getProperty (uint16_t propertyNumber)
 Gets a given property from the SI4844.
 
bool SI4844::isClearToSend (void)
 Checks the CTS status.
 
void SI4844::sendCommand (uint8_t cmd, int parameter_size, const uint8_t *parameter)
 Sends a given command to the SI4844 device.
 
void SI4844::setClockHigh ()
 Sets I2C bus speed to hight previous defined speed.
 
void SI4844::setClockLow (void)
 Sets I2C bus speed to 10kHz.
 
void SI4844::setClockSpeed (uint16_t clock)
 Sets hight clock speed to be used on I2C bus.
 
void SI4844::setInterruptPin (int interruptPin)
 Sets the MCU Interrupt pin.
 
void SI4844::setProperty (uint16_t propertyNumber, uint16_t parameter)
 Sends (sets) property to the SI48XX.
 
void SI4844::setResetPin (uint16_t resetPin)
 Sets the MCU RESET pin.
 
void SI4844::setStatusInterruptFromDevice (bool value)
 Set the Data Status From Device.
 
void SI4844::waitInterrupt (void)
 Waiting for an external interrupt.
 
void SI4844::waitToSend (void)
 Wait for the ATDD become Clear to Send.
 

Detailed Description

Function Documentation

◆ getCommandResponse()

void SI4844::getCommandResponse ( int  response_size,
uint8_t *  response 
)

Returns with the command response.

After a command is executed by the device, you can get the result (response) of the command by calling this method.

See also
sendCommand, setProperty
Parameters
response_sizenum of bytes returned by the command.
responsebyte array where the response will be stored.

◆ getDataStatusInterruptFromDevice()

bool SI4844::getDataStatusInterruptFromDevice ( )
inline

Get the Data Status From Device.

It returns true when the device has triggered an interrupt.

Returns
true or false

References data_from_device.

◆ getProperty()

uint16_t SI4844::getProperty ( uint16_t  propertyNumber)

Gets a given property from the SI4844.

This method is used to get a given property from SI47XX

You might need to extract set of bits information from the returned value to know the real value

Parameters
propertyNumberproperty number (example: RX_VOLUME)
Returns
property value (the content of the property)

References SI4844::waitToSend().

◆ isClearToSend()

bool SI4844::isClearToSend ( void  )
inlineprivate

Checks the CTS status.

Checks whether the device is ready to receive a new command.

Returns
true
false

Referenced by SI4844::waitToSend().

◆ sendCommand()

void SI4844::sendCommand ( uint8_t  cmd,
int  parameter_size,
const uint8_t *  parameter 
)

Sends a given command to the SI4844 device.

This function can be useful when you want to execute a SI4844 device command and it was not implemented by this library.

Also, you need to work with bit operators to compose the parameters of the command [ &(and), ˆ(xor), |(or) etc ].

See also
getCommandResponse, setProperty, getProperty
Parameters
cmdcommand number (see PROGRAMMING GUIDE)
parameter_sizeParameter size in bytes. Tell the number of argument used by the command.
parameteruint16_t byte array with the arguments of the command

References SI4844::waitToSend().

◆ setClockHigh()

void SI4844::setClockHigh ( )
inlineprivate

Sets I2C bus speed to hight previous defined speed.

See also
setClockSpeed

Referenced by SI4844::getStatus().

◆ setClockLow()

void SI4844::setClockLow ( void  )
inlineprivate

Sets I2C bus speed to 10kHz.

Referenced by SI4844::reset().

◆ setClockSpeed()

void SI4844::setClockSpeed ( uint16_t  clock)
inlineprivate

Sets hight clock speed to be used on I2C bus.

Parameters
clock(10000 = 10kHz; 50000 = 50kHz; 100000 = 100kHz ... )

◆ setInterruptPin()

void SI4844::setInterruptPin ( int  interruptPin)

Sets the MCU Interrupt pin.

Parameters
MCUpin (example Arduino Nano: 2 - The Arduino digital pin 2 allows external interrupt)

◆ setProperty()

void SI4844::setProperty ( uint16_t  propertyNumber,
uint16_t  parameter 
)

Sends (sets) property to the SI48XX.

This method is used for others to send generic properties and params to SI4844

Parameters
propertyNumberproperty number (example: RX_VOLUME)
parameterproperty value that will be seted

References SI4844::waitToSend().

◆ setResetPin()

void SI4844::setResetPin ( uint16_t  resetPin)

Sets the MCU RESET pin.

Parameters
MCUpin (example Arduino Nano: 12 - Digital pin 12)

◆ setStatusInterruptFromDevice()

void SI4844::setStatusInterruptFromDevice ( bool  value)
inline

Set the Data Status From Device.

It is a flag that means the device triggered an interrupt.

You can use this function to back the flag status to false. This way you can check when the device triggers the next interrupt.

It is very useful when the user wants to control the interrupt instead of give this control to the library.

Parameters
valuetrue or false

References data_from_device.

◆ waitInterrupt()

void SI4844::waitInterrupt ( void  )
inlineprivate

Waiting for an external interrupt.

This function is called whenever the status of ATDD (SI4844) changes.

It can occur, for example, when you use the analog tuner.

References data_from_device.

Referenced by SI4844::reset(), SI4844::setBand(), and SI4844::setCustomBand().

◆ waitToSend()

void SI4844::waitToSend ( void  )
inlineprivate