LibDriver APM2000
Loading...
Searching...
No Matches
apm2000 extern driver function

apm2000 extern driver modules More...

Collaboration diagram for apm2000 extern driver function:

Functions

uint8_t apm2000_set_reg_iic (apm2000_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
 set the chip register with iic interface
uint8_t apm2000_get_reg_iic (apm2000_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
 get the chip register with iic interface
uint8_t apm2000_set_get_reg_uart (apm2000_handle_t *handle, uint8_t *input, uint16_t in_len, uint8_t *output, uint16_t out_len)
 set and get the chip register with uart interface

Detailed Description

apm2000 extern driver modules

Function Documentation

◆ apm2000_get_reg_iic()

uint8_t apm2000_get_reg_iic ( apm2000_handle_t * handle,
uint16_t reg,
uint8_t * buf,
uint16_t len )

get the chip register with iic interface

Parameters
[in]*handlepointer to an apm2000 handle structure
[in]regiic register address
[out]*bufpointer to a data buffer
[in]lendata buffer length
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 799 of file driver_apm2000.c.

◆ apm2000_set_get_reg_uart()

uint8_t apm2000_set_get_reg_uart ( apm2000_handle_t * handle,
uint8_t * input,
uint16_t in_len,
uint8_t * output,
uint16_t out_len )

set and get the chip register with uart interface

Parameters
[in]*handlepointer to an apm2000 handle structure
[in]*inputpointer to an input buffer
[in]in_leninput length
[out]*outputpointer to an output buffer
[in]out_lenoutput length
Returns
status code
  • 0 success
  • 1 write read failed
Note
none

Definition at line 727 of file driver_apm2000.c.

◆ apm2000_set_reg_iic()

uint8_t apm2000_set_reg_iic ( apm2000_handle_t * handle,
uint16_t reg,
uint8_t * buf,
uint16_t len )

set the chip register with iic interface

Parameters
[in]*handlepointer to an apm2000 handle structure
[in]regiic register address
[in]*bufpointer to a data buffer
[in]lendata buffer length
Returns
status code
  • 0 success
  • 1 write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 763 of file driver_apm2000.c.