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

Functions | |
| FctERR | PCA9685_CalcVal (uint8_t val[4], const uint16_t duty, const uint16_t delay) |
| Computes values for PCA9685 registers (4bytes) following duty and delay. | |
| FctERR | PCA9685_CalcVal_NoDelay (uint8_t val[4], const uint16_t duty) |
| Computes values for PCA9685 registers (4bytes) following duty (without delay) | |
| FctERR | PCA9685_Freq_To_Byte (const PCA9685_t *const pCpnt, uint8_t *const byte, const uint16_t freq) |
| Convert Frequency to Prescaler byte register. | |
| FctERR | PCA9685_Set_Latch (PCA9685_t *const pCpnt, const PCA96xx_latch latch) |
| Set latch type for PCA9685 peripheral. | |
| FctERR | PCA9685_Set_Frequency (PCA9685_t *const pCpnt, const uint16_t freq) |
| Set frequency for PCA9685 peripheral. | |
| FctERR | PCA9685_ReadVal (PCA9685_t *const pCpnt, const PCA9xxx_chan chan, uint16_t *duty) |
| Read I2C lighting values from a LED and Computes the corresponding duty cycle value (12b) | |
| FctERR | PCA9685_ReadValByte (PCA9685_t *const pCpnt, const PCA9xxx_chan chan, uint8_t *duty) |
| Read I2C lighting values from a LED and Computes the corresponding duty cycle value (Byte) | |
| FctERR | PCA9685_PutVal (PCA9685_t *const pCpnt, const PCA9xxx_chan chan, const uint16_t duty, const uint16_t delay) |
| Compute and send PWM lighting values to apply on a PCA9685 channel or all channels (12b) | |
| FctERR | PCA9685_PutValPerc (PCA9685_t *const pCpnt, const PCA9xxx_chan chan, const float duty, const float delay) |
| Compute and send PWM lighting values to apply on a PCA9685 channel or all channels (Percent) | |
| FctERR | PCA9685_SetVal (PCA9685_t *const pCpnt, const PCA9xxx_chan chan) |
| Compute and send PWM Full ON value to apply on a PCA9685 channel or all channels (no delay) | |
| FctERR | PCA9685_ClrVal (PCA9685_t *const pCpnt, const PCA9xxx_chan chan) |
| Compute and send PWM Full OFF value to apply on a PCA9685 channel or all channels (no delay) | |
| FctERR | PCA9685_Reset (PCA9685_t *const pCpnt) |
| Reset for PCA9685 peripheral. | |
| FctERR | PCA9685_Reset_All (I2C_HandleTypeDef *const hi2c) |
| General call reset function for PCA9685. | |
| FctERR | PCA9685_ReadRegister (PCA9685_t *const pCpnt, const PCA9685_reg reg, uint8_t *const val) |
| Reads register from PCA9685. | |
| void | PCA9685_OE_GPIO_Init (PCA9685_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active) |
| Output Enable GPIO pin init for PCA9685. | |
| void | PCA9685_OE_GPIO_Set (PCA9685_t *const pCpnt, const bool state) |
| Output Enable GPIO pin setter for PCA9685. | |
PCA9685 Driver extensions.
PCA9685: 16-channel, 12-bit PWM Fm+ I2C-bus LED controller
| FctERR PCA9685_CalcVal | ( | uint8_t | val[4], |
| const uint16_t | duty, | ||
| const uint16_t | delay ) |
Computes values for PCA9685 registers (4bytes) following duty and delay.
| [in,out] | val | - Pointer to 4 bytes array output |
| [in] | duty | - Duty cycle coded on 12b (0-4095) |
| [in] | delay | - Delay coded on 12b (0-<4095) |

| FctERR PCA9685_CalcVal_NoDelay | ( | uint8_t | val[4], |
| const uint16_t | duty ) |
Computes values for PCA9685 registers (4bytes) following duty (without delay)
| [in,out] | val | - Pointer to 4 bytes array output |
| [in] | duty | - Duty cycle coded on 12b (0-4095) |
| FctERR PCA9685_ClrVal | ( | PCA9685_t *const | pCpnt, |
| const PCA9xxx_chan | chan ) |
Compute and send PWM Full OFF value to apply on a PCA9685 channel or all channels (no delay)
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | chan | - Channel number (1 to 16 / PCA9685_ALLCALL can be used to address all channels at the same time) |

| FctERR PCA9685_Freq_To_Byte | ( | const PCA9685_t *const | pCpnt, |
| uint8_t *const | byte, | ||
| const uint16_t | freq ) |
Convert Frequency to Prescaler byte register.
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in,out] | byte | - Pointer to output value |
| [in] | freq | - Outputs frequency in Hz |

| void PCA9685_OE_GPIO_Init | ( | PCA9685_t *const | pCpnt, |
| GPIO_TypeDef *const | GPIOx, | ||
| const uint16_t | GPIO_Pin, | ||
| const GPIO_PinState | GPIO_Active ) |
Output Enable GPIO pin init for PCA9685.
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | GPIOx | - OE port |
| [in] | GPIO_Pin | - OE pin |
| [in] | GPIO_Active | OE pin active state |

| void PCA9685_OE_GPIO_Set | ( | PCA9685_t *const | pCpnt, |
| const bool | state ) |
Output Enable GPIO pin setter for PCA9685.
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | state | - state to write on OE pin (0: inactive, 1: active) |

| FctERR PCA9685_PutVal | ( | PCA9685_t *const | pCpnt, |
| const PCA9xxx_chan | chan, | ||
| const uint16_t | duty, | ||
| const uint16_t | delay ) |
Compute and send PWM lighting values to apply on a PCA9685 channel or all channels (12b)
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | chan | - Channel number (1 to 16 / PCA9685_ALLCALL can be used to address all channels at the same time) |
| [in] | duty | - Duty cycle coded on 12b (0-4095) |
| [in] | delay | - Delay coded on 12b (0-<4095) |


| FctERR PCA9685_PutValPerc | ( | PCA9685_t *const | pCpnt, |
| const PCA9xxx_chan | chan, | ||
| const float | duty, | ||
| const float | delay ) |
Compute and send PWM lighting values to apply on a PCA9685 channel or all channels (Percent)
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | chan | - Channel number (1 to 16 / PCA9685_ALLCALL can be used to address all channels at the same time) |
| [in] | duty | - Duty cycle coded on float (0.0-100.0%) |
| [in] | delay | - Delay coded on float (0.0-<100.0%) |

| FctERR PCA9685_ReadRegister | ( | PCA9685_t *const | pCpnt, |
| const PCA9685_reg | reg, | ||
| uint8_t *const | val ) |
Reads register from PCA9685.
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | reg | - Register address to read from |
| [in,out] | val | - Pointer to the data for receive |

| FctERR PCA9685_ReadVal | ( | PCA9685_t *const | pCpnt, |
| const PCA9xxx_chan | chan, | ||
| uint16_t * | duty ) |
Read I2C lighting values from a LED and Computes the corresponding duty cycle value (12b)
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | chan | - Channel number (1 to 16) |
| [in,out] | duty | - Pointer to the DutyCycle data for receive coded on 12b |

| FctERR PCA9685_ReadValByte | ( | PCA9685_t *const | pCpnt, |
| const PCA9xxx_chan | chan, | ||
| uint8_t * | duty ) |
Read I2C lighting values from a LED and Computes the corresponding duty cycle value (Byte)
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | chan | - chan number (1 to 16) |
| [in,out] | duty | - Pointer to the DutyCycle data for receive coded on a Byte |

| FctERR PCA9685_Reset | ( | PCA9685_t *const | pCpnt | ) |
Reset for PCA9685 peripheral.
| [in] | pCpnt | - Pointer to PCA9685 component |
| FctERR PCA9685_Reset_All | ( | I2C_HandleTypeDef *const | hi2c | ) |
General call reset function for PCA9685.
| [in] | hi2c | - pointer to general call I2C instance |
| FctERR PCA9685_Set_Frequency | ( | PCA9685_t *const | pCpnt, |
| const uint16_t | freq ) |
Set frequency for PCA9685 peripheral.
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | freq | - Frequency to apply (in Hz) |

| FctERR PCA9685_Set_Latch | ( | PCA9685_t *const | pCpnt, |
| const PCA96xx_latch | latch ) |
Set latch type for PCA9685 peripheral.
| [in,out] | pCpnt | - Pointer to PCA9685 component |
| [in] | latch | - Latch type |

| FctERR PCA9685_SetVal | ( | PCA9685_t *const | pCpnt, |
| const PCA9xxx_chan | chan ) |
Compute and send PWM Full ON value to apply on a PCA9685 channel or all channels (no delay)
| [in] | pCpnt | - Pointer to PCA9685 component |
| [in] | chan | - Channel number (1 to 16 / PCA9685_ALLCALL can be used to address all channels at the same time) |
