I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
APDS9960.c File Reference

APDS9960 Driver. More...

#include "APDS9960.h"
Include dependency graph for APDS9960.c:

Functions

FctERR APDS9960_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization for APDS9960 peripheral.
 
FctERR APDS9960_Init_Single (void)
 Initialization for APDS9960 peripheral.
 
FctERR APDS9960_Write (I2C_slave_t *const pSlave, const uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Write function for APDS9960.
 
FctERR APDS9960_Read (I2C_slave_t *const pSlave, uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Read function for APDS9960.
 
FctERR APDS9960_Write_Word (I2C_slave_t *const pSlave, const uint16_t *data, const uint16_t addr)
 I2C Word Write (little endian) function for APDS9960.
 
FctERR APDS9960_Read_Word (I2C_slave_t *const pSlave, uint16_t *data, const uint16_t addr)
 I2C Word Read (little endian) function for APDS9960.
 
FctERR APDS9960_Write_Special (I2C_slave_t *const pSlave, const APDS9960_spec_func func)
 I2C Special function Write function for APDS9960.
 

Detailed Description

APDS9960 Driver.

Author
SMFSW

APDS9960: Digital Proximity, Ambient Light, RGB and Gesture Sensor

Function Documentation

◆ APDS9960_Init()

FctERR APDS9960_Init ( const uint8_t idx,
I2C_HandleTypeDef *const hi2c,
const uint16_t devAddress )

Initialization for APDS9960 peripheral.

Parameters
[in]idx- APDS9960 index
[in]hi2c- pointer to APDS9960 I2C instance
[in]devAddress- APDS9960 device address
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ APDS9960_Init_Single()

FctERR APDS9960_Init_Single ( void )

Initialization for APDS9960 peripheral.

Warning
In case multiple devices (defined by I2C_APDS9960_NB > 1), you shall use APDS9960_Init instead
Returns
FctERR - error code
Here is the call graph for this function:

◆ APDS9960_Read()

FctERR APDS9960_Read ( I2C_slave_t *const pSlave,
uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Read function for APDS9960.

Parameters
[in]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
[in]nb- Number of bytes to read
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ APDS9960_Read_Word()

FctERR APDS9960_Read_Word ( I2C_slave_t *const pSlave,
uint16_t * data,
const uint16_t addr )

I2C Word Read (little endian) function for APDS9960.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in,out]data- pointer to read to
[in]addr- Address to read from
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ APDS9960_Write()

FctERR APDS9960_Write ( I2C_slave_t *const pSlave,
const uint8_t * data,
const uint16_t addr,
const uint16_t nb )

I2C Write function for APDS9960.

Parameters
[in]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
[in]nb- Number of bytes to write
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ APDS9960_Write_Special()

FctERR APDS9960_Write_Special ( I2C_slave_t *const pSlave,
const APDS9960_spec_func func )

I2C Special function Write function for APDS9960.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]func- special function to execute
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ APDS9960_Write_Word()

FctERR APDS9960_Write_Word ( I2C_slave_t *const pSlave,
const uint16_t * data,
const uint16_t addr )

I2C Word Write (little endian) function for APDS9960.

Parameters
[in,out]pSlave- Pointer to I2C slave instance
[in]data- pointer to write from
[in]addr- Address to write to
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: