📄 ma_pcb.c
字号:
// -------------------------------------------------------------------
// -----------------------LPC2106 PCB routines------------------------
// -------------------------------------------------------------------
// Written for TinyARM MB40 development board
// -------------------------------------------------------------------
// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// -------------------------------------------------------------------
/*
*****************************************************************************
**
** Project : My project
**
** Component : LPC2106 (LPC2106)
**
** Modulename : PCB
**
** Filename : ma_pcb.c
**
** Abstract : This file implements a device driver for the PCB
** module.
**
** Compiler : IAR C compiler
**
** Date : 2004-06-23 11:00:18
**
** License no. : 9503-663-863-6224 Ivan
**
** Warning : This file has been automatically generated.
** Do not edit this file if you intend to regenerate it.
**
** This device driver was created by IAR MakeApp version
** 4.02A (Philips LPC210x: 4.00C) for the Philips LPC210x series of
** microcontrollers.
**
** (c)Copyright 2004 IAR Systems.
** Your rights to this file are explained in the IAR MakeApp
** License Agreement. All other rights reserved.
**
*****************************************************************************
*/
/*
**===========================================================================
** 1 GENERAL
** 1.1 Revisions
**
** Please read the IAR MakeApp for Philips LPC210x readme file
**
**
**===========================================================================
*/
/*
**===========================================================================
** 1.2 References
**
** No Identification Name or Description
** == =================== ================================
**
** 1 02/Oct/2003 Philips LPC210x Hardware Manual
**
**===========================================================================
*/
/*
**===========================================================================
** 2. INCLUDE FILES
** 2.1 Standard include files
**===========================================================================
*/
/*
**===========================================================================
** 2.2 Application include files
**===========================================================================
*/
#include "usercode.h" /* Usercode macros (see <template.h>) */
#include "ma_tgt.h" /* Target specific header file */
#include "ma_sfr.h" /* Special function register bitfield macros */
#include "iolpc210x.h" /* Defines Special function registers */
#include "ma_pcb.h" /* PCB Module driver header file */
/*
**===========================================================================
** 3. DECLARATIONS
** 3.1 Internal constants
**===========================================================================
*/
#define MA_PINSEL0_PCB 0x00855555 /* Pin Function Select Register 0 */
#define MA_PINSEL0_PCB_MASK 0xFFFFFFFF /* Used bits */
#define MA_PINSEL1_PCB 0x00000000 /* Pin Function Select Register 1 */
#define MA_PINSEL1_PCB_MASK 0xFFFFFFFF /* Used bits */
/*
**===========================================================================
** 3.2 Internal macros
**===========================================================================
*/
/*
**===========================================================================
** 3.3 Internal type definitions
**===========================================================================
*/
/*
**===========================================================================
** 3.4 Global variables (declared as 'extern' in some header file)
**===========================================================================
*/
/*
**===========================================================================
** 3.5 Internal function prototypes (defined in Section 5)
**===========================================================================
*/
/*
**===========================================================================
** 3.6 Internal variables
**===========================================================================
*/
/*
**===========================================================================
** 4. GLOBAL FUNCTIONS (declared as 'extern' in some header file)
**===========================================================================
*/
void MA_Init_PCB( void )
/*
**---------------------------------------------------------------------------
**
** Abstract:
** Initialises the PCB module. Only sets those registers with
** values not equal to the power-on reset values.
**
** Parameters:
** None
**
** Returns:
** None
**
**---------------------------------------------------------------------------
*/
{
/*--- Handle user code on function entry ---*/
ENTER_MA_INIT_PCB;
/*--- Init PCB registers ---*/
PINSEL0 = MA_PINSEL0_PCB;
/*--- Handle user code on function exit ---*/
EXIT_MA_INIT_PCB;
} /* MA_Init_PCB */
void MA_Reset_PCB( void )
/*
**---------------------------------------------------------------------------
**
** Abstract:
** Resets the PCB module. Sets all registers.
**
** Parameters:
** None
**
** Returns:
** None
**
**---------------------------------------------------------------------------
*/
{
/*--- Handle user code on function entry ---*/
ENTER_MA_RESET_PCB;
/*--- Reset PCB registers ---*/
PINSEL0 = MA_PINSEL0_PCB;
PINSEL1 = MA_PINSEL1_PCB;
/*--- Handle user code on function exit ---*/
EXIT_MA_RESET_PCB;
} /* MA_Reset_PCB */
/*
**===========================================================================
** 5. INTERNAL FUNCTIONS (declared in Section 3.5)
**===========================================================================
*/
/*
**===========================================================================
** END OF FILE
**===========================================================================
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -