mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp32: add periph_ctrl to ESP-IDF interface API
This commit is contained in:
parent
de96a31e1f
commit
a1ba7b1207
30
cpu/esp32/esp-idf-api/periph_ctrl.c
Normal file
30
cpu/esp32/esp-idf-api/periph_ctrl.c
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Gunar Schorcht
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup cpu_esp32_esp_idf_api
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Interface for ESP-IDF peripherals control API
|
||||
*
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include "driver/periph_ctrl.h"
|
||||
|
||||
void esp_idf_periph_module_enable(periph_module_t periph)
|
||||
{
|
||||
periph_module_enable(periph);
|
||||
}
|
||||
|
||||
void esp_idf_periph_module_disable(periph_module_t periph)
|
||||
{
|
||||
periph_module_disable(periph);
|
||||
}
|
39
cpu/esp32/include/esp_idf_api/periph_ctrl.h
Normal file
39
cpu/esp32/include/esp_idf_api/periph_ctrl.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Gunar Schorcht
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup cpu_esp32_esp_idf_api
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Interface for ESP-IDF peripherals control API
|
||||
*
|
||||
* @author Gunar Schorcht <gunar@schorcht.net>
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifndef ESP_IDF_API_PERIPH_CTRL_H
|
||||
#define ESP_IDF_API_PERIPH_CTRL_H
|
||||
|
||||
#ifndef DOXYGEN /* Hide implementation details from doxygen */
|
||||
|
||||
#include "soc/periph_defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void esp_idf_periph_module_enable(periph_module_t periph);
|
||||
void esp_idf_periph_module_disable(periph_module_t periph);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DOXYGEN */
|
||||
#endif /* ESP_IDF_API_PERIPH_CTRL_H */
|
Loading…
Reference in New Issue
Block a user