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

📄 d12hal.h

📁 Comlete files for fullfile the slave USB function!
💻 H
字号:
/*
//*************************************************************************
//
//                  BASBA   P R O P R I E T A R Y
//
//           COPYRIGHT (c)   2003 BY BASBA USA.
//                     --  ALL RIGHTS RESERVED  --
//
// File Name:	EPPHAL.H
// Purpose:		hardware dependent I/O access to PDIUSB12
// Author:		Shuming Yu
// Created:		10 May 2003
// Modified:
// Revision:	1.0
//
//*************************************************************************
*/

#ifndef __EPPHAL_H__
#define __EPPHAL_H__

	// command and data address #define
	#define portbase 0

	#define D12_COMMAND (portbase + 1)
	#define D12_DATA portbase

	#define DATA_BUS  P0
	
	// D12 control pin definitions
	sbit MCU_SWM0     = P1^0;
	sbit MCU_SWM1     = P1^1;

	sbit MCU_LED0	  = P1^2;
	sbit MCU_LED1	  = P1^3;

	sbit MCU_A0	  	  = P1^4;

	sbit MCU_D12CS	  = P1^6;
	sbit MCU_D12RST   = P1^7;

	sbit D12SUSPD	  = P3^3;

	// Basic #define
	#define DISABLE		EA=0
	#define ENABLE		EA=1

	// USB utility function prototype
	void outportb(unsigned int addr, unsigned char val);
	unsigned char inportb(unsigned int addr);


#endif

⌨️ 快捷键说明

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