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

📄 testport.c

📁 这是一个基于nec78f8024的led驱动程序
💻 C
字号:
/*
*******************************************************************************
**  COPYRIGHT (C) NEC Electronics Corporation 2008
**  NEC ELECTRONICS CONFIDENTIAL AND PROPRIETARY
**  All rights reserved by NEC Electronics Corporation.
**  Use of copyright notice does not evidence publication.
**
**  Filename :	port.c
**  Abstract :	This file implements device driver for PORT module.
**
**  Device :	uPD78F8024
**
**  Compiler :	NEC/CC78K0
**
*******************************************************************************
*/
/*
*******************************************************************************
**  Include files
*******************************************************************************
*/
#include "testmacrodriver.h"
#include "testport.h"

/*
**-----------------------------------------------------------------------------
**
**  function name:
**  	PORT_Init
**
**  Parameters:
**  	void
**
**  Returns:
**  	void
**
**-----------------------------------------------------------------------------
*/ 
void PORT_Init( void )
{
	/* initialize the port mode registers */
	PM0 = PORT_PM0;
	PM1 = PORT_PM1;
	PM2 = PORT_PM2;
	ADPC = PORT_ADPC;
	PM3 = PORT_PM3;
	PM6 = PORT_PM6;
	PM12 = PORT_PM12;

	/* initialize the Pull-up resistor option registers */
	PU0 = PORT_PU0;
	PU1 = PORT_PU1;
	PU3 = PORT_PU3;
	PU12 = PORT_PU12;
	
	/* initialize the port resisters */
	P0 = PORT_P0;
	P1 = PORT_P1;
	P2 = PORT_P2;
	P3 = PORT_P3;
	P6 = PORT_P6;
	P12 = PORT_P12;
	
}

⌨️ 快捷键说明

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