55 uint16_t on_count, off_count;
275 for (i = 1; i < times + 1; i++)
279 (uint16_t *)&on_count, (uint16_t *)&off_count);
306 for (i = 1; i < times + 1; i++)
310 (uint16_t *)&on_count, (uint16_t *)&off_count);
driver pca9685 write test header file
uint8_t pca9685_pwm_convert_to_register(pca9685_handle_t *handle, float delay_percent, float high_duty_cycle_percent, uint16_t *on_count, uint16_t *off_count)
convert the pwm to the register raw data
uint8_t pca9685_set_prescaler(pca9685_handle_t *handle, uint8_t prescaler)
set the clock pres cale
uint8_t pca9685_write_channel(pca9685_handle_t *handle, pca9685_channel_t channel, uint16_t on_count, uint16_t off_count)
write led channels
uint8_t pca9685_write_all_channel(pca9685_handle_t *handle, uint16_t on_count, uint16_t off_count)
write all led channels
pca9685_address_t
pca9685 address enumeration definition
uint8_t pca9685_set_respond_all_call(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable respond all call
uint8_t pca9685_init(pca9685_handle_t *handle)
initialize the chip
uint8_t pca9685_set_active(pca9685_handle_t *handle, pca9685_bool_t enable)
set the chip active
uint8_t pca9685_set_addr_pin(pca9685_handle_t *handle, pca9685_address_t addr_pin)
set the address pin
uint8_t pca9685_set_output_driver(pca9685_handle_t *handle, pca9685_output_driver_t driver)
set the output driver type
uint8_t pca9685_set_respond_subaddress_2(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable respond sub address 2
uint8_t pca9685_set_output_disable_type(pca9685_handle_t *handle, pca9685_output_disable_type_t type)
set the output disable type
uint8_t pca9685_output_frequency_convert_to_register(pca9685_handle_t *handle, uint32_t oscillator, uint16_t output_freq, uint8_t *reg)
convert the output frequency to the register raw data
uint8_t pca9685_set_register_auto_increment(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable the register auto increment
uint8_t pca9685_set_respond_subaddress_3(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable respond sub address 3
uint8_t pca9685_info(pca9685_info_t *info)
get chip's information
uint8_t pca9685_set_output_invert(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable output invert
pca9685_channel_t
pca9685 channel enumeration definition
#define PCA9685_OSCILLATOR_INTERNAL_FREQUENCY
pca9685 internal oscillator frequency
uint8_t pca9685_set_sleep_mode(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable the sleep mode
uint8_t pca9685_set_external_clock_pin(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable the external clock pin
uint8_t pca9685_deinit(pca9685_handle_t *handle)
close the chip
uint8_t pca9685_set_respond_subaddress_1(pca9685_handle_t *handle, pca9685_bool_t enable)
enable or disable respond sub address 1
uint8_t pca9685_set_output_change(pca9685_handle_t *handle, pca9685_output_change_t change)
set the output change type
@ PCA9685_OUTPUT_DISABLE_TYPE_HIGH_IMPEDANCE
@ PCA9685_OUTPUT_DRIVER_TOTEM_POLE
@ PCA9685_OUTPUT_CHANGE_STOP
void pca9685_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t pca9685_interface_oe_deinit(void)
interface oe deinit
uint8_t pca9685_interface_oe_init(void)
interface oe init
uint8_t pca9685_interface_iic_deinit(void)
interface iic bus deinit
uint8_t pca9685_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t pca9685_interface_iic_init(void)
interface iic bus init
void pca9685_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t pca9685_interface_oe_write(uint8_t value)
interface oe write
uint8_t pca9685_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
#define DRIVER_PCA9685_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_PCA9685_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_PCA9685_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_PCA9685_LINK_OE_GPIO_INIT(HANDLE, FUC)
link oe_gpio_init function
#define DRIVER_PCA9685_LINK_INIT(HANDLE, STRUCTURE)
initialize pca9685_handle_t structure
#define DRIVER_PCA9685_LINK_OE_GPIO_DEINIT(HANDLE, FUC)
link oe_gpio_deinit function
#define DRIVER_PCA9685_LINK_OE_GPIO_WRITE(HANDLE, FUC)
link oe_gpio_write function
#define DRIVER_PCA9685_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_PCA9685_LINK_IIC_WEITE(HANDLE, FUC)
link iic_write function
#define DRIVER_PCA9685_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
uint8_t pca9685_servo_write_test(pca9685_address_t addr, pca9685_channel_t channel, uint32_t times)
servo write test
pca9685 handle structure definition
pca9685 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v