size_t HAL_ATAControllerInfo(int bus,union atainfo *info, size_t buflen)
| Entry | |
|---|---|
| bus | Bus number to query |
| info | Location to store controller information |
| buflen | Maximum number of bytes that can be written to info |
| Exit | |
|---|---|
| - | Returns the amount of data that would be returned if not limited by len. Returns 0 if the bus does not exist. |
This is an internal call for use by the ADFS module and should not be used by user software.
Looks up information about the given bus. The information is stored in a atainfo union:
union atainfo
{
struct
{
uint32_t flags;
volatile uint8_t *cmd;
volatile uint8_t *ctrl;
volatile uint8_t *bus_master_reg;
int int_device;
uint32_t available_pio_modes;
uint32_t available_dma_modes;
uint32_t available_ultradma_modes;
uint16_t dma_id; // see OS_Hardware device spec
uint32_t dma_location; // "
const char *dma_description; // "
uint32_t dma_logical_channel; // or -1 to obtain at run-time
} bus;
struct
{
uint32_t buses;
uint16_t dma_id;
uint32_t dma_location;
const char *dma_description;
} group;
}
Available flags are:
| Bit | Meaning |
|---|---|
| 0 | Interrupt is shared (Warning: not supported yet) |
| 1 | 32-bit PIO supported |
| 2 | IORDY flow control supported |
| 3 | 48-bit LBA not supported |