1 /* 2 * SPDX-FileCopyrightText: 2019-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 #pragma once 14 15 #include <stdint.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 typedef struct rmt_dev_t *rmt_soc_handle_t; // RMT SOC layer handle 22 23 /** 24 * @brief HAL context type of RMT driver 25 */ 26 typedef struct { 27 rmt_soc_handle_t regs; /*!< RMT Register base address */ 28 } rmt_hal_context_t; 29 30 /** 31 * @brief Initialize the RMT HAL driver 32 * 33 * @param hal: RMT HAL context 34 */ 35 void rmt_hal_init(rmt_hal_context_t *hal); 36 37 /** 38 * @brief Deinitialize the RMT HAL driver 39 * 40 * @param hal: RMT HAL context 41 */ 42 void rmt_hal_deinit(rmt_hal_context_t *hal); 43 44 /** 45 * @brief Reset RMT TX Channel 46 * 47 * @param hal: RMT HAL context 48 * @param channel: RMT channel number 49 */ 50 void rmt_hal_tx_channel_reset(rmt_hal_context_t *hal, uint32_t channel); 51 52 /** 53 * @brief Reset RMT TX Channel 54 * 55 * @param hal: RMT HAL context 56 * @param channel: RMT channel number 57 */ 58 void rmt_hal_rx_channel_reset(rmt_hal_context_t *hal, uint32_t channel); 59 60 #ifdef __cplusplus 61 } 62 #endif 63