em4095 basic driver modules
More...
em4095 basic driver modules
◆ EM4095_MAX_LENGTH
| #define EM4095_MAX_LENGTH 384 |
◆ em4095_decode_t
em4095 decode structure definition
◆ em4095_handle_t
em4095 handle structure definition
◆ em4095_info_t
em4095 information structure definition
◆ em4095_time_t
em4095 time structure definition
◆ em4095_mode_t
em4095 mode enumeration definition
| Enumerator |
|---|
| EM4095_MODE_IDLE | idle
|
| EM4095_MODE_READ | read
|
| EM4095_MODE_WRITE | write
|
Definition at line 69 of file driver_em4095.h.
◆ em4095_copy_decode_buffer()
| uint8_t em4095_copy_decode_buffer |
( |
em4095_handle_t * | handle, |
|
|
uint8_t * | buf, |
|
|
uint16_t * | len ) |
copy decode buffer
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
| [out] | *buf | pointer to a data buffer |
| [in] | len | read length |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 767 of file driver_em4095.c.
◆ em4095_deinit()
close the chip
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
- Returns
- status code
- 0 success
- 1 deinit failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 451 of file driver_em4095.c.
◆ em4095_get_div()
get irq div
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
| [out] | *clock_div | pointer to a div buffer |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 608 of file driver_em4095.c.
◆ em4095_info()
get chip's information
- Parameters
-
| [out] | *info | pointer to an em4095 info structure |
- Returns
- status code
- 0 success
- 2 handle is NULL
- Note
- none
Definition at line 797 of file driver_em4095.c.
◆ em4095_init()
initialize the chip
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
- Returns
- status code
- 0 success
- 1 gpio initialization failed
- 2 handle is NULL
- 3 linked functions is NULL
- Note
- none
Definition at line 297 of file driver_em4095.c.
◆ em4095_irq_handler()
irq handler
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
- Returns
- status code
- 0 success
- 1 run failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 163 of file driver_em4095.c.
◆ em4095_power_down()
power down
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
- Returns
- status code
- 0 success
- 1 power down failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 507 of file driver_em4095.c.
◆ em4095_power_on()
power on
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
- Returns
- status code
- 0 success
- 1 power on failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 541 of file driver_em4095.c.
◆ em4095_read()
read data
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
| [in] | len | read length |
- Returns
- status code
- 0 success
- 1 read failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 len is too long
- Note
- none
Definition at line 636 of file driver_em4095.c.
◆ em4095_set_div()
set irq div
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
| [in] | clock_div | clock div |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- 4 div can't be 0
- Note
- none
Definition at line 576 of file driver_em4095.c.
◆ em4095_write()
| uint8_t em4095_write |
( |
em4095_handle_t * | handle, |
|
|
uint8_t * | buf, |
|
|
uint16_t | len ) |
write data
- Parameters
-
| [in] | *handle | pointer to an em4095 handle structure |
| [in] | *buf | pointer to a data buffer |
| [in] | len | written length |
- Returns
- status code
- 0 success
- 1 write failed
- 2 handle is NULL
- 3 handle is not initialized
- 4 len is too long
- Note
- none
Definition at line 703 of file driver_em4095.c.