PU2CLR SI4844 Arduino Library 1.1.8
Arduino Library for Si4844 Devices - By Ricardo Lima Caratti
|
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. | |
void | SI4844::sendCommand (uint8_t cmd, int parameter_size, const uint8_t *parameter) |
Sends a given command to the SI4844 device. | |
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::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. |
|
inline |
Get the Data Status From Device.
It returns true when the device has triggered an interrupt.
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
propertyNumber | property number (example: RX_VOLUME) |
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 ].
cmd | command number (see PROGRAMMING GUIDE) |
parameter_size | Parameter size in bytes. Tell the number of argument used by the command. |
parameter | uint16_t byte array with the arguments of the command |
void SI4844::setInterruptPin | ( | int | interruptPin | ) |
Sets the MCU Interrupt pin.
MCU | pin (example Arduino Nano: 2 - The Arduino digital pin 2 allows external interrupt) |
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
propertyNumber | property number (example: RX_VOLUME) |
parameter | property value that will be seted |
void SI4844::setResetPin | ( | uint16_t | resetPin | ) |
Sets the MCU RESET pin.
MCU | pin (example Arduino Nano: 12 - Digital pin 12) |
|
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.
value | true or false |