Lines Matching refs:s_ledc_fade_rec
49 static ledc_fade_t *s_ledc_fade_rec[LEDC_SPEED_MODE_MAX][LEDC_CHANNEL_MAX]; variable
130 ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; in _ledc_fade_hw_acquire()
139 ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; in _ledc_fade_hw_release()
147 ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; in _ledc_op_lock_acquire()
155 ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; in _ledc_op_lock_release()
575 if (s_ledc_fade_rec[speed_mode][channel] == NULL) { in ledc_fade_isr()
582 uint32_t duty_tar = s_ledc_fade_rec[speed_mode][channel]->target_duty; in ledc_fade_isr()
583 int scale = s_ledc_fade_rec[speed_mode][channel]->scale; in ledc_fade_isr()
585 … xSemaphoreGiveFromISR(s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem, &HPTaskAwoken); in ledc_fade_isr()
593 ledc_cb_t fade_cb = s_ledc_fade_rec[speed_mode][channel]->ledc_fade_callback; in ledc_fade_isr()
595 cb_yield |= fade_cb(¶m, s_ledc_fade_rec[speed_mode][channel]->cb_user_arg); in ledc_fade_isr()
599 int cycle = s_ledc_fade_rec[speed_mode][channel]->cycle_num; in ledc_fade_isr()
600 …int delta = s_ledc_fade_rec[speed_mode][channel]->direction == LEDC_DUTY_DIR_DECREASE ? duty_cur -… in ledc_fade_isr()
608 s_ledc_fade_rec[speed_mode][channel]->direction, in ledc_fade_isr()
618 s_ledc_fade_rec[speed_mode][channel]->direction, in ledc_fade_isr()
635 if (s_ledc_fade_rec[speed_mode][channel]) { in ledc_fade_channel_deinit()
636 if (s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux) { in ledc_fade_channel_deinit()
637 vSemaphoreDelete(s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux); in ledc_fade_channel_deinit()
638 s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux = NULL; in ledc_fade_channel_deinit()
640 if (s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem) { in ledc_fade_channel_deinit()
641 vSemaphoreDelete(s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem); in ledc_fade_channel_deinit()
642 s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem = NULL; in ledc_fade_channel_deinit()
644 free(s_ledc_fade_rec[speed_mode][channel]); in ledc_fade_channel_deinit()
645 s_ledc_fade_rec[speed_mode][channel] = NULL; in ledc_fade_channel_deinit()
656 if (s_ledc_fade_rec[speed_mode][channel] == NULL) { in ledc_fade_channel_init_check()
658 …s_ledc_fade_rec[speed_mode][channel] = (ledc_fade_t *) heap_caps_calloc(1, sizeof(ledc_fade_t), MA… in ledc_fade_channel_init_check()
659 if (!s_ledc_fade_rec[speed_mode][channel]) { in ledc_fade_channel_init_check()
664 … memset(&s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem_storage, 0, sizeof(StaticQueue_t)); in ledc_fade_channel_init_check()
665 …s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem = xSemaphoreCreateBinaryStatic(&s_ledc_fade_re… in ledc_fade_channel_init_check()
667 s_ledc_fade_rec[speed_mode][channel] = (ledc_fade_t *) calloc(1, sizeof(ledc_fade_t)); in ledc_fade_channel_init_check()
668 s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem = xSemaphoreCreateBinary(); in ledc_fade_channel_init_check()
670 s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux = xSemaphoreCreateMutex(); in ledc_fade_channel_init_check()
671 xSemaphoreGive(s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem); in ledc_fade_channel_init_check()
673 if (s_ledc_fade_rec[speed_mode][channel] in ledc_fade_channel_init_check()
674 && s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux in ledc_fade_channel_init_check()
675 && s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem) { in ledc_fade_channel_init_check()
692 s_ledc_fade_rec[speed_mode][channel]->speed_mode = speed_mode; in _ledc_set_fade_with_step()
693 s_ledc_fade_rec[speed_mode][channel]->target_duty = target_duty; in _ledc_set_fade_with_step()
694 s_ledc_fade_rec[speed_mode][channel]->cycle_num = cycle_num; in _ledc_set_fade_with_step()
695 s_ledc_fade_rec[speed_mode][channel]->scale = scale; in _ledc_set_fade_with_step()
700 s_ledc_fade_rec[speed_mode][channel]->direction = LEDC_DUTY_DIR_DECREASE; in _ledc_set_fade_with_step()
704 s_ledc_fade_rec[speed_mode][channel]->direction = LEDC_DUTY_DIR_INCREASE; in _ledc_set_fade_with_step()
761 s_ledc_fade_rec[speed_mode][channel]->mode = fade_mode; in _ledc_fade_start()
807 LEDC_CHECK(s_ledc_fade_rec != NULL, LEDC_FADE_SERVICE_ERR_STR, ESP_ERR_INVALID_STATE); in ledc_fade_start()
824 if (s_ledc_fade_rec == NULL) { in ledc_fade_func_uninstall()
846 s_ledc_fade_rec[speed_mode][channel]->ledc_fade_callback = cbs->fade_cb; in ledc_cb_register()
847 s_ledc_fade_rec[speed_mode][channel]->cb_user_arg = user_arg; in ledc_cb_register()