RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

HAL_ATASetModes

Hardware Abstraction Layer
HAL entry points from RISC OS
» HAL_ATASetModes

HAL_ATASetModes

(HAL entry #98)
void HAL_ATASetModes(int bus, struct atamode *dev0, struct atamode *dev1)
Entry
bus Bus number to modify
dev0 Settings for device 0
dev1 Settings for device 1
Exit
-

Use

This is an internal call for use by the ADFS module and should not be used by user software.

This call sets the interface timings for PIO and Multiword or Ultra DMA. The structure is updated to show the actual modes selected, if the requested modes were not available.

On entry, both DMA and Ultra DMA modes may be requested – the DMA mode indicates the fallback if Ultra DMA is not available. On exit, no more than 1 of dma_mode and udma_mode will be set to valid values.

The call specifies timings for both devices simultaneously, as it may not be possible to set independent timings, requiring the highest common mode to be set.

Either pointer on entry may be null, indicating that that device is not in use.

The atamode struct is as follows:

struct atamode
{
    uint32_t flags;
    uint8_t pio_mode;  // (eg 0-4)
    uint8_t dma_mode;  // (eg 0-2) 0xFF if none
    uint8_t udma_mode; // (eg 0-5) 0xFF if none
    uint8_t reserved;  // set to 0xFF
}

The available flags are:

Bit Meaning
0 FIFOs enabled (i.e. non-packet device that waits for interrupts)

See also

  • HAL ATA API
Information source: HAL.Tungsten.doc.ATA in CVS
Revised on February 9, 2012 13:30:34 by Jeffrey Lee (213) (195.72.173.130)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: HAL entry points from RISC OS, HAL entry points by number, HAL ATA API

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
  • Export
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys