36 #define CH101_GPR_REG_OPMODE 0x01
37 #define CH101_GPR_REG_TICK_INTERVAL 0x02
38 #define CH101_GPR_REG_IN_RINGDOWN_IDX 0x04
39 #define CH101_GPR_REG_PERIOD 0x05
40 #define CH101_GPR_REG_CAL_TRIG 0x06
41 #define CH101_GPR_REG_CAL_TRIG 0x06
42 #define CH101_GPR_REG_MAX_RANGE 0x07
43 #define CH101_GPR_REG_IN_RINGDOWN_THS 0x08
44 #define CH101_GPR_REG_REV_CYCLES 0x0C
45 #define CH101_GPR_REG_DCO_PERIOD 0x0E
46 #define CH101_GPR_REG_ST_RANGE 0x12
47 #define CH101_GPR_REG_READY 0x14
48 #define CH101_GPR_REG_IN_RINGDOWN 0x15
49 #define CH101_GPR_REG_TOF_SF 0x16
50 #define CH101_GPR_REG_TOF 0x18
51 #define CH101_GPR_REG_AMPLITUDE 0x1A
52 #define CH101_GPR_REG_CAL_RESULT 0x0A
53 #define CH101_GPR_REG_DATA 0x1C
55 #define CH101_GPR_MAX_SAMPLES (225)
57 extern const char *ch101_gpr_version;
58 extern const uint8_t ch101_gpr_fw_text[];
59 extern const uint8_t ch101_gpr_fw_vec[];
60 extern const uint16_t ch101_gpr_text_size;
61 extern const uint16_t ch101_gpr_vec_size;
63 uint16_t get_ch101_gpr_fw_ram_init_addr(
void);
64 uint16_t get_ch101_gpr_fw_ram_init_size(
void);
66 const unsigned char *get_ram_ch101_gpr_init_ptr(
void);
Internal definitions for the Chirp CH101 ultrasonic sensor.
uint8_t ch101_gpr_get_in_ringdown_idx(ch_dev_t *dev_ptr)
Get the sample index that defines the "in ringdown" region.
Definition: ch101_gpr.c:109
uint16_t ch101_gpr_get_in_ringdown_ths(ch_dev_t *dev_ptr)
Get the amplitude threshold for "in ringdown" detection.
Definition: ch101_gpr.c:97
void ch101_gpr_set_in_ringdown_idx(ch_dev_t *dev_ptr, uint8_t in_ringdown_idx)
Set the sample index for "in ringdown" status.
Definition: ch101_gpr.c:117
void ch101_gpr_set_in_ringdown_ths(ch_dev_t *dev_ptr, uint16_t in_ringdown_ths)
Set the amplitude threshold "in ringdown" status.
Definition: ch101_gpr.c:105
uint8_t ch101_gpr_get_target_in_ringdown(ch_dev_t *dev_ptr)
Get the target "in ringdown" status.
Definition: ch101_gpr.c:89
Internal driver functions for operation with the Chirp ultrasonic sensor.
SonicLib public API and support functions for TDK/InvenSense ultrasonic sensors (originally developed...
Chirp sensor device descriptor structure.
Definition: soniclib.h:732
Definition: soniclib.h:658