Header file containing functions prototypes of CGC HAL library. More...
Go to the source code of this file.
Classes | |
struct | _cgc_init |
CGC init structure definition. More... | |
Macros | |
#define | CGC_WFI_SECU_HCLK ((uint32_t)0x00000001U) |
#define | CGC_WFI_SIM_HCLK ((uint32_t)0x00000002U) |
#define | CGC_WFI_HTB_HCLK ((uint32_t)0x00000004U) |
#define | CGC_WFI_PWM_HCLK ((uint32_t)0x00000008U) |
#define | CGC_WFI_ROM_HCLK ((uint32_t)0x00000010U) |
#define | CGC_WFI_SNSADC_HCLK ((uint32_t)0x00000020U) |
#define | CGC_WFI_GPIO_HCLK ((uint32_t)0x00000040U) |
#define | CGC_WFI_DMA_HCLK ((uint32_t)0x00000080U) |
#define | CGC_WFI_BLE_BRG_HCLK ((uint32_t)0x00000100U) |
#define | CGC_WFI_APB_SUB_HCLK ((uint32_t)0x00000200U) |
#define | CGC_WFI_SERIAL_HCLK ((uint32_t)0x00000400U) |
#define | CGC_WFI_I2S_S_HCLK ((uint32_t)0x00000800U) |
#define | CGC_WFI_AON_MCUSUB_HCLK ((uint32_t)0x00001000U) |
#define | CGC_WFI_XF_XQSPI_HCLK ((uint32_t)0x00002000U) |
#define | CGC_WFI_SRAM_HCLK ((uint32_t)0x00004000U) |
#define | CGC_WFI_SECU_DIV4_PCLK ((uint32_t)0x00008000U) |
#define | CGC_WFI_XQSPI_DIV4_PCLK ((uint32_t)0x00020000U) |
#define | CGC_WFI_ALL_CLK ((uint32_t)0x0002FFFFU) |
#define | CGC_FRC_SECU_HCLK ((uint32_t)0x00000001U) |
#define | CGC_FRC_SIM_HCLK ((uint32_t)0x00000002U) |
#define | CGC_FRC_HTB_HCLK ((uint32_t)0x00000004U) |
#define | CGC_FRC_PWM_HCLK ((uint32_t)0x00000008U) |
#define | CGC_FRC_ROM_HCLK ((uint32_t)0x00000010U) |
#define | CGC_FRC_SNSADC_HCLK ((uint32_t)0x00000020U) |
#define | CGC_FRC_GPIO_HCLK ((uint32_t)0x00000040U) |
#define | CGC_FRC_DMA_HCLK ((uint32_t)0x00000080U) |
#define | CGC_FRC_BLE_BRG_HCLK ((uint32_t)0x00000100U) |
#define | CGC_FRC_APB_SUB_HCLK ((uint32_t)0x00000200U) |
#define | CGC_FRC_SERIAL_HCLK ((uint32_t)0x00000400U) |
#define | CGC_FRC_I2S_S_HCLK ((uint32_t)0x00000800U) |
#define | CGC_FRC_AON_MCUSUB_HCLK ((uint32_t)0x00001000U) |
#define | CGC_FRC_XF_XQSPI_HCLK ((uint32_t)0x00002000U) |
#define | CGC_FRC_SRAM_HCLK ((uint32_t)0x00004000U) |
#define | CGC_FRC_UART0_HCLK ((uint32_t)0x00008000U) |
#define | CGC_FRC_UART1_HCLK ((uint32_t)0x00010000U) |
#define | CGC_FRC_I2C0_HCLK ((uint32_t)0x00020000U) |
#define | CGC_FRC_I2C1_HCLK ((uint32_t)0x00040000U) |
#define | CGC_FRC_SPIM_HCLK ((uint32_t)0x00080000U) |
#define | CGC_FRC_SPIS_HCLK ((uint32_t)0x00100000U) |
#define | CGC_FRC_QSPI0_HCLK ((uint32_t)0x00200000U) |
#define | CGC_FRC_QSPI1_HCLK ((uint32_t)0x00400000U) |
#define | CGC_FRC_I2S_HCLK ((uint32_t)0x00800000U) |
#define | CGC_FRC_SECU_DIV4_PCLK ((uint32_t)0x01000000U) |
#define | CGC_FRC_XQSPI_DIV4_PCLK ((uint32_t)0x04000000U) |
#define | CGC_FRC_ALL_CLK ((uint32_t)0x05FFFFFFU) |
#define | CGC_DEFAULT_CONFIG |
CGC_default_config init Struct default configuartion. More... | |
Typedefs | |
typedef struct _cgc_init | cgc_init_t |
CGC init structure definition. More... | |
Enumerations | |
enum | cgc_clk_state_t { CGC_CLK_ON = 0U, CGC_CLK_OFF = 1U } |
CGC Bit Open and Bit Close Enumerations. More... | |
Functions | |
void | hal_cgc_init (cgc_init_t *p_cgc_init) |
Initialize the CGC registers according to the specified parameters in the cgc_init_t. More... | |
void | hal_cgc_deinit (void) |
De-initialize the CGC registers to their default reset values. More... | |
void | hal_cgc_config_wfi_clk (uint32_t blocks, cgc_clk_state_t clk_state) |
Configure the clock state for a specified block during WFI. More... | |
cgc_clk_state_t | hal_cgc_get_wfi_clk (uint32_t block) |
Get the clock state for a specified block during WFI. More... | |
void | hal_cgc_config_force_clk (uint32_t blocks, cgc_clk_state_t clk_state) |
Forced to Configure the clock state for a specified block. More... | |
cgc_clk_state_t | hal_cgc_get_force_clk (uint32_t block) |
Get the clock status of the currently specified block. More... | |
Header file containing functions prototypes of CGC HAL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file hal_cgc.h.