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

📄 d12hal.c

📁 Comlete files for fullfile the slave USB function!
💻 C
字号:
/*
//*************************************************************************
//
//                  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
//
//*************************************************************************
*/

#include <reg51.h>                /* special function register declarations   */
#include "d12hal.h"
//#include "cmds.h"
#include "mainloop.h"

extern EPPFLAGS bEPPflags;

void outportb(unsigned int addr, unsigned char val)
{
	unsigned char xdata *ext_address;

	MCU_D12CS = 0;

	ext_address=0x00 + addr;
	*ext_address = val;

	MCU_D12CS = 1;
}

unsigned char inportb(unsigned int addr)
{
	unsigned char c;
	unsigned char xdata *ext_address;

	MCU_D12CS = 0;

	ext_address=0x00 + addr;
	c = *ext_address ;

	MCU_D12CS = 1;

	return c;
}


⌨️ 快捷键说明

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