forked from gary/BCU
2
0
Fork 0
BCU/library/ucos/bsp_clk.h

129 lines
5.1 KiB
C
Raw Normal View History

2024-11-26 15:52:49 +08:00
/*
*********************************************************************************************************
* EXAMPLE CODE
*
* This file is provided as an example on how to use Micrium products.
*
* Please feel free to use any application code labeled as 'EXAMPLE CODE' in
* your application products. Example code may be used as is, in whole or in
* part, or may be used as a reference only. This file can be modified as
* required to meet the end-product requirements.
*
* Please help us continue to provide the Embedded community with the finest
* software available. Your honesty is greatly appreciated.
*
* You can find our product's user manual, API reference, release notes and
* more information at https://doc.micrium.com.
* You can contact us at www.micrium.com.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* MICRIUM BOARD SUPPORT PACKAGE
* STM32H743ZI NUCLEO
*
* Filename : bsp_clk.h
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* MODULE
*
* Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the
* BSP present pre-processor macro definition.
*********************************************************************************************************
*/
#ifndef BSP_CLK_PRESENT
#define BSP_CLK_PRESENT
/*
*********************************************************************************************************
* INCLUDE FILES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* EXTERNAL C LANGUAGE LINKAGE
*
* Note(s) : (1) C++ compilers MUST 'extern'ally declare ALL C function prototypes & variable/object
* declarations for correct C language linkage.
*********************************************************************************************************
*/
#ifdef __cplusplus
extern "C" { /* See Note #1. */
#endif
/*
*********************************************************************************************************
* DEFINES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* DATA TYPES
*********************************************************************************************************
*/
/* Clock IDs. */
typedef enum bsp_clk_id {
CLK_ID_SYSCLK,
CLK_ID_HCLK,
CLK_ID_PCLK1,
CLK_ID_PCLK2
} BSP_CLK_ID;
/*
*********************************************************************************************************
* GLOBAL VARIABLES
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*/
void BSP_ClkInit (void);
void BSP_ClkEnable (BSP_CLK_ID clk_id);
void BSP_ClkDisable(BSP_CLK_ID clk_id);
CPU_INT32U BSP_ClkFreqGet(BSP_CLK_ID clk_id);
CPU_BOOLEAN BSP_ClkFreqSet(BSP_CLK_ID clk_id,
CPU_INT32U freq);
/*
*********************************************************************************************************
* EXTERNAL C LANGUAGE LINKAGE END
*********************************************************************************************************
*/
#ifdef __cplusplus
} /* End of 'extern'al C lang linkage. */
#endif
/*
*********************************************************************************************************
* MODULE END
*********************************************************************************************************
*/
#endif /* End of module include. */