PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
|
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. | |
A set of functions used to support other functions
|
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.
propertyNumber | |
param | pamameter value |
|
protected |
Sends (sets) property to the SI47XX.
This method is used for others to send generic properties and params to SI47XX
propertyNumber | property number (example: RX_VOLUME) |
parameter | property value that will be seted |
References SI4735::waitToSend().
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 ].
cmd | command number (see AN332-Si47XX PROGRAMMING GUIDE) |
parameter_size | Parameter size in bytes. Tell the number of argument used by the command. |
parameter | unsigned byte array with the arguments of the command |
References SI4735::waitToSend().
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.
response_size | num of bytes returned by the command. |
response | byte array where the response will be stored. |
References SI4735::waitToSend().
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.
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
propertyNumber | property number (example: RX_VOLUME) |
References SI4735::waitToSend().