LibDriver AS3935
Loading...
Searching...
No Matches
as3935 basic driver function

as3935 basic driver modules More...

Collaboration diagram for as3935 basic driver function:

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

Enumerations

enum  as3935_interface_t { AS3935_INTERFACE_IIC = 0x00 , AS3935_INTERFACE_SPI = 0x01 }
 as3935 interface enumeration definition More...
enum  as3935_address_t { AS3935_ADDRESS_1 = 0x02 , AS3935_ADDRESS_2 = 0x04 , AS3935_ADDRESS_3 = 0x06 }
 as3935 address enumeration definition More...
enum  as3935_bool_t { AS3935_BOOL_FALSE = 0x00 , AS3935_BOOL_TRUE = 0x01 }
 as3935 bool enumeration definition More...
enum  as3935_afe_gain_t { AS3935_AFE_GAIN_INDOOR = 0x12 , AS3935_AFE_GAIN_OUTDOOR = 0x0E }
 as3935 afe gain enumeration definition More...
enum  as3935_noise_floor_level_t {
  AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_390_INDOOR_28 = 0x0 , AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_630_INDOOR_45 = 0x1 , AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_860_INDOOR_62 = 0x2 , AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1100_INDOOR_78 = 0x3 ,
  AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1140_INDOOR_95 = 0x4 , AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1570_INDOOR_112 = 0x5 , AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1800_INDOOR_130 = 0x6 , AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_2000_INDOOR_146 = 0x7
}
 as3935 noise floor level enumeration definition More...
enum  as3935_lightning_min_number_t { AS3935_LIGHTNING_MIN_NUMBER_1 = 0x0 , AS3935_LIGHTNING_MIN_NUMBER_5 = 0x1 , AS3935_LIGHTNING_MIN_NUMBER_9 = 0x2 , AS3935_LIGHTNING_MIN_NUMBER_16 = 0x3 }
 as3935 lightning min number enumeration definition More...
enum  as3935_frequency_division_ration_t { AS3935_FREQUENCY_DIVISION_RATION_16 = 0x0 , AS3935_FREQUENCY_DIVISION_RATION_32 = 0x1 , AS3935_FREQUENCY_DIVISION_RATION_64 = 0x2 , AS3935_FREQUENCY_DIVISION_RATION_128 = 0x3 }
 as3935 frequency division ration enumeration definition More...
enum  as3935_interrupt_status_t { AS3935_INTERRUPT_STATUS_NOISE_LEVEL_TOO_HIGH = 0x01 , AS3935_INTERRUPT_STATUS_DISTURBER_DETECTED = 0x04 , AS3935_INTERRUPT_STATUS_LIGHTNING_INTERRUPT = 0x08 }
 as3935 interrupt status enumeration definition More...

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

Detailed Description

as3935 basic driver modules

Typedef Documentation

◆ as3935_handle_t

as3935 handle structure definition

◆ as3935_info_t

typedef struct as3935_info_s as3935_info_t

as3935 information structure definition

Enumeration Type Documentation

◆ 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.

◆ 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.

◆ 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_t

as3935 frequency division ration enumeration definition

Enumerator
AS3935_FREQUENCY_DIVISION_RATION_16 

division ratio 16

AS3935_FREQUENCY_DIVISION_RATION_32 

division ratio 32

AS3935_FREQUENCY_DIVISION_RATION_64 

division ratio 64

AS3935_FREQUENCY_DIVISION_RATION_128 

division ratio 128

Definition at line 125 of file driver_as3935.h.

◆ 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_t

as3935 interrupt status enumeration definition

Enumerator
AS3935_INTERRUPT_STATUS_NOISE_LEVEL_TOO_HIGH 

noise level too high

AS3935_INTERRUPT_STATUS_DISTURBER_DETECTED 

disturber detected

AS3935_INTERRUPT_STATUS_LIGHTNING_INTERRUPT 

lightning interrupt

Definition at line 136 of file driver_as3935.h.

◆ as3935_lightning_min_number_t

as3935 lightning min number enumeration definition

Enumerator
AS3935_LIGHTNING_MIN_NUMBER_1 

1 minimum number of lightning

AS3935_LIGHTNING_MIN_NUMBER_5 

5 minimum number of lightning

AS3935_LIGHTNING_MIN_NUMBER_9 

9 minimum number of lightning

AS3935_LIGHTNING_MIN_NUMBER_16 

16 minimum number of lightning

Definition at line 114 of file driver_as3935.h.

◆ as3935_noise_floor_level_t

as3935 noise floor level enumeration definition

Enumerator
AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_390_INDOOR_28 

outdoor 390 μVrms, indoor 28 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_630_INDOOR_45 

outdoor 630 μVrms, indoor 45 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_860_INDOOR_62 

outdoor 860 μVrms, indoor 62 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1100_INDOOR_78 

outdoor 1100 μVrms, indoor 78 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1140_INDOOR_95 

outdoor 1140 μVrms, indoor 95 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1570_INDOOR_112 

outdoor 1570 μVrms, indoor 112 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_1800_INDOOR_130 

outdoor 1800 μVrms, indoor 130 μVrms

AS3935_NOISE_FLOOR_LEVEL_OUTDOOR_2000_INDOOR_146 

outdoor 2000 μVrms, indoor 146 μVrms

Definition at line 99 of file driver_as3935.h.

Function Documentation

◆ as3935_deinit()

uint8_t as3935_deinit ( as3935_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an as3935 handle structure
Returns
status code
  • 0 success
  • 1 iic or spi deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
Note
none

Definition at line 1953 of file driver_as3935.c.

◆ as3935_get_addr_pin()

uint8_t as3935_get_addr_pin ( as3935_handle_t * handle,
as3935_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*addr_pinpointer to an address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 212 of file driver_as3935.c.

◆ as3935_get_afe_gain_boost()

uint8_t as3935_get_afe_gain_boost ( as3935_handle_t * handle,
as3935_afe_gain_t * gain )

get afe gain boost

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*gainpointer to an afe gain buffer
Returns
status code
  • 0 success
  • 1 get afe gain boost failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 362 of file driver_as3935.c.

◆ as3935_get_clear_statistics()

uint8_t as3935_get_clear_statistics ( as3935_handle_t * handle,
as3935_bool_t * enable )

get clear statistics status

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get clear statistics failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 615 of file driver_as3935.c.

◆ as3935_get_display_lc_osc_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

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get lc osc display on irq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1251 of file driver_as3935.c.

◆ as3935_get_frequency_division_ration()

uint8_t as3935_get_frequency_division_ration ( as3935_handle_t * handle,
as3935_frequency_division_ration_t * division )

get frequency division ration

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*divisionpointer to a frequency division buffer
Returns
status code
  • 0 success
  • 1 get frequency division ration failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 868 of file driver_as3935.c.

◆ as3935_get_interface()

uint8_t as3935_get_interface ( as3935_handle_t * handle,
as3935_interface_t * interface )

get the chip interface

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*interfacepointer to a chip interface buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 170 of file driver_as3935.c.

◆ as3935_get_internal_tuning_capacitor()

uint8_t as3935_get_internal_tuning_capacitor ( as3935_handle_t * handle,
uint8_t * cap )

get internal tuning capacitor

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*cappointer to a capacitor buffer
Returns
status code
  • 0 success
  • 1 get internal tuning capacitor failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1504 of file driver_as3935.c.

◆ as3935_get_interrupt_status()

uint8_t as3935_get_interrupt_status ( as3935_handle_t * handle,
as3935_interrupt_status_t * status )

get interrupt status

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get interrupt status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 987 of file driver_as3935.c.

◆ as3935_get_lightning_min_number()

uint8_t as3935_get_lightning_min_number ( as3935_handle_t * handle,
as3935_lightning_min_number_t * number )

get lightning min number

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*numberpointer to a lightning min number buffer
Returns
status code
  • 0 success
  • 1 get lightning min number failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 697 of file driver_as3935.c.

◆ as3935_get_mask_disturber()

uint8_t as3935_get_mask_disturber ( as3935_handle_t * handle,
as3935_bool_t * enable )

get mask disturber status

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get mask disturber failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 950 of file driver_as3935.c.

◆ as3935_get_noise_floor_level()

uint8_t as3935_get_noise_floor_level ( as3935_handle_t * handle,
as3935_noise_floor_level_t * level )

get noise floor level

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*levelpointer to a noise floor level buffer
Returns
status code
  • 0 success
  • 1 get noise floor level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 444 of file driver_as3935.c.

◆ as3935_get_power_down()

uint8_t as3935_get_power_down ( as3935_handle_t * handle,
as3935_bool_t * enable )

get power down

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get power down failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 280 of file driver_as3935.c.

◆ as3935_get_spike_rejection()

uint8_t as3935_get_spike_rejection ( as3935_handle_t * handle,
uint8_t * rejection )

get spike rejection

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*rejectionpointer to a spike rejection buffer
Returns
status code
  • 0 success
  • 1 get spike rejection failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 786 of file driver_as3935.c.

◆ as3935_get_system_rc_osc_calibration_done()

uint8_t as3935_get_system_rc_osc_calibration_done ( as3935_handle_t * handle,
as3935_bool_t * enable )

get system rc osc calibration done status

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get system rc osc calibration done failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1615 of file driver_as3935.c.

◆ as3935_get_system_rc_osc_calibration_not_ok()

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

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get system rc osc calibration not ok failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1652 of file driver_as3935.c.

◆ as3935_get_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

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get system rc osc display on irq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1333 of file driver_as3935.c.

◆ as3935_get_timer_rc_osc_calibration_done()

uint8_t as3935_get_timer_rc_osc_calibration_done ( as3935_handle_t * handle,
as3935_bool_t * enable )

get timer rc osc calibration done status

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer rc osc calibration done failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1541 of file driver_as3935.c.

◆ as3935_get_timer_rc_osc_calibration_not_ok()

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

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer rc osc calibration not ok failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1578 of file driver_as3935.c.

◆ as3935_get_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

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get timer rc osc display on irq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1415 of file driver_as3935.c.

◆ as3935_get_watchdog_threshold()

uint8_t as3935_get_watchdog_threshold ( as3935_handle_t * handle,
uint8_t * threshold )

get watchdog threshold

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*thresholdpointer to a watchdog threshold buffer
Returns
status code
  • 0 success
  • 1 get watchdog threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 533 of file driver_as3935.c.

◆ as3935_info()

uint8_t as3935_info ( as3935_info_t * info)

get chip's information

Parameters
[out]*infopointer to an as3935 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 2116 of file driver_as3935.c.

◆ as3935_init()

uint8_t as3935_init ( as3935_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an as3935 handle structure
Returns
status code
  • 0 success
  • 1 spi or iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 1848 of file driver_as3935.c.

◆ as3935_internal_tuning_capacitor_convert_to_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

Parameters
[in]*handlepointer to an as3935 handle structure
[in]regregister raw data
[out]*pfpointer to a pf buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1788 of file driver_as3935.c.

◆ as3935_internal_tuning_capacitor_convert_to_register()

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

Parameters
[in]*handlepointer to an as3935 handle structure
[in]pfcapacitor in pf
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1761 of file driver_as3935.c.

◆ as3935_irq_handler()

uint8_t as3935_irq_handler ( as3935_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to an as3935 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2004 of file driver_as3935.c.

◆ as3935_read_distance()

uint8_t as3935_read_distance ( as3935_handle_t * handle,
uint8_t * raw,
int8_t * km )

read distance

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*rawpointer to a raw data buffer
[out]*kmpointer to a km data buffer
Returns
status code
  • 0 success
  • 1 read distance failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1063 of file driver_as3935.c.

◆ as3935_read_single_lightning_energy()

uint8_t as3935_read_single_lightning_energy ( as3935_handle_t * handle,
uint32_t * energy )

read single lightning energy

Parameters
[in]*handlepointer to an as3935 handle structure
[out]*energypointer to an energy buffer
Returns
status code
  • 0 success
  • 1 read single lightning energy failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1024 of file driver_as3935.c.

◆ as3935_reset_default()

uint8_t as3935_reset_default ( as3935_handle_t * handle)

reset to default

Parameters
[in]*handlepointer to an as3935 handle structure
Returns
status code
  • 0 success
  • 1 reset default failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1688 of file driver_as3935.c.

◆ as3935_set_addr_pin()

uint8_t as3935_set_addr_pin ( as3935_handle_t * handle,
as3935_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to an as3935 handle structure
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 191 of file driver_as3935.c.

◆ as3935_set_afe_gain_boost()

uint8_t as3935_set_afe_gain_boost ( as3935_handle_t * handle,
as3935_afe_gain_t gain )

set afe gain boost

Parameters
[in]*handlepointer to an as3935 handle structure
[in]gainafe gain
Returns
status code
  • 0 success
  • 1 set afe gain boost failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 317 of file driver_as3935.c.

◆ as3935_set_calibrate_rc_osc()

uint8_t as3935_set_calibrate_rc_osc ( as3935_handle_t * handle)

calibrate rc osc

Parameters
[in]*handlepointer to an as3935 handle structure
Returns
status code
  • 0 success
  • 1 calibrate rc osc failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1724 of file driver_as3935.c.

◆ as3935_set_clear_statistics()

uint8_t as3935_set_clear_statistics ( as3935_handle_t * handle,
as3935_bool_t enable )

enable or disable clear statistics

Parameters
[in]*handlepointer to an as3935 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set clear statistics failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 570 of file driver_as3935.c.

◆ as3935_set_frequency_division_ration()

uint8_t as3935_set_frequency_division_ration ( as3935_handle_t * handle,
as3935_frequency_division_ration_t division )

set frequency division ration

Parameters
[in]*handlepointer to an as3935 handle structure
[in]divisionfrequency division
Returns
status code
  • 0 success
  • 1 set frequency division ration failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 823 of file driver_as3935.c.

◆ as3935_set_interface()

uint8_t as3935_set_interface ( as3935_handle_t * handle,
as3935_interface_t interface )

set the chip interface

Parameters
[in]*handlepointer to an as3935 handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 149 of file driver_as3935.c.

◆ as3935_set_internal_tuning_capacitor()

uint8_t as3935_set_internal_tuning_capacitor ( as3935_handle_t * handle,
uint8_t cap )

set internal tuning capacitor

Parameters
[in]*handlepointer to an as3935 handle structure
[in]capcapacitor
Returns
status code
  • 0 success
  • 1 set internal tuning capacitor failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 cap > 0xF
Note
none

Definition at line 1453 of file driver_as3935.c.

◆ as3935_set_lc_osc_display_on_irq()

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

Parameters
[in]*handlepointer to an as3935 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set lc osc display on irq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1206 of file driver_as3935.c.

◆ as3935_set_lightning_min_number()

uint8_t as3935_set_lightning_min_number ( as3935_handle_t * handle,
as3935_lightning_min_number_t number )

set lightning min number

Parameters
[in]*handlepointer to an as3935 handle structure
[in]numberlightning min number
Returns
status code
  • 0 success
  • 1 set lightning min number failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 652 of file driver_as3935.c.

◆ as3935_set_mask_disturber()

uint8_t as3935_set_mask_disturber ( as3935_handle_t * handle,
as3935_bool_t enable )

enable or disable mask disturber

Parameters
[in]*handlepointer to an as3935 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set mask disturber failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 905 of file driver_as3935.c.

◆ as3935_set_noise_floor_level()

uint8_t as3935_set_noise_floor_level ( as3935_handle_t * handle,
as3935_noise_floor_level_t level )

set noise floor level

Parameters
[in]*handlepointer to an as3935 handle structure
[in]levelnoise floor level
Returns
status code
  • 0 success
  • 1 set noise floor level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 399 of file driver_as3935.c.

◆ as3935_set_power_down()

uint8_t as3935_set_power_down ( as3935_handle_t * handle,
as3935_bool_t enable )

set power down

Parameters
[in]*handlepointer to an as3935 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set power down failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 235 of file driver_as3935.c.

◆ as3935_set_spike_rejection()

uint8_t as3935_set_spike_rejection ( as3935_handle_t * handle,
uint8_t rejection )

set spike rejection

Parameters
[in]*handlepointer to an as3935 handle structure
[in]rejectionspike rejection
Returns
status code
  • 0 success
  • 1 set spike rejection failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 rejection > 0x0F
Note
none

Definition at line 735 of file driver_as3935.c.

◆ as3935_set_system_rc_osc_display_on_irq()

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

Parameters
[in]*handlepointer to an as3935 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set system rc osc display on irq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1288 of file driver_as3935.c.

◆ as3935_set_timer_rc_osc_display_on_irq()

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

Parameters
[in]*handlepointer to an as3935 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set timer rc osc display on irq failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1370 of file driver_as3935.c.

◆ as3935_set_watchdog_threshold()

uint8_t as3935_set_watchdog_threshold ( as3935_handle_t * handle,
uint8_t threshold )

set watchdog threshold

Parameters
[in]*handlepointer to an as3935 handle structure
[in]thresholdwatchdog threshold
Returns
status code
  • 0 success
  • 1 set watchdog threshold failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 threshold > 0x0F
Note
none

Definition at line 482 of file driver_as3935.c.