![]() |
LibDriver AS3935
|
as3935 basic driver modules More...
Data Structures | |
| struct | as3935_handle_s |
| as3935 handle structure definition More... | |
| struct | as3935_info_s |
| as3935 information structure definition More... | |
Typedefs | |
| typedef struct as3935_handle_s | as3935_handle_t |
| as3935 handle structure definition | |
| typedef struct as3935_info_s | as3935_info_t |
| as3935 information structure definition | |
Functions | |
| uint8_t | as3935_info (as3935_info_t *info) |
| get chip's information | |
| uint8_t | as3935_set_interface (as3935_handle_t *handle, as3935_interface_t interface) |
| set the chip interface | |
| uint8_t | as3935_get_interface (as3935_handle_t *handle, as3935_interface_t *interface) |
| get the chip interface | |
| uint8_t | as3935_set_addr_pin (as3935_handle_t *handle, as3935_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | as3935_get_addr_pin (as3935_handle_t *handle, as3935_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | as3935_irq_handler (as3935_handle_t *handle) |
| irq handler | |
| uint8_t | as3935_init (as3935_handle_t *handle) |
| initialize the chip | |
| uint8_t | as3935_deinit (as3935_handle_t *handle) |
| close the chip | |
| uint8_t | as3935_read_single_lightning_energy (as3935_handle_t *handle, uint32_t *energy) |
| read single lightning energy | |
| uint8_t | as3935_read_distance (as3935_handle_t *handle, uint8_t *raw, int8_t *km) |
| read distance | |
| uint8_t | as3935_set_power_down (as3935_handle_t *handle, as3935_bool_t enable) |
| set power down | |
| uint8_t | as3935_get_power_down (as3935_handle_t *handle, as3935_bool_t *enable) |
| get power down | |
| uint8_t | as3935_set_afe_gain_boost (as3935_handle_t *handle, as3935_afe_gain_t gain) |
| set afe gain boost | |
| uint8_t | as3935_get_afe_gain_boost (as3935_handle_t *handle, as3935_afe_gain_t *gain) |
| get afe gain boost | |
| uint8_t | as3935_set_noise_floor_level (as3935_handle_t *handle, as3935_noise_floor_level_t level) |
| set noise floor level | |
| uint8_t | as3935_get_noise_floor_level (as3935_handle_t *handle, as3935_noise_floor_level_t *level) |
| get noise floor level | |
| uint8_t | as3935_set_watchdog_threshold (as3935_handle_t *handle, uint8_t threshold) |
| set watchdog threshold | |
| uint8_t | as3935_get_watchdog_threshold (as3935_handle_t *handle, uint8_t *threshold) |
| get watchdog threshold | |
| uint8_t | as3935_set_clear_statistics (as3935_handle_t *handle, as3935_bool_t enable) |
| enable or disable clear statistics | |
| uint8_t | as3935_get_clear_statistics (as3935_handle_t *handle, as3935_bool_t *enable) |
| get clear statistics status | |
| uint8_t | as3935_set_lightning_min_number (as3935_handle_t *handle, as3935_lightning_min_number_t number) |
| set lightning min number | |
| uint8_t | as3935_get_lightning_min_number (as3935_handle_t *handle, as3935_lightning_min_number_t *number) |
| get lightning min number | |
| uint8_t | as3935_set_spike_rejection (as3935_handle_t *handle, uint8_t rejection) |
| set spike rejection | |
| uint8_t | as3935_get_spike_rejection (as3935_handle_t *handle, uint8_t *rejection) |
| get spike rejection | |
| uint8_t | as3935_set_frequency_division_ration (as3935_handle_t *handle, as3935_frequency_division_ration_t division) |
| set frequency division ration | |
| uint8_t | as3935_get_frequency_division_ration (as3935_handle_t *handle, as3935_frequency_division_ration_t *division) |
| get frequency division ration | |
| uint8_t | as3935_set_mask_disturber (as3935_handle_t *handle, as3935_bool_t enable) |
| enable or disable mask disturber | |
| uint8_t | as3935_get_mask_disturber (as3935_handle_t *handle, as3935_bool_t *enable) |
| get mask disturber status | |
| uint8_t | as3935_get_interrupt_status (as3935_handle_t *handle, as3935_interrupt_status_t *status) |
| get interrupt status | |
| uint8_t | as3935_set_lc_osc_display_on_irq (as3935_handle_t *handle, as3935_bool_t enable) |
| enable or disable lc osc display on irq | |
| uint8_t | as3935_get_display_lc_osc_on_irq (as3935_handle_t *handle, as3935_bool_t *enable) |
| get lc osc display on irq status | |
| uint8_t | as3935_set_system_rc_osc_display_on_irq (as3935_handle_t *handle, as3935_bool_t enable) |
| enable or disable system rc osc display on irq | |
| uint8_t | as3935_get_system_rc_osc_display_on_irq (as3935_handle_t *handle, as3935_bool_t *enable) |
| get system rc osc display on irq status | |
| uint8_t | as3935_set_timer_rc_osc_display_on_irq (as3935_handle_t *handle, as3935_bool_t enable) |
| enable or disable timer rc osc display on irq | |
| uint8_t | as3935_get_timer_rc_osc_display_on_irq (as3935_handle_t *handle, as3935_bool_t *enable) |
| get timer rc osc display on irq status | |
| uint8_t | as3935_set_internal_tuning_capacitor (as3935_handle_t *handle, uint8_t cap) |
| set internal tuning capacitor | |
| uint8_t | as3935_get_internal_tuning_capacitor (as3935_handle_t *handle, uint8_t *cap) |
| get internal tuning capacitor | |
| uint8_t | as3935_get_timer_rc_osc_calibration_done (as3935_handle_t *handle, as3935_bool_t *enable) |
| get timer rc osc calibration done status | |
| uint8_t | as3935_get_timer_rc_osc_calibration_not_ok (as3935_handle_t *handle, as3935_bool_t *enable) |
| get timer rc osc calibration not ok status | |
| uint8_t | as3935_get_system_rc_osc_calibration_done (as3935_handle_t *handle, as3935_bool_t *enable) |
| get system rc osc calibration done status | |
| uint8_t | as3935_get_system_rc_osc_calibration_not_ok (as3935_handle_t *handle, as3935_bool_t *enable) |
| get system rc osc calibration not ok status | |
| uint8_t | as3935_reset_default (as3935_handle_t *handle) |
| reset to default | |
| uint8_t | as3935_set_calibrate_rc_osc (as3935_handle_t *handle) |
| calibrate rc osc | |
| uint8_t | as3935_internal_tuning_capacitor_convert_to_register (as3935_handle_t *handle, float pf, uint8_t *reg) |
| convert the internal tuning capacitor to the register raw data | |
| uint8_t | as3935_internal_tuning_capacitor_convert_to_data (as3935_handle_t *handle, uint8_t reg, float *pf) |
| convert the register raw data to the internal tuning capacitor | |
as3935 basic driver modules
| typedef struct as3935_handle_s as3935_handle_t |
as3935 handle structure definition
| typedef struct as3935_info_s as3935_info_t |
as3935 information structure definition
| enum as3935_address_t |
as3935 address enumeration definition
| Enumerator | |
|---|---|
| AS3935_ADDRESS_1 | addr1 - add0 -> low - high |
| AS3935_ADDRESS_2 | addr1 - add0 -> high - low |
| AS3935_ADDRESS_3 | addr1 - add0 -> high - high |
Definition at line 71 of file driver_as3935.h.
| enum as3935_afe_gain_t |
as3935 afe gain enumeration definition
| Enumerator | |
|---|---|
| AS3935_AFE_GAIN_INDOOR | indoor |
| AS3935_AFE_GAIN_OUTDOOR | outdoor |
Definition at line 90 of file driver_as3935.h.
| enum as3935_bool_t |
as3935 bool enumeration definition
| Enumerator | |
|---|---|
| AS3935_BOOL_FALSE | false |
| AS3935_BOOL_TRUE | true |
Definition at line 81 of file driver_as3935.h.
as3935 frequency division ration enumeration definition
Definition at line 125 of file driver_as3935.h.
| enum as3935_interface_t |
as3935 interface enumeration definition
| Enumerator | |
|---|---|
| AS3935_INTERFACE_IIC | iic interface |
| AS3935_INTERFACE_SPI | spi interface |
Definition at line 62 of file driver_as3935.h.
as3935 interrupt status enumeration definition
Definition at line 136 of file driver_as3935.h.
as3935 lightning min number enumeration definition
Definition at line 114 of file driver_as3935.h.
as3935 noise floor level enumeration definition
Definition at line 99 of file driver_as3935.h.
| uint8_t as3935_deinit | ( | as3935_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an as3935 handle structure |
Definition at line 1953 of file driver_as3935.c.
| uint8_t as3935_get_addr_pin | ( | as3935_handle_t * | handle, |
| as3935_address_t * | addr_pin ) |
get the iic address pin
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *addr_pin | pointer to an address pin buffer |
Definition at line 212 of file driver_as3935.c.
| uint8_t as3935_get_afe_gain_boost | ( | as3935_handle_t * | handle, |
| as3935_afe_gain_t * | gain ) |
get afe gain boost
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *gain | pointer to an afe gain buffer |
Definition at line 362 of file driver_as3935.c.
| uint8_t as3935_get_clear_statistics | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get clear statistics status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 615 of file driver_as3935.c.
| uint8_t as3935_get_display_lc_osc_on_irq | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get lc osc display on irq status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1251 of file driver_as3935.c.
| uint8_t as3935_get_frequency_division_ration | ( | as3935_handle_t * | handle, |
| as3935_frequency_division_ration_t * | division ) |
get frequency division ration
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *division | pointer to a frequency division buffer |
Definition at line 868 of file driver_as3935.c.
| uint8_t as3935_get_interface | ( | as3935_handle_t * | handle, |
| as3935_interface_t * | interface ) |
get the chip interface
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *interface | pointer to a chip interface buffer |
Definition at line 170 of file driver_as3935.c.
| uint8_t as3935_get_internal_tuning_capacitor | ( | as3935_handle_t * | handle, |
| uint8_t * | cap ) |
get internal tuning capacitor
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *cap | pointer to a capacitor buffer |
Definition at line 1504 of file driver_as3935.c.
| uint8_t as3935_get_interrupt_status | ( | as3935_handle_t * | handle, |
| as3935_interrupt_status_t * | status ) |
get interrupt status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 987 of file driver_as3935.c.
| uint8_t as3935_get_lightning_min_number | ( | as3935_handle_t * | handle, |
| as3935_lightning_min_number_t * | number ) |
get lightning min number
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *number | pointer to a lightning min number buffer |
Definition at line 697 of file driver_as3935.c.
| uint8_t as3935_get_mask_disturber | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get mask disturber status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 950 of file driver_as3935.c.
| uint8_t as3935_get_noise_floor_level | ( | as3935_handle_t * | handle, |
| as3935_noise_floor_level_t * | level ) |
get noise floor level
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *level | pointer to a noise floor level buffer |
Definition at line 444 of file driver_as3935.c.
| uint8_t as3935_get_power_down | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get power down
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 280 of file driver_as3935.c.
| uint8_t as3935_get_spike_rejection | ( | as3935_handle_t * | handle, |
| uint8_t * | rejection ) |
get spike rejection
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *rejection | pointer to a spike rejection buffer |
Definition at line 786 of file driver_as3935.c.
| uint8_t as3935_get_system_rc_osc_calibration_done | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get system rc osc calibration done status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1615 of file driver_as3935.c.
| uint8_t as3935_get_system_rc_osc_calibration_not_ok | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get system rc osc calibration not ok status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1652 of file driver_as3935.c.
| uint8_t as3935_get_system_rc_osc_display_on_irq | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get system rc osc display on irq status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1333 of file driver_as3935.c.
| uint8_t as3935_get_timer_rc_osc_calibration_done | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get timer rc osc calibration done status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1541 of file driver_as3935.c.
| uint8_t as3935_get_timer_rc_osc_calibration_not_ok | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get timer rc osc calibration not ok status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1578 of file driver_as3935.c.
| uint8_t as3935_get_timer_rc_osc_display_on_irq | ( | as3935_handle_t * | handle, |
| as3935_bool_t * | enable ) |
get timer rc osc display on irq status
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1415 of file driver_as3935.c.
| uint8_t as3935_get_watchdog_threshold | ( | as3935_handle_t * | handle, |
| uint8_t * | threshold ) |
get watchdog threshold
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *threshold | pointer to a watchdog threshold buffer |
Definition at line 533 of file driver_as3935.c.
| uint8_t as3935_info | ( | as3935_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an as3935 info structure |
Definition at line 2116 of file driver_as3935.c.
| uint8_t as3935_init | ( | as3935_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an as3935 handle structure |
Definition at line 1848 of file driver_as3935.c.
| uint8_t as3935_internal_tuning_capacitor_convert_to_data | ( | as3935_handle_t * | handle, |
| uint8_t | reg, | ||
| float * | pf ) |
convert the register raw data to the internal tuning capacitor
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | reg | register raw data |
| [out] | *pf | pointer to a pf buffer |
Definition at line 1788 of file driver_as3935.c.
| uint8_t as3935_internal_tuning_capacitor_convert_to_register | ( | as3935_handle_t * | handle, |
| float | pf, | ||
| uint8_t * | reg ) |
convert the internal tuning capacitor to the register raw data
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | pf | capacitor in pf |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1761 of file driver_as3935.c.
| uint8_t as3935_irq_handler | ( | as3935_handle_t * | handle | ) |
irq handler
| [in] | *handle | pointer to an as3935 handle structure |
Definition at line 2004 of file driver_as3935.c.
| uint8_t as3935_read_distance | ( | as3935_handle_t * | handle, |
| uint8_t * | raw, | ||
| int8_t * | km ) |
read distance
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *raw | pointer to a raw data buffer |
| [out] | *km | pointer to a km data buffer |
Definition at line 1063 of file driver_as3935.c.
| uint8_t as3935_read_single_lightning_energy | ( | as3935_handle_t * | handle, |
| uint32_t * | energy ) |
read single lightning energy
| [in] | *handle | pointer to an as3935 handle structure |
| [out] | *energy | pointer to an energy buffer |
Definition at line 1024 of file driver_as3935.c.
| uint8_t as3935_reset_default | ( | as3935_handle_t * | handle | ) |
reset to default
| [in] | *handle | pointer to an as3935 handle structure |
Definition at line 1688 of file driver_as3935.c.
| uint8_t as3935_set_addr_pin | ( | as3935_handle_t * | handle, |
| as3935_address_t | addr_pin ) |
set the iic address pin
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | addr_pin | address pin |
Definition at line 191 of file driver_as3935.c.
| uint8_t as3935_set_afe_gain_boost | ( | as3935_handle_t * | handle, |
| as3935_afe_gain_t | gain ) |
set afe gain boost
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | gain | afe gain |
Definition at line 317 of file driver_as3935.c.
| uint8_t as3935_set_calibrate_rc_osc | ( | as3935_handle_t * | handle | ) |
calibrate rc osc
| [in] | *handle | pointer to an as3935 handle structure |
Definition at line 1724 of file driver_as3935.c.
| uint8_t as3935_set_clear_statistics | ( | as3935_handle_t * | handle, |
| as3935_bool_t | enable ) |
enable or disable clear statistics
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | enable | bool value |
Definition at line 570 of file driver_as3935.c.
| uint8_t as3935_set_frequency_division_ration | ( | as3935_handle_t * | handle, |
| as3935_frequency_division_ration_t | division ) |
set frequency division ration
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | division | frequency division |
Definition at line 823 of file driver_as3935.c.
| uint8_t as3935_set_interface | ( | as3935_handle_t * | handle, |
| as3935_interface_t | interface ) |
set the chip interface
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | interface | chip interface |
Definition at line 149 of file driver_as3935.c.
| uint8_t as3935_set_internal_tuning_capacitor | ( | as3935_handle_t * | handle, |
| uint8_t | cap ) |
set internal tuning capacitor
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | cap | capacitor |
Definition at line 1453 of file driver_as3935.c.
| uint8_t as3935_set_lc_osc_display_on_irq | ( | as3935_handle_t * | handle, |
| as3935_bool_t | enable ) |
enable or disable lc osc display on irq
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | enable | bool value |
Definition at line 1206 of file driver_as3935.c.
| uint8_t as3935_set_lightning_min_number | ( | as3935_handle_t * | handle, |
| as3935_lightning_min_number_t | number ) |
set lightning min number
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | number | lightning min number |
Definition at line 652 of file driver_as3935.c.
| uint8_t as3935_set_mask_disturber | ( | as3935_handle_t * | handle, |
| as3935_bool_t | enable ) |
enable or disable mask disturber
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | enable | bool value |
Definition at line 905 of file driver_as3935.c.
| uint8_t as3935_set_noise_floor_level | ( | as3935_handle_t * | handle, |
| as3935_noise_floor_level_t | level ) |
set noise floor level
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | level | noise floor level |
Definition at line 399 of file driver_as3935.c.
| uint8_t as3935_set_power_down | ( | as3935_handle_t * | handle, |
| as3935_bool_t | enable ) |
set power down
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | enable | bool value |
Definition at line 235 of file driver_as3935.c.
| uint8_t as3935_set_spike_rejection | ( | as3935_handle_t * | handle, |
| uint8_t | rejection ) |
set spike rejection
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | rejection | spike rejection |
Definition at line 735 of file driver_as3935.c.
| uint8_t as3935_set_system_rc_osc_display_on_irq | ( | as3935_handle_t * | handle, |
| as3935_bool_t | enable ) |
enable or disable system rc osc display on irq
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | enable | bool value |
Definition at line 1288 of file driver_as3935.c.
| uint8_t as3935_set_timer_rc_osc_display_on_irq | ( | as3935_handle_t * | handle, |
| as3935_bool_t | enable ) |
enable or disable timer rc osc display on irq
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | enable | bool value |
Definition at line 1370 of file driver_as3935.c.
| uint8_t as3935_set_watchdog_threshold | ( | as3935_handle_t * | handle, |
| uint8_t | threshold ) |
set watchdog threshold
| [in] | *handle | pointer to an as3935 handle structure |
| [in] | threshold | watchdog threshold |
Definition at line 482 of file driver_as3935.c.