noise
2.0.0.0
|
Functions | |
void | noise_cfg_setup (noise_cfg_t *cfg) |
Config Object Initialization function. More... | |
NOISE_RETVAL | noise_init (noise_t *ctx, noise_cfg_t *cfg) |
Initialization function. More... | |
void | noise_default_cfg (noise_t *ctx) |
Click Default Configuration function. More... | |
void | noise_generic_transfer (noise_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. More... | |
void | noise_write_command_register (noise_t *ctx, uint16_t command_and_data_bits) |
Write to Command Register. More... | |
uint8_t | noise_set_command_register (noise_t *ctx, uint8_t configuration, uint16_t threshold) |
Set Command Register. More... | |
void | noise_set_state (noise_t *ctx, uint8_t state) |
Enable/disable click. More... | |
void | noise_reset (noise_t *ctx) |
Reset Click. More... | |
uint8_t | noise_check_int_pin (noise_t *ctx) |
Get INT pin state. More... | |
uint16_t | noise_generic_read (noise_t *ctx) |
Read ADC Value. More... | |
void noise_cfg_setup | ( | noise_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t noise_check_int_pin | ( | noise_t * | ctx | ) |
Get INT pin state.
ctx | Click object. |
@description This function gets int pin state.
void noise_default_cfg | ( | noise_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function performs default configuration for Noise click. Typically, it's setting threshold to default value.
uint16_t noise_generic_read | ( | noise_t * | ctx | ) |
Read ADC Value.
ctx | Click object. |
@description This function reads value from adc.
void noise_generic_transfer | ( | noise_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len | ||
) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
NOISE_RETVAL noise_init | ( | noise_t * | ctx, |
noise_cfg_t * | cfg | ||
) |
Initialization function.
noise | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void noise_reset | ( | noise_t * | ctx | ) |
Reset Click.
ctx | Click object. |
@description This function performs click reset.
uint8_t noise_set_command_register | ( | noise_t * | ctx, |
uint8_t | configuration, | ||
uint16_t | threshold | ||
) |
Set Command Register.
ctx | Click object. |
configuration | Configuration. |
threshold | Threshold. |
@description This function sets command register.
Threshold is integer from [0, 4095] segment. When measured noise level is above threshold, alarm is triggered.
void noise_set_state | ( | noise_t * | ctx, |
uint8_t | state | ||
) |
Enable/disable click.
ctx | Click object. |
state | State to set click on. |
@description This function switches click on or off.
void noise_write_command_register | ( | noise_t * | ctx, |
uint16_t | command_and_data_bits | ||
) |
Write to Command Register.
ctx | Click object. |
command_and_data_bits | Command and data to send. |
@description This function writes data to click's command register.