mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
arch/xtensa/esp32s3: fix timer initialization
This commit is contained in:
committed by
Xiang Xiao
parent
14f278ab89
commit
a64171f059
@@ -37,6 +37,9 @@
|
|||||||
#include "esp32s3_irq.h"
|
#include "esp32s3_irq.h"
|
||||||
#include "esp32s3_gpio.h"
|
#include "esp32s3_gpio.h"
|
||||||
|
|
||||||
|
#include "soc/periph_defs.h"
|
||||||
|
#include "esp_private/periph_ctrl.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -969,6 +972,15 @@ struct esp32s3_tim_dev_s *esp32s3_tim_init(int timer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tim->gid == ESP32S3_TIM_GROUP0)
|
||||||
|
{
|
||||||
|
periph_module_enable(PERIPH_TIMG0_MODULE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
periph_module_enable(PERIPH_TIMG1_MODULE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Verify if it is in use */
|
/* Verify if it is in use */
|
||||||
|
|
||||||
if (!tim->inuse)
|
if (!tim->inuse)
|
||||||
|
|||||||
Reference in New Issue
Block a user