📄 ide_boardsetup.h
字号:
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// FAT32 File IO Library for AVR
// V0.1c
// Rob Riglar
// Copyright 2003,2004
//
// Email: rob@robriglar.com
//
// Compiled with Imagecraft C Compiler for the AVR series
//-----------------------------------------------------------------------------
//
// This file is part of FAT32 File IO Library.
//
// FAT32 File IO Library is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// FAT32 File IO Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with FAT32 File IO Library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
#define SectorDump 0
#define filelistdebug 0
//-----------------------------------------------------------------------------
// IDE Definitions based on IDE Board EDTP PCB V1.0
//-----------------------------------------------------------------------------
// SRAM pins
#define SET_RAM_ALE PORTD|=0b10000000
#define SET_RAM_CS PORTG|=0b00000010
// Port A
#define DATALOW_INPORT PINA
#define DATALOW_OUTPORT PORTA
#define DATALOW_DIR DDRA
// Port C
#define DATAHIGH_DIR DDRC
#define DATAHIGH_INPORT PINC
#define DATAHIGH_OUTPORT PORTC
// Control Signals
#define CLR_IDE_RD PORTF&=0b11011111
#define SET_IDE_RD PORTF|=0b00100000
#define CLR_IDE_RST PORTF&=0b01111111
#define SET_IDE_RST PORTF|=0b10000000
#define SET_IDE_WR PORTF|=0b01000000
#define CLR_IDE_WR PORTF&=0b10111111
#define SetAddressOutput DDRF|= 0b11111111
// Address Signals
#define ADDRESS_PORT PORTF
// Port Directions
#define ALLINPUT 0x00;
#define ALLOUTPUT 0xFF;
#define PULLUPSON 0xFF;
//-----------------------------------------------------------------------------
// Board Specific Address Signals (must be on same port)
//-----------------------------------------------------------------------------
#define IDESIG_RST 0x80
#define IDESIG_WR 0x40
#define IDESIG_RD 0x20
#define IDESIG_A0 0x10
#define IDESIG_A1 0x08
#define IDESIG_A2 0x04
#define IDESIG_CS0 0x02
#define IDESIG_CS1 0x01
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -