CHAPTER 5 APPLICATION EXAMPLES
Application Note U17121EJ1V1AN
81
UBYTE cylinder_low;
// Cylinder Low register
UBYTE cylinder_high;
// Cylinder High register
UBYTE device_head;
// Device/Head register
UBYTE command;
// Command register
} ATA_COMMAND;
////////////////////////////////////////////
// Descriptor table for UltraDMA transfer //
////////////////////////////////////////////
typedef struct{
UWORD transfer_address;
// Transfer address
UWORD transfer_byte;
// Number of transfer bytes
UWORD next_table_address;
// Next table address
} DISCRIPTOR_TABLE;
/////////////////////////////
// Initialization function //
/////////////////////////////
/////////////////////////////////////////////////////////////////
// Function name: PCI_Config_ModeInit //
// Function: Sets initialization of PCI-IDE ASIC board. //
// Argument: None //
// Return value: None //
// Details: Sets handling of interrupts and errors, coding and //
// then resets IDE bus. //
// //
/////////////////////////////////////////////////////////////////
void PCI_Config_ModeInit(void)
{
UWORD ConfigAddress;
UWORD ConfigData;
//////////////////////////////
// Setting of PCI functions //
//////////////////////////////
ConfigAddress = 0x40000004;
// bit 31-11 : IDSEL specification = 010000000000000000000b
// Select PCI device connected to AD30
// bit 10-08 : Function number = 00b
// bit 07-02 : Register number = 1 (000001b)
// -> Status / Command
// bit 01-00 : 00b (fixed)
ConfigData = 0x02000145;
// bit 26-25 : DEVSEL timing = 01b (medium fixed)
// bit 8 : SERR Enable = 1b : Output pci_serr.
// bit 6 : Parity Error Response = 1b : Output pci_serr
Содержание V850E/MA1
Страница 2: ...Application Note U17121EJ1V1AN 2 MEMO ...