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

PCA9624 Driver. More...

#include "sarmfsw.h"
#include "I2C_component.h"
#include "I2C_peripheral.h"
#include "PCA9xxx.h"
#include "PCA9624_proc.h"
#include "PCA9624_ex.h"
Include dependency graph for PCA9624.h:
This graph shows which files directly or indirectly include this file:

Data Structures

union  uPCA9624_REG__MODE1
 Union for MODE1 register of PCA9624. More...
 
union  uPCA9624_REG__MODE2
 Union for MODE2 register of PCA9624. More...
 
union  uPCA9624_REG__LEDOUT
 Union for LEDOUT registers of PCA9624. More...
 

Macros

#define I2C_PCA9624_NB   1U
 Number of PCA9624 peripherals.
 
#define PCA9624_BASE_ADDR   0x00U
 PCA9624 Base Address.
 

Enumerations

enum  PCA9624_reg {
  PCA9624__MODE1 = 0U , PCA9624__MODE2 , PCA9624__PWM0 , PCA9624__PWM1 ,
  PCA9624__PWM2 , PCA9624__PWM3 , PCA9624__PWM4 , PCA9624__PWM5 ,
  PCA9624__PWM6 , PCA9624__PWM7 , PCA9624__GRPPWM , PCA9624__GRPFREQ ,
  PCA9624__LEDOUT0 , PCA9624__LEDOUT1 , PCA9624__SUBADR1 , PCA9624__SUBADR2 ,
  PCA9624__SUBADR3 , PCA9624__ALLCALLADR
}
 Register map enum of PCA9624. More...
 

Functions

FctERR PCA9624_Init (const uint8_t idx, I2C_HandleTypeDef *const hi2c, const uint16_t devAddress)
 Initialization for PCA9624 peripheral.
 
FctERR PCA9624_Init_Single (void)
 Initialization for PCA9624 peripheral.
 
FctERR PCA9624_Write (I2C_slave_t *const pSlave, const uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Write function for PCA9624.
 
FctERR PCA9624_Read (I2C_slave_t *const pSlave, uint8_t *data, const uint16_t addr, const uint16_t nb)
 I2C Read function for PCA9624.
 

Detailed Description

PCA9624 Driver.

Author
SMFSW

PCA9624: 8-bit Fm+ I2C-bus 100mA 40V LED driver

Macro Definition Documentation

◆ I2C_PCA9624_NB

#define I2C_PCA9624_NB   1U

Number of PCA9624 peripherals.

Note
Define I2C_PCA9624_NB to enable multiple peripherals of this type

◆ PCA9624_BASE_ADDR

#define PCA9624_BASE_ADDR   0x00U

PCA9624 Base Address.

Note
Define PCA9624_BASE_ADDR to change default device base address
Warning
no real base default address

Enumeration Type Documentation

◆ PCA9624_reg

Register map enum of PCA9624.

Enumerator
PCA9624__MODE1 

register MODE1

PCA9624__MODE2 

register MODE2

PCA9624__PWM0 

register PWM0

PCA9624__PWM1 

register PWM1

PCA9624__PWM2 

register PWM2

PCA9624__PWM3 

register PWM3

PCA9624__PWM4 

register PWM4

PCA9624__PWM5 

register PWM5

PCA9624__PWM6 

register PWM6

PCA9624__PWM7 

register PWM7

PCA9624__GRPPWM 

register Group Duty Cycle Control

PCA9624__GRPFREQ 

register Group Frequency

PCA9624__LEDOUT0 

register LED output state 0

PCA9624__LEDOUT1 

register LED output state 1

PCA9624__SUBADR1 

register SUBADR1

PCA9624__SUBADR2 

register SUBADR2

PCA9624__SUBADR3 

register SUBADR3

PCA9624__ALLCALLADR 

register ALLCALLADR

Function Documentation

◆ PCA9624_Init()

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

Initialization for PCA9624 peripheral.

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

◆ PCA9624_Init_Single()

FctERR PCA9624_Init_Single ( void )

Initialization for PCA9624 peripheral.

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

◆ PCA9624_Read()

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

I2C Read function for PCA9624.

Parameters
[in,out]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:

◆ PCA9624_Write()

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

I2C Write function for PCA9624.

Parameters
[in,out]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: