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

PCA9952 Driver extensions. More...

#include "sarmfsw.h"
#include "PCA9952.h"
Include dependency graph for PCA9952_ex.h:
This graph shows which files directly or indirectly include this file:

Functions

FctERR PCA9952_Set_MODE1 (PCA9952_t *const pCpnt, const uPCA9952_REG__MODE1 MODE1)
 Set MODE1 register.
 
FctERR PCA9952_Set_MODE2 (PCA9952_t *const pCpnt, uPCA9952_REG__MODE2 MODE2)
 Set MODE2 register.
 
FctERR PCA9952_Set_Auto_Increment (PCA9952_t *const pCpnt, const PCA962x_reg_inc inc)
 Set auto increment option for PCA9952 registers.
 
FctERR PCA9952_Set_Latch (PCA9952_t *const pCpnt, const PCA96xx_latch latch)
 Set latch type for PCA9952 peripheral.
 
FctERR PCA9952_Set_Mode_LED (PCA9952_t *const pCpnt, const PCA9xxx_chan chan, const PCA995x_ledout mode)
 Set PCA9952 peripheral LED mode.
 
FctERR PCA9952_Set_Mode_LEDs (PCA9952_t *const pCpnt, const uint16_t chans, const PCA995x_ledout mode)
 Set PCA9952 peripheral multiple LEDs mode.
 
FctERR PCA9952_Set_IREF (PCA9952_t *const pCpnt, const PCA9xxx_chan chan, const uint8_t iref)
 Set PCA9952 output gain control value.
 
FctERR PCA9952_Set_IREFs (PCA9952_t *const pCpnt, const uint16_t chans, const uint8_t iref)
 Set PCA9952 output gain control value.
 
FctERR PCA9952_Set_Offset (PCA9952_t *const pCpnt, const PCA9952_offset offset)
 Set PCA9952 peripheral delay between channels.
 
FctERR PCA9952_ReadVals (PCA9952_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 PCA9952.
 
FctERR PCA9952_ReadVals_Array (PCA9952_t *const pCpnt, uint8_t pDuty[], const PCA9xxx_chan start, const PCA9xxx_chan end)
 Read PWM duty cycle array of values of a PCA9952.
 
FctERR PCA9952_ReadVals_IndexedArray (PCA9952_t *const pCpnt, uint8_t pDuty[], const PCA9xxx_chan start, const PCA9xxx_chan end)
 Read PWM duty cycle array of values of a PCA9952.
 
FctERR PCA9952_ReadVals_All (PCA9952_t *const pCpnt, uint8_t pDuty[24])
 Read all PWM duty cycle array of values of a PCA9952 (for the 24 channels)
 
FctERR PCA9952_ReadVal (PCA9952_t *const pCpnt, const PCA9xxx_chan chan, uint8_t *const pDuty)
 Read PWM duty cycle value of a PCA9952 channel.
 
FctERR PCA9952_PutVals (PCA9952_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 PCA9952.
 
FctERR PCA9952_PutVals_Array (PCA9952_t *const pCpnt, const uint8_t pDuty[], const PCA9xxx_chan start, const PCA9xxx_chan end)
 Send PWM duty cycle array of values to apply on a PCA9952.
 
FctERR PCA9952_PutVals_IndexedArray (PCA9952_t *const pCpnt, const uint8_t pDuty[], const PCA9xxx_chan start, const PCA9xxx_chan end)
 Send PWM duty cycle array of values to apply on a PCA9952.
 
FctERR PCA9952_PutVals_All (PCA9952_t *const pCpnt, const uint8_t pDuty[24])
 Send all PWM duty cycle array of values to apply on a PCA9952 (for the 24 channels)
 
FctERR PCA9952_PutVal (PCA9952_t *const pCpnt, const PCA9xxx_chan chan, const uint8_t duty)
 Send PWM duty cycle value to apply on a PCA9952 channel.
 
FctERR PCA9952_SetVal (PCA9952_t *const pCpnt, const PCA9xxx_chan chan)
 Send PWM Full ON value to apply on a PCA9952 channel.
 
FctERR PCA9952_ClrVal (PCA9952_t *const pCpnt, const PCA9xxx_chan chan)
 Send PWM Full OFF value to apply on a PCA9952 channel.
 
FctERR PCA9952_ReadEFLAGs (PCA9952_t *const pCpnt, uPCA9952_REG__EFLAG *const eflags)
 Read LEDs error flags.
 
FctERR PCA9952_ReadRegister (PCA9952_t *const pCpnt, const PCA9952_reg reg, uint8_t *val)
 Read register from PCA9952.
 
void PCA9952_RST_GPIO_Init (PCA9952_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Reset GPIO pin init for PCA9952.
 
void PCA9952_RST_GPIO_Set (PCA9952_t *const pCpnt, const bool state)
 Reset GPIO pin setter for PCA9952.
 
void PCA9952_OE_GPIO_Init (PCA9952_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Output Enable GPIO pin init for PCA9952.
 
void PCA9952_OE_GPIO_Set (PCA9952_t *const pCpnt, const bool state)
 Output Enable GPIO pin setter for PCA9952.
 

Detailed Description

PCA9952 Driver extensions.

Author
SMFSW

PCA9952: 16-channel Fm+ I2C-bus 57 mA constant current LED driver

Function Documentation

◆ PCA9952_ClrVal()

FctERR PCA9952_ClrVal ( PCA9952_t *const pCpnt,
const PCA9xxx_chan chan )

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

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

◆ PCA9952_OE_GPIO_Init()

void PCA9952_OE_GPIO_Init ( PCA9952_t *const pCpnt,
GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Output Enable GPIO pin init for PCA9952.

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

◆ PCA9952_OE_GPIO_Set()

void PCA9952_OE_GPIO_Set ( PCA9952_t *const pCpnt,
const bool state )

Output Enable GPIO pin setter for PCA9952.

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

◆ PCA9952_PutVal()

FctERR PCA9952_PutVal ( PCA9952_t *const pCpnt,
const PCA9xxx_chan chan,
const uint8_t duty )

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

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

◆ PCA9952_PutVals()

FctERR PCA9952_PutVals ( PCA9952_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 PCA9952.

Parameters
[in]pCpnt- Pointer to PCA9952 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:

◆ PCA9952_PutVals_All()

FctERR PCA9952_PutVals_All ( PCA9952_t *const pCpnt,
const uint8_t pDuty[24] )
inline

Send all PWM duty cycle array of values to apply on a PCA9952 (for the 24 channels)

Parameters
[in]pCpnt- Pointer to PCA9952 component
[in]pDuty- Pointer to duty cycle values (24 bytes)
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9952_PutVals_Array()

FctERR PCA9952_PutVals_Array ( PCA9952_t *const pCpnt,
const uint8_t pDuty[],
const PCA9xxx_chan start,
const PCA9xxx_chan end )
inline

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

Parameters
[in]pCpnt- Pointer to PCA9952 component
[in]pDuty- Pointer to duty cycle values
[in]start- starting channel number
[in]end- ending channel number
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9952_PutVals_IndexedArray()

FctERR PCA9952_PutVals_IndexedArray ( PCA9952_t *const pCpnt,
const uint8_t pDuty[],
const PCA9xxx_chan start,
const PCA9xxx_chan end )
inline

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

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

◆ PCA9952_ReadEFLAGs()

FctERR PCA9952_ReadEFLAGs ( PCA9952_t *const pCpnt,
uPCA9952_REG__EFLAG *const eflags )

Read LEDs error flags.

Parameters
[in]pCpnt- Pointer to PCA9952 component
[in,out]eflags- Pointer to the error flags data for receive
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9952_ReadRegister()

FctERR PCA9952_ReadRegister ( PCA9952_t *const pCpnt,
const PCA9952_reg reg,
uint8_t * val )

Read register from PCA9952.

Parameters
[in]pCpnt- Pointer to PCA9952 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:

◆ PCA9952_ReadVal()

FctERR PCA9952_ReadVal ( PCA9952_t *const pCpnt,
const PCA9xxx_chan chan,
uint8_t *const pDuty )

Read PWM duty cycle value of a PCA9952 channel.

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

◆ PCA9952_ReadVals()

FctERR PCA9952_ReadVals ( PCA9952_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 PCA9952.

Parameters
[in]pCpnt- Pointer to PCA9952 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:

◆ PCA9952_ReadVals_All()

FctERR PCA9952_ReadVals_All ( PCA9952_t *const pCpnt,
uint8_t pDuty[24] )
inline

Read all PWM duty cycle array of values of a PCA9952 (for the 24 channels)

Parameters
[in]pCpnt- Pointer to PCA9952 component
[in,out]pDuty- Pointer to duty cycle values (24 bytes)
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9952_ReadVals_Array()

FctERR PCA9952_ReadVals_Array ( PCA9952_t *const pCpnt,
uint8_t pDuty[],
const PCA9xxx_chan start,
const PCA9xxx_chan end )
inline

Read PWM duty cycle array of values of a PCA9952.

Parameters
[in]pCpnt- Pointer to PCA9952 component
[in,out]pDuty- Pointer to duty cycle values
[in]start- starting channel number
[in]end- ending channel number
Returns
FctERR - ErrorCode
Here is the call graph for this function:

◆ PCA9952_ReadVals_IndexedArray()

FctERR PCA9952_ReadVals_IndexedArray ( PCA9952_t *const pCpnt,
uint8_t pDuty[],
const PCA9xxx_chan start,
const PCA9xxx_chan end )
inline

Read PWM duty cycle array of values of a PCA9952.

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

◆ PCA9952_RST_GPIO_Init()

void PCA9952_RST_GPIO_Init ( PCA9952_t *const pCpnt,
GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Reset GPIO pin init for PCA9952.

Weak Functions
PCA9952 Reset GPIO pin init may be user implemented if needed
Parameters
[in]pCpnt- Pointer to PCA9952 component
[in]GPIOx- RST port
[in]GPIO_Pin- RST pin
[in]GPIO_ActiveRST pin active state
Here is the call graph for this function:

◆ PCA9952_RST_GPIO_Set()

void PCA9952_RST_GPIO_Set ( PCA9952_t *const pCpnt,
const bool state )

Reset GPIO pin setter for PCA9952.

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

◆ PCA9952_Set_Auto_Increment()

FctERR PCA9952_Set_Auto_Increment ( PCA9952_t *const pCpnt,
const PCA962x_reg_inc inc )

Set auto increment option for PCA9952 registers.

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

◆ PCA9952_Set_IREF()

FctERR PCA9952_Set_IREF ( PCA9952_t *const pCpnt,
const PCA9xxx_chan chan,
const uint8_t iref )

Set PCA9952 output gain control value.

Parameters
[in,out]pCpnt- Pointer to PCA9952 component
[in]chan- PCA9952 channel
[in]iref- output gain control value
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCA9952_Set_IREFs()

FctERR PCA9952_Set_IREFs ( PCA9952_t *const pCpnt,
const uint16_t chans,
const uint8_t iref )

Set PCA9952 output gain control value.

Parameters
[in,out]pCpnt- Pointer to PCA9952 component
[in]chans- PCA9952 channels mask (masked channels will be affected to new mode, other ones remaining unchanged)
[in]iref- output gain control value
Returns
FctERR - error code
Here is the call graph for this function:

◆ PCA9952_Set_Latch()

FctERR PCA9952_Set_Latch ( PCA9952_t *const pCpnt,
const PCA96xx_latch latch )

Set latch type for PCA9952 peripheral.

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

◆ PCA9952_Set_MODE1()

FctERR PCA9952_Set_MODE1 ( PCA9952_t *const pCpnt,
const uPCA9952_REG__MODE1 MODE1 )
inline

Set MODE1 register.

Parameters
[in,out]pCpnt- Pointer to PCA9952 component
[in]MODE1- MODE1 register value
Returns
FctERR - error code
Here is the call graph for this function:

◆ PCA9952_Set_MODE2()

FctERR PCA9952_Set_MODE2 ( PCA9952_t *const pCpnt,
uPCA9952_REG__MODE2 MODE2 )
inline

Set MODE2 register.

Parameters
[in,out]pCpnt- Pointer to PCA9952 component
[in]MODE2- MODE2 register value
Returns
FctERR - error code
Here is the call graph for this function:

◆ PCA9952_Set_Mode_LED()

FctERR PCA9952_Set_Mode_LED ( PCA9952_t *const pCpnt,
const PCA9xxx_chan chan,
const PCA995x_ledout mode )

Set PCA9952 peripheral LED mode.

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

◆ PCA9952_Set_Mode_LEDs()

FctERR PCA9952_Set_Mode_LEDs ( PCA9952_t *const pCpnt,
const uint16_t chans,
const PCA995x_ledout mode )

Set PCA9952 peripheral multiple LEDs mode.

Parameters
[in,out]pCpnt- Pointer to PCA9952 component
[in]chans- PCA9952 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:

◆ PCA9952_Set_Offset()

FctERR PCA9952_Set_Offset ( PCA9952_t *const pCpnt,
const PCA9952_offset offset )

Set PCA9952 peripheral delay between channels.

Parameters
[in,out]pCpnt- Pointer to PCA9952 component
[in]offset- delay between channels
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCA9952_SetVal()

FctERR PCA9952_SetVal ( PCA9952_t *const pCpnt,
const PCA9xxx_chan chan )

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

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