1 /* 2 * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /******************************************************************************* 8 * NOTICE 9 * The hal is not public api, don't use in application code. 10 * See readme.md in hal/include/hal/readme.md 11 ******************************************************************************/ 12 13 // The HAL layer for sigma delta modulator. 14 // There is no parameter check in the hal layer, so the caller must ensure the correctness of the parameters. 15 16 #pragma once 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 typedef struct gpio_sd_dev_t *sdm_soc_handle_t; // Sigma-Delta SOC layer handle 23 24 /** 25 * HAL context type of Sigma-Delta driver 26 */ 27 typedef struct { 28 sdm_soc_handle_t dev; 29 } sdm_hal_context_t; 30 31 /** 32 * @brief Initialize Sigma-Delta hal driver 33 * 34 * @param hal Context of the HAL layer 35 * @param group_id Sigma-Delta group number 36 */ 37 void sdm_hal_init(sdm_hal_context_t *hal, int group_id); 38 39 #ifdef __cplusplus 40 } 41 #endif 42