PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
Generic SI473X Command and Property methods

Functions

void SI4735::setProperty (uint16_t propertyNumber, uint16_t param)
 Sets a given SI47XX device property.
 
void SI4735::sendProperty (uint16_t propertyNumber, uint16_t param)
 Sends (sets) property to the SI47XX.
 
void SI4735::sendCommand (uint8_t cmd, int parameter_size, const uint8_t *parameter)
 Sends a given command to the SI47XX devices.
 
void SI4735::getCommandResponse (int num_of_bytes, uint8_t *response)
 Returns with the command response.
 
si47x_status SI4735::getStatusResponse ()
 Gets the first byte response.
 
int32_t SI4735::getProperty (uint16_t propertyValue)
 Gets a given property from the SI47XX.
 

Detailed Description

A set of functions used to support other functions

Function Documentation

◆ setProperty()

void SI4735::setProperty ( uint16_t  propertyNumber,
uint16_t  param 
)
inline

Sets a given SI47XX device property.

Sets the Si47XX device with a given attribute.

You might need to use the bit operations or some bit field structure to set right the values.

Used this function instead of the sendProperty.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 55, 69, 124 and 134.
getProperty, sendProperty
Parameters
propertyNumber
parampamameter value

◆ sendProperty()

void SI4735::sendProperty ( uint16_t  propertyNumber,
uint16_t  parameter 
)
protected

Sends (sets) property to the SI47XX.

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

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 68, 124 and 133.
setProperty, sendCommand, getProperty, getCommandResponse
Parameters
propertyNumberproperty number (example: RX_VOLUME)
parameterproperty value that will be seted

References SI4735::waitToSend().

◆ sendCommand()

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

Sends a given command to the SI47XX devices.

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

In this case you have to check the AN332-Si47XX PROGRAMMING GUIDE to know how the command works.

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

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

References SI4735::waitToSend().

◆ getCommandResponse()

void SI4735::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.

References SI4735::waitToSend().

◆ getStatusResponse()

si47x_status SI4735::getStatusResponse ( )

Gets the first byte response.

In this context status is the first response byte for any SI47XX command. See si47x_status structure.

This function can be useful to check, for example, the success or failure of a command.

See also
si47x_status
Returns
si47x_status

◆ getProperty()

int32_t SI4735::getProperty ( uint16_t  propertyNumber)

Gets a given property from the SI47XX.

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

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 55, 69, 124 and 134.
sendProperty, setProperty, sendCommand, getCommandResponse
Parameters
propertyNumberproperty number (example: RX_VOLUME)
Returns
property value (the content of the property)

References SI4735::waitToSend().