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

PCA9624 Driver extensions. More...

#include "PCA9624.h"
Include dependency graph for PCA9624_ex.c:

Functions

FctERR PCA9624_Set_Auto_Increment (PCA9624_t *const pCpnt, const PCA962x_reg_inc inc)
 Set auto increment option for PCA9624 registers.
 
FctERR PCA9624_Set_Latch (PCA9624_t *const pCpnt, const PCA96xx_latch latch)
 Set latch type for PCA9624 peripheral.
 
FctERR PCA9624_Set_Mode_LED (PCA9624_t *const pCpnt, const PCA9xxx_chan chan, const PCA962x_ledout mode)
 Set PCA9624 peripheral LED mode.
 
FctERR PCA9624_Set_Mode_LEDs (PCA9624_t *const pCpnt, const uint8_t chans, const PCA962x_ledout mode)
 Set PCA9624 peripheral multiple LEDs mode.
 
FctERR PCA9624_ReadVals (PCA9624_t *const pCpnt, uint8_t pDuty[], const bool indexed, const PCA9xxx_chan start, const PCA9xxx_chan end)
 Read PWM duty cycle array of values of a PCA9624.
 
FctERR PCA9624_ReadVal (PCA9624_t *const pCpnt, const PCA9xxx_chan chan, uint8_t *const pDuty)
 Read PWM duty cycle value of a PCA9624 channel.
 
FctERR PCA9624_PutVals (PCA9624_t *const pCpnt, const uint8_t pDuty[], const bool indexed, const PCA9xxx_chan start, const PCA9xxx_chan end)
 Send PWM duty cycle array of values to apply on a PCA9624.
 
FctERR PCA9624_PutVal (PCA9624_t *const pCpnt, const PCA9xxx_chan chan, const uint8_t duty)
 Send PWM duty cycle value to apply on a PCA9624 channel.
 
FctERR PCA9624_SetVal (PCA9624_t *const pCpnt, const PCA9xxx_chan chan)
 Send PWM Full ON value to apply on a PCA9624 channel.
 
FctERR PCA9624_ClrVal (PCA9624_t *const pCpnt, const PCA9xxx_chan chan)
 Send PWM Full OFF value to apply on a PCA9624 channel.
 
FctERR PCA9624_Reset (PCA9624_t *const pCpnt)
 Reset for PCA9624 peripheral.
 
FctERR PCA9624_Reset_All (I2C_HandleTypeDef *const hi2c)
 General call reset function for PCA9624.
 
FctERR PCA9624_ReadRegister (PCA9624_t *const pCpnt, const PCA9624_reg reg, uint8_t *const val)
 Reads register from PCA9624.
 
void PCA9624_OE_GPIO_Init (PCA9624_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Output Enable GPIO pin init for PCA9624.
 
void PCA9624_OE_GPIO_Set (PCA9624_t *const pCpnt, const bool state)
 Output Enable GPIO pin setter for PCA9624.
 

Detailed Description

PCA9624 Driver extensions.

Author
SMFSW

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

Function Documentation

◆ PCA9624_ClrVal()

FctERR PCA9624_ClrVal ( PCA9624_t *const pCpnt,
const PCA9xxx_chan chan )

Send PWM Full OFF value to apply on a PCA9624 channel.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]chan- channel number
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9624_OE_GPIO_Init()

void PCA9624_OE_GPIO_Init ( PCA9624_t *const pCpnt,
GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Output Enable GPIO pin init for PCA9624.

Weak Functions
PCA9624 Output Enable GPIO pin init may be user implemented if needed
Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]GPIOx- OE port
[in]GPIO_Pin- OE pin
[in]GPIO_ActiveOE pin active state
Here is the call graph for this function:

◆ PCA9624_OE_GPIO_Set()

void PCA9624_OE_GPIO_Set ( PCA9624_t *const pCpnt,
const bool state )

Output Enable GPIO pin setter for PCA9624.

Weak Functions
PCA9624 Output Enable GPIO pin setter may be user implemented if needed
Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]state- state to write on OE pin (0: inactive, 1: active)
Here is the call graph for this function:

◆ PCA9624_PutVal()

FctERR PCA9624_PutVal ( PCA9624_t *const pCpnt,
const PCA9xxx_chan chan,
const uint8_t duty )

Send PWM duty cycle value to apply on a PCA9624 channel.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]chan- channel number
[in]duty- Duty cycle
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9624_PutVals()

FctERR PCA9624_PutVals ( PCA9624_t *const pCpnt,
const uint8_t pDuty[],
const bool indexed,
const PCA9xxx_chan start,
const PCA9xxx_chan end )

Send PWM duty cycle array of values to apply on a PCA9624.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]pDuty- Pointer to duty cycle values
[in]indexed- if set to true, pDuty start address will be indexed by the value of start parameter (thus pDuty always needs first channels cells even if not sent)
[in]start- starting channel number
[in]end- ending channel number
Returns
FctERR - ErrorCode
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCA9624_ReadRegister()

FctERR PCA9624_ReadRegister ( PCA9624_t *const pCpnt,
const PCA9624_reg reg,
uint8_t *const val )

Reads register from PCA9624.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]reg- Register address to read from
[in,out]val- Pointer to the data for receive
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9624_ReadVal()

FctERR PCA9624_ReadVal ( PCA9624_t *const pCpnt,
const PCA9xxx_chan chan,
uint8_t *const pDuty )

Read PWM duty cycle value of a PCA9624 channel.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]chan- channel number
[in,out]pDuty- Pointer to duty cycle data
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9624_ReadVals()

FctERR PCA9624_ReadVals ( PCA9624_t *const pCpnt,
uint8_t pDuty[],
const bool indexed,
const PCA9xxx_chan start,
const PCA9xxx_chan end )

Read PWM duty cycle array of values of a PCA9624.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in,out]pDuty- Pointer to duty cycle values
[in]indexed- if set to true, pDuty start address will be indexed by the value of start parameter (thus pDuty always needs first channels cells even if not sent)
[in]start- starting channel number
[in]end- ending channel number
Returns
FctERR - ErrorCode
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCA9624_Reset()

FctERR PCA9624_Reset ( PCA9624_t *const pCpnt)

Reset for PCA9624 peripheral.

Parameters
[in]pCpnt- Pointer to PCA9624 component
Returns
FctERR - error code

◆ PCA9624_Reset_All()

FctERR PCA9624_Reset_All ( I2C_HandleTypeDef *const hi2c)

General call reset function for PCA9624.

Parameters
[in]hi2c- pointer to general call I2C instance
Returns
FctERR - error code

◆ PCA9624_Set_Auto_Increment()

FctERR PCA9624_Set_Auto_Increment ( PCA9624_t *const pCpnt,
const PCA962x_reg_inc inc )

Set auto increment option for PCA9624 registers.

Parameters
[in,out]pCpnt- Pointer to PCA9624 component
[in]inc- auto increment option
Returns
FctERR - error code
Here is the caller graph for this function:

◆ PCA9624_Set_Latch()

FctERR PCA9624_Set_Latch ( PCA9624_t *const pCpnt,
const PCA96xx_latch latch )

Set latch type for PCA9624 peripheral.

Parameters
[in,out]pCpnt- Pointer to PCA9624 component
[in]latch- Latch type
Returns
FctERR - error code
Here is the call graph for this function:

◆ PCA9624_Set_Mode_LED()

FctERR PCA9624_Set_Mode_LED ( PCA9624_t *const pCpnt,
const PCA9xxx_chan chan,
const PCA962x_ledout mode )

Set PCA9624 peripheral LED mode.

Parameters
[in,out]pCpnt- Pointer to PCA9624 component
[in]chan- PCA9624 channel
[in]mode- channel mode (on/off/dimming/blinking)
Returns
FctERR - error code
Here is the call graph for this function:

◆ PCA9624_Set_Mode_LEDs()

FctERR PCA9624_Set_Mode_LEDs ( PCA9624_t *const pCpnt,
const uint8_t chans,
const PCA962x_ledout mode )

Set PCA9624 peripheral multiple LEDs mode.

Parameters
[in,out]pCpnt- Pointer to PCA9624 component
[in]chans- PCA9624 channels mask (masked channels will be affected to new mode, other ones remaining unchanged)
[in]mode- channel mode (on/off/dimming/blinking)
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCA9624_SetVal()

FctERR PCA9624_SetVal ( PCA9624_t *const pCpnt,
const PCA9xxx_chan chan )

Send PWM Full ON value to apply on a PCA9624 channel.

Parameters
[in]pCpnt- Pointer to PCA9624 component
[in]chan- channel number
Returns
FctERR - ErrorCode
Here is the call graph for this function: