Syntax
static hal_obj_t s_hal_obj_group[] = {
#ifdef CONFIG_ENABLE_PWM_DRIVER
{
.type = DRIVER_ESP_PWM,
.name = "PWM",
.driver_grayscale_level = 1 << 12,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 12),
.all_ch_allow_output = true,
.init = (x_init_t)pwm_init,
.set_channel = (x_set_channel_t)pwm_set_channel,
.regist_channel = (x_regist_channel_t)pwm_regist_channel,
.set_shutdown = (x_set_shutdown_t)pwm_set_shutdown,
.set_hw_fade = (x_set_hw_fade_t)pwm_set_hw_fade,
.deinit = (x_deinit_t)pwm_deinit,
.set_sleep_status = (x_set_sleep_t)pwm_set_sleep,
},
#endif
#ifdef CONFIG_ENABLE_SM2135E_DRIVER
{
.type = DRIVER_SM2135E,
.name = "SM2135E",
.driver_grayscale_level = 1 << 8,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 8) - 1,
.all_ch_allow_output = false,
.init = (x_init_t)sm2135e_init,
.set_channel = (x_set_channel_t)_sm2135e_set_channel,
.regist_channel = (x_regist_channel_t)sm2135e_regist_channel,
.set_shutdown = (x_set_shutdown_t)sm2135e_set_shutdown,
.deinit = (x_deinit_t)sm2135e_deinit,
.set_init_mode = (x_set_init_mode_t)sm2135e_set_output_mode,
},
#endif
#ifdef CONFIG_ENABLE_SM2135EH_DRIVER
{
.type = DRIVER_SM2135EH,
.name = "SM2135EH",
.driver_grayscale_level = 1 << 8,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 8) - 1,
.all_ch_allow_output = true,
.init = (x_init_t)sm2135eh_init,
.set_channel = (x_set_channel_t)_sm2135eh_set_channel,
.regist_channel = (x_regist_channel_t)sm2135eh_regist_channel,
.set_shutdown = (x_set_shutdown_t)sm2135eh_set_shutdown,
.deinit = (x_deinit_t)sm2135eh_deinit,
.set_sleep_status = (x_set_sleep_t)sm2135eh_set_standby_mode,
},
#endif
#ifdef CONFIG_ENABLE_SM2x35EGH_DRIVER
{
.type = DRIVER_SM2235EGH,
.name = "SM2235EGH",
.driver_grayscale_level = 1 << 10,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 10) - 1,
.all_ch_allow_output = true,
.init = (x_init_t)sm2x35egh_init,
.set_channel = (x_set_channel_t)sm2x35egh_set_channel,
.regist_channel = (x_regist_channel_t)sm2x35egh_regist_channel,
.set_shutdown = (x_set_shutdown_t)sm2x35egh_set_shutdown,
.deinit = (x_deinit_t)sm2x35egh_deinit,
.set_sleep_status = (x_set_sleep_t)sm2x35egh_set_standby_mode,
},
#endif
#ifdef CONFIG_ENABLE_SM2x35EGH_DRIVER
{
.type = DRIVER_SM2335EGH,
.name = "SM2335EGH",
.driver_grayscale_level = 1 << 10,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 10) - 1,
.all_ch_allow_output = true,
.init = (x_init_t)sm2x35egh_init,
.set_channel = (x_set_channel_t)sm2x35egh_set_channel,
.regist_channel = (x_regist_channel_t)sm2x35egh_regist_channel,
.set_shutdown = (x_set_shutdown_t)sm2x35egh_set_shutdown,
.deinit = (x_deinit_t)sm2x35egh_deinit,
.set_sleep_status = (x_set_sleep_t)sm2x35egh_set_standby_mode,
},
#endif
#ifdef CONFIG_ENABLE_BP5758D_DRIVER
{
.type = DRIVER_BP5758D,
.name = "BP5758D",
.driver_grayscale_level = 1 << 10,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 10) - 1,
.all_ch_allow_output = true,
.init = (x_init_t)bp5758d_init,
.set_channel = (x_set_channel_t)bp5758d_set_channel,
.regist_channel = (x_regist_channel_t)bp5758d_regist_channel,
.set_shutdown = (x_set_shutdown_t)bp5758d_set_shutdown,
.deinit = (x_deinit_t)bp5758d_deinit,
.set_sleep_status = (x_set_sleep_t)bp5758d_set_standby_mode,
},
#endif
#ifdef CONFIG_ENABLE_BP1658CJ_DRIVER
{
.type = DRIVER_BP1658CJ,
.name = "BP1658CJ",
.driver_grayscale_level = 1 << 10,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 10) - 1,
.all_ch_allow_output = true,
.init = (x_init_t)bp1658cj_init,
.set_channel = (x_set_channel_t)bp1658cj_set_channel,
.regist_channel = (x_regist_channel_t)bp1658cj_regist_channel,
.set_shutdown = (x_set_shutdown_t)bp1658cj_set_shutdown,
.deinit = (x_deinit_t)bp1658cj_deinit,
.set_sleep_status = (x_set_sleep_t)bp1658cj_set_sleep_mode,
},
#endif
#ifdef CONFIG_ENABLE_KP18058_DRIVER
{
.type = DRIVER_KP18058,
.name = "KP18058",
.driver_grayscale_level = 1 << 10,
.channel_num = 5,
.hardware_allow_max_input_value = (1 << 10) - 1,
.all_ch_allow_output = true,
.init = (x_init_t)kp18058_init,
.set_channel = (x_set_channel_t)kp18058_set_channel,
.regist_channel = (x_regist_channel_t)kp18058_regist_channel,
.set_shutdown = (x_set_shutdown_t)kp18058_set_shutdown,
.deinit = (x_deinit_t)kp18058_deinit,
.set_sleep_status = (x_set_sleep_t)kp18058_set_standby_mode,
},
#endif
#ifdef CONFIG_ENABLE_WS2812_DRIVER
{
.type = DRIVER_WS2812,
.name = "WS2812",
.driver_grayscale_level = 1 << 8,
.channel_num = 3,
.hardware_allow_max_input_value = (1 << 8) - 1,
.all_ch_allow_output = false,
.init = (x_init_t)ws2812_init,
.set_rgb_channel = (x_set_rgb_channel_t)_ws2812_set_rgb_channel,
.deinit = (x_deinit_t)ws2812_deinit,
},
#endif
{
.type = DRIVER_SELECT_MAX,
}
};