|
I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
|
PCA9532 Driver extensions. More...


Data Structures | |
| union | uPCA9532_REG_MAP |
| PCA9532 Register map union. More... | |
Functions | |
| FctERR | PCA9532_Set_Auto_Increment (PCA9532_t *const pCpnt, const PCA95xx_reg_inc inc) |
| Set auto increment option for PCA9532 registers. | |
| FctERR | PCA9532_Freq_To_Byte (uint8_t *const byte, const float freq) |
| Convert Frequency to PSCx byte register. | |
| FctERR | PCA9532_DutyCycle_To_Byte (uint8_t *const byte, const float duty) |
| Convert Frequency to PWMx byte register. | |
| float | PCA9532_Byte_To_Freq (const uint8_t freq) |
| Convert PSCx byte register to Frequency (in Hz) | |
| float | PCA9532_Byte_To_Duty (const uint8_t duty) |
| Convert PWMx byte register to Duty Cycle (in %) | |
| FctERR | PCA9532_ReadRegister (PCA9532_t *const pCpnt, const PCA9532_reg reg, uint8_t *const val) |
| Read register from PCA9532. | |
| FctERR | PCA9532_Read_INPUT0 (PCA9532_t *const pCpnt, uPCA9532_REG__INPUT0 *const pINPUT0) |
| Read LED0 to LED7 input register. | |
| FctERR | PCA9532_Read_INPUT1 (PCA9532_t *const pCpnt, uPCA9532_REG__INPUT1 *const pINPUT1) |
| Read LED8 to LED15 input register. | |
| FctERR | PCA9532_Set_Mode_LED (PCA9532_t *const pCpnt, const PCA9xxx_chan chan, const PCA95xx_ledsel mode) |
| Set PCA9532 peripheral LED mode. | |
| FctERR | PCA9532_Set_Mode_LEDs (PCA9532_t *const pCpnt, const uint16_t chans, const PCA95xx_ledsel mode) |
| Set PCA9532 peripheral multiple LEDs mode. | |
| FctERR | PCA9532_SetFrequency (PCA9532_t *const pCpnt, const float freq, const bool index) |
| Set PSCx frequency of PCA9532. | |
| FctERR | PCA9532_SetDuty (PCA9532_t *const pCpnt, const float duty, const bool index) |
| Set PWMx duty cycle of PCA9532. | |
| void | PCA9532_RST_GPIO_Init (PCA9532_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active) |
| Reset GPIO pin init for PCA9532. | |
| void | PCA9532_RST_GPIO_Set (PCA9532_t *const pCpnt, const bool state) |
| Reset GPIO pin setter for PCA9532. | |
PCA9532 Driver extensions.
PCA9532: 16-bit I2C-bus LED dimmer
|
inline |
Convert PWMx byte register to Duty Cycle (in %)
| [in] | duty | - 8b PWMx register value |

|
inline |
Convert PSCx byte register to Frequency (in Hz)
| [in] | freq | - 8b PSCx register value |

| FctERR PCA9532_DutyCycle_To_Byte | ( | uint8_t *const | byte, |
| const float | duty ) |
Convert Frequency to PWMx byte register.
| [in,out] | byte | - Pointer to output value |
| [in] | duty | - Duty Cycle in % |

| FctERR PCA9532_Freq_To_Byte | ( | uint8_t *const | byte, |
| const float | freq ) |
Convert Frequency to PSCx byte register.
| [in,out] | byte | - Pointer to output value |
| [in] | freq | - Frequency in Hz (0.592Hz to 152Hz) |

| FctERR PCA9532_Read_INPUT0 | ( | PCA9532_t *const | pCpnt, |
| uPCA9532_REG__INPUT0 *const | pINPUT0 ) |
Read LED0 to LED7 input register.
| [in] | pCpnt | - Pointer to PCA9532 component |
| [in,out] | pINPUT0 | - Pointer to INPUT0 output variable |

| FctERR PCA9532_Read_INPUT1 | ( | PCA9532_t *const | pCpnt, |
| uPCA9532_REG__INPUT1 *const | pINPUT1 ) |
Read LED8 to LED15 input register.
| [in] | pCpnt | - Pointer to PCA9532 component |
| [in,out] | pINPUT1 | - Pointer to INPUT1 output variable |

| FctERR PCA9532_ReadRegister | ( | PCA9532_t *const | pCpnt, |
| const PCA9532_reg | reg, | ||
| uint8_t *const | val ) |
Read register from PCA9532.
| [in] | pCpnt | - Pointer to PCA9532 component |
| [in] | reg | - Register address to read from |
| [in,out] | val | - Pointer to the data for receive |

| void PCA9532_RST_GPIO_Init | ( | PCA9532_t *const | pCpnt, |
| GPIO_TypeDef *const | GPIOx, | ||
| const uint16_t | GPIO_Pin, | ||
| const GPIO_PinState | GPIO_Active ) |
Reset GPIO pin init for PCA9532.
| [in] | pCpnt | - Pointer to PCA9532 component |
| [in] | GPIOx | - RST port |
| [in] | GPIO_Pin | - RST pin |
| [in] | GPIO_Active | RST pin active state |

| void PCA9532_RST_GPIO_Set | ( | PCA9532_t *const | pCpnt, |
| const bool | state ) |
Reset GPIO pin setter for PCA9532.
| [in] | pCpnt | - Pointer to PCA9532 component |
| [in] | state | - state to write on RST pin (0: inactive, 1: active) |

| FctERR PCA9532_Set_Auto_Increment | ( | PCA9532_t *const | pCpnt, |
| const PCA95xx_reg_inc | inc ) |
Set auto increment option for PCA9532 registers.
| [in,out] | pCpnt | - Pointer to PCA9532 component |
| [in] | inc | - auto increment option |

| FctERR PCA9532_Set_Mode_LED | ( | PCA9532_t *const | pCpnt, |
| const PCA9xxx_chan | chan, | ||
| const PCA95xx_ledsel | mode ) |
Set PCA9532 peripheral LED mode.
| [in,out] | pCpnt | - Pointer to PCA9532 component |
| [in] | chan | - PCA9532 channel |
| [in] | mode | - channel mode (on/off/PWM0/PWM1) |

| FctERR PCA9532_Set_Mode_LEDs | ( | PCA9532_t *const | pCpnt, |
| const uint16_t | chans, | ||
| const PCA95xx_ledsel | mode ) |
Set PCA9532 peripheral multiple LEDs mode.
| [in,out] | pCpnt | - Pointer to PCA9532 component |
| [in] | chans | - PCA9532 channels mask (masked channels will be affected to new mode, other ones remaining unchanged) |
| [in] | mode | - channel mode (on/off/PWM0/PWM1) |


| FctERR PCA9532_SetDuty | ( | PCA9532_t *const | pCpnt, |
| const float | duty, | ||
| const bool | index ) |
Set PWMx duty cycle of PCA9532.
| [in,out] | pCpnt | - Pointer to PCA9532 component |
| [in] | duty | - Duty Cycle (in %) |
| [in] | index | - false: PWM0 / true: PWM1 |

| FctERR PCA9532_SetFrequency | ( | PCA9532_t *const | pCpnt, |
| const float | freq, | ||
| const bool | index ) |
Set PSCx frequency of PCA9532.
| [in,out] | pCpnt | - Pointer to PCA9532 component |
| [in] | freq | - Frequency (in Hz) |
| [in] | index | - false: PSC0 / true: PSC1 |
