cs100 base driver modules
More...
cs100 base driver modules
◆ CS100_READ_RETRY_TIMES
| #define CS100_READ_RETRY_TIMES 3 |
cs100 read retry times definition
retry 3 times
Definition at line 64 of file driver_cs100.h.
◆ cs100_handle_t
cs100 handle structure definition
◆ cs100_info_t
cs100 information structure definition
◆ cs100_time_t
cs100 time structure definition
◆ cs100_deinit()
close the chip
- Parameters
-
| [in] | *handle | pointer to an cs100 handle structure |
- Returns
- status code
- 0 success
- 1 trig or echo deinit failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 154 of file driver_cs100.c.
◆ cs100_info()
get chip's information
- Parameters
-
| [out] | *info | pointer to an cs100 info structure |
- Returns
- status code
- 0 success
- 2 handle is NULL
- Note
- none
Definition at line 324 of file driver_cs100.c.
◆ cs100_init()
initialize the chip
- Parameters
-
| [in] | *handle | pointer to an cs100 handle structure |
- Returns
- status code
- 0 success
- 1 trig or echo init failed
- 2 handle is NULL
- 3 linked functions is NULL
- Note
- none
Definition at line 61 of file driver_cs100.c.
◆ cs100_read()
| uint8_t cs100_read |
( |
cs100_handle_t * | handle, |
|
|
uint32_t * | time_us, |
|
|
float * | m ) |
read the distance
- Parameters
-
| [in] | *handle | pointer to an cs100 handle structure |
| [out] | *time_us | pointer to a us buffer |
| [out] | *m | pointer to a distance buffer |
- Returns
- status code
- 0 success
- 1 read failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 194 of file driver_cs100.c.