mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
rmt: disable rc_fast clock when it's used up
This commit is contained in:
parent
70ee85d38b
commit
c4aa24c54e
@ -74,6 +74,7 @@ rmt_group_t *rmt_acquire_group_handle(int group_id)
|
|||||||
void rmt_release_group_handle(rmt_group_t *group)
|
void rmt_release_group_handle(rmt_group_t *group)
|
||||||
{
|
{
|
||||||
int group_id = group->group_id;
|
int group_id = group->group_id;
|
||||||
|
rmt_clock_source_t clk_src = group->clk_src;
|
||||||
bool do_deinitialize = false;
|
bool do_deinitialize = false;
|
||||||
|
|
||||||
_lock_acquire(&s_platform.mutex);
|
_lock_acquire(&s_platform.mutex);
|
||||||
@ -88,6 +89,16 @@ void rmt_release_group_handle(rmt_group_t *group)
|
|||||||
}
|
}
|
||||||
_lock_release(&s_platform.mutex);
|
_lock_release(&s_platform.mutex);
|
||||||
|
|
||||||
|
switch (clk_src) {
|
||||||
|
#if SOC_RMT_SUPPORT_RC_FAST
|
||||||
|
case RMT_CLK_SRC_RC_FAST:
|
||||||
|
periph_rtc_dig_clk8m_disable();
|
||||||
|
break;
|
||||||
|
#endif // SOC_RMT_SUPPORT_RC_FAST
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (do_deinitialize) {
|
if (do_deinitialize) {
|
||||||
ESP_LOGD(TAG, "del group(%d)", group_id);
|
ESP_LOGD(TAG, "del group(%d)", group_id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user