⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 port.c

📁 基于NEC单片的机的程序源码,关于PWM输出的程序.
💻 C
字号:
/*
*******************************************************************************
**
**  This device driver was created by Applilet for the 78K0S/KB1+, 78K0S/KA1+,
**  78K0S/KY1+,78K0S/KU1+ 8-Bit Single-Chip Microcontrollers.
**
**  Copyright(C) NEC Electronics Corporation 2002-2006
**  All rights reserved by NEC Electronics Corporation.
**
**  This program should be used on your own responsibility.
**  NEC Electronics Corporation assumes no responsibility for any losses
**  incurred by customers or third parties arising from the use of this file.
**
**  Filename :	port.c
**  Abstract :	This file implements device driver for port module.
**  APIlib :	NEC78K0SKX1+.lib V1.70 [7 Dec. 2006]
**
**  Device :	uPD78F9234
**
**  Compiler :	NEC/CC78K0
**
*******************************************************************************
*/

/*
*******************************************************************************
**  Include files
*******************************************************************************
*/
#include "macrodriver.h"
#include "port.h"
/*
*******************************************************************************
**  Constants
*******************************************************************************
*/


/*
**-----------------------------------------------------------------------------
**
**  Abstract:
**	This function initializes the I/O port module.
**
**  Parameters:
**	None
**
**  Returns:
**	None
**
**-----------------------------------------------------------------------------
*/ 
void PORT_Init( void )
{
	/* Initialize the port registers */
	P0 = PORT_P0;
	P2 = PORT_P2;
	P3 = PORT_P3;
	P4 = PORT_P4;
	P12 = PORT_P12;
	P13 = PORT_P13;

	/* Initialize the pull-up resistor option registers */
	PU0 = PORT_PU0;
	PU2 = PORT_PU2;
	PU3 = PORT_PU3;
	PU4 = PORT_PU4;
	PU12 = PORT_PU12;

	/* Initialize the mode registers */
	PM0 = PORT_PM0;
	PM2 = PORT_PM2;
	PM3 = PORT_PM3;
	PM4 = PORT_PM4;
	PM12 = PORT_PM12;

	/* Initialize the  mode control register */
	PMC2 = PORT_PMC2;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -