Changeset 2791fbb7 in mainline for uspace/lib/ata


Ignore:
Timestamp:
2024-05-16T16:17:49Z (17 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
59c0f478
Parents:
64cf7a3
Message:

Move generic ATA code out to libata

Location:
uspace/lib/ata
Files:
3 added
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/ata/include/ata/ata_hw.h

    r64cf7a3 r2791fbb7  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup ata_bd
     29/** @addtogroup libata
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef __ATA_HW_H__
    36 #define __ATA_HW_H__
    37 
     35#ifndef LIBATA_ATA_HW_H
     36#define LIBATA_ATA_HW_H
     37
     38#include <stddef.h>
    3839#include <stdint.h>
    3940
     
    4849
    4950enum {
    50         MAX_DISKS       = 2
     51        MAX_DEVICES     = 2
    5152};
    5253
     
    9697        };
    9798} ata_ctl_t;
     99
     100#define REG_SECTOR_COUNT offsetof(ata_cmd_t, sector_count)
     101#define REG_SECTOR_NUMBER offsetof(ata_cmd_t, sector_number)
     102#define REG_CYLINDER_LOW offsetof(ata_cmd_t, cylinder_low)
     103#define REG_CYLINDER_HIGH offsetof(ata_cmd_t, cylinder_high)
     104#define REG_DRIVE_HEAD offsetof(ata_cmd_t, drive_head)
     105#define REG_STATUS offsetof(ata_cmd_t, status)
     106#define REG_COMMAND offsetof(ata_cmd_t, command)
    98107
    99108enum devctl_bits {
Note: See TracChangeset for help on using the changeset viewer.