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

PCA9685 Driver procedures. More...

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

Data Structures

struct  PCA9685_t
 PCA9685 user interface struct. More...
 

Macros

#define PCA9685_DEF_FREQ   500U
 Default frequency to affect to PCA9685 register (range from 24Hz to 1526Hz)
 
#define PCA9685_MAX_CLOCK_FREQ   50000000UL
 PCA9685 Maximum external clock frequency.
 
#define PCA9685_NB_CHANNELS   16U
 PCA9685 Number of channels.
 
#define PCA9685_DEFAULT_SUB1_CALL_ADDR   (0xE2U >> 1U)
 PCA9685 SUB1 CALL Address.
 
#define PCA9685_DEFAULT_SUB2_CALL_ADDR   (0xE4U >> 1U)
 PCA9685 SUB2 CALL Address.
 
#define PCA9685_DEFAULT_SUB3_CALL_ADDR   (0xE8U >> 1U)
 PCA9685 SUB3 CALL Address.
 

Functions

FctERR PCA9685_Init_Sequence (PCA9685_t *const pCpnt)
 Initialization Sequence for PCA9685 peripheral.
 
FctERR PCA9685_Set_Clock_Freq (PCA9685_t *const pCpnt, const uint32_t freq)
 Sets external clock frequency.
 
uint32_t PCA9685_Get_Clock_Freq (PCA9685_t *const pCpnt)
 Gets external clock frequency.
 

Variables

PCA9685_t PCA9685 [I2C_PCA9685_NB]
 PCA9685 User structure.
 

Detailed Description

PCA9685 Driver procedures.

Author
SMFSW

PCA9685: 16-channel, 12-bit PWM Fm+ I2C-bus LED controller

Macro Definition Documentation

◆ PCA9685_DEF_FREQ

#define PCA9685_DEF_FREQ   500U

Default frequency to affect to PCA9685 register (range from 24Hz to 1526Hz)

◆ PCA9685_DEFAULT_SUB1_CALL_ADDR

#define PCA9685_DEFAULT_SUB1_CALL_ADDR   (0xE2U >> 1U)

PCA9685 SUB1 CALL Address.

◆ PCA9685_DEFAULT_SUB2_CALL_ADDR

#define PCA9685_DEFAULT_SUB2_CALL_ADDR   (0xE4U >> 1U)

PCA9685 SUB2 CALL Address.

◆ PCA9685_DEFAULT_SUB3_CALL_ADDR

#define PCA9685_DEFAULT_SUB3_CALL_ADDR   (0xE8U >> 1U)

PCA9685 SUB3 CALL Address.

◆ PCA9685_MAX_CLOCK_FREQ

#define PCA9685_MAX_CLOCK_FREQ   50000000UL

PCA9685 Maximum external clock frequency.

◆ PCA9685_NB_CHANNELS

#define PCA9685_NB_CHANNELS   16U

PCA9685 Number of channels.

Function Documentation

◆ PCA9685_Get_Clock_Freq()

uint32_t PCA9685_Get_Clock_Freq ( PCA9685_t *const pCpnt)
inline

Gets external clock frequency.

Parameters
[in]pCpnt- Pointer to PCA9685 component
Returns
Internal clock frequency

◆ PCA9685_Init_Sequence()

FctERR PCA9685_Init_Sequence ( PCA9685_t *const pCpnt)

Initialization Sequence for PCA9685 peripheral.

Weak Functions
PCA9685 Init sequence may be user implemented if custom initialization sequence needed
Parameters
[in]pCpnt- Pointer to PCA9685 component
Returns
FctERR - ErrorCode
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PCA9685_Set_Clock_Freq()

FctERR PCA9685_Set_Clock_Freq ( PCA9685_t *const pCpnt,
const uint32_t freq )

Sets external clock frequency.

Parameters
[in,out]pCpnt- Pointer to PCA9685 component
[in]freq- External clock frequency in Hz
Returns
FctERR - ErrorCode
Here is the caller graph for this function:

Variable Documentation

◆ PCA9685

PCA9685_t PCA9685[I2C_PCA9685_NB]
extern

PCA9685 User structure.