- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
apb.h
资源名称:str711USB.rar [点击查看]
上传用户:yyyd609
上传日期:2022-07-18
资源大小:183k
文件大小:3k
源码类别:
微处理器开发
开发平台:
C/C++
- /******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
- * File Name : apb.h
- * Author : MCD Application Team
- * Date First Issued : 05/30/2003
- * Description : This file contains all the functions prototypes for the
- * APB bridge software library.
- ********************************************************************************
- * History:
- * 01/01/2004 : V1.2
- * 14/07/2004 : V1.3
- *******************************************************************************/
- #ifndef __APB_H
- #define __APB_H
- #include "71x_lib.h"
- /* APB1 Peripherals */
- #define I2C0_Periph 0x0002
- #define I2C1_Periph 0x0004
- #define UART0_Periph 0x0010
- #define UART1_Periph 0x0020
- #define UART2_Periph 0x0040
- #define UART3_Periph 0x0080
- #define USB_Periph 0x0100
- #define CAN_Periph 0x0200
- #define BSPI0_Periph 0x0400
- #define BSPI1_Periph 0x0800
- #define HDLC_Periph 0x2000
- /* APB2 Peripherals */
- #define XTI_Periph 0x0002
- #define GPIO0_Periph 0x0004
- #define GPIO1_Periph 0x0008
- #define GPIO2_Periph 0x0010
- #define ADC12_Periph 0x0080
- #define TIM0_Periph 0x0200
- #define TIM1_Periph 0x0400
- #define TIM2_Periph 0x0800
- #define TIM3_Periph 0x1000
- #define RTC_Periph 0x2000
- #define WDG_Periph 0x4000
- #define EIC_Periph 0x8000
- /*******************************************************************************
- * Function Name : APB_ClockConfig
- * Description : Enables/Disables the Clock gating for peripherals on the APB
- * bridge passed in parameters.
- * Input : APBx ( APB1 or APB2 )
- * NewState ENABLE or DISABLE
- * NewValue (u16)
- * Return : None
- *******************************************************************************/
- inline void APB_ClockConfig ( APB_TypeDef *APBx,
- FunctionalState NewState,
- u16 NewValue )
- {
- if (NewState == ENABLE) APBx->CKDIS &= ~NewValue;
- else APBx->CKDIS |= NewValue;
- }
- /*******************************************************************************
- * Function Name : APB_SwResetConfig
- * Description : Enables/Disables the software Reset for peripherals on the APB
- * bridge passed in parameters.
- * Input : APBx ( APB1 or APB2 )
- * NewState ENABLE or DISABLE
- * NewValue (u16)
- * Return : None
- *******************************************************************************/
- inline void APB_SwResetConfig ( APB_TypeDef *APBx,
- FunctionalState NewState,
- u16 NewValue )
- {
- if (NewState == ENABLE) APBx->SWRES |= NewValue;
- else APBx->SWRES &= ~NewValue;
- }
- #endif // __APB_H
- /******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/