S3C4510B+ATA硬盘的调试笔记4

[复制链接]
333|0
 楼主| 小蘭 发表于 2018-8-31 17:56 | 显示全部楼层 |阅读模式
第四步:

重新定义IO操作函数,如下:

UINT8  ataInByte     (UINT32 port)

    {

    return (*(volatile UINT8 *)port);

    }

   

void   ataInWordString      (UINT32 port, UINT16 *pData, int count)

    {

    while(count--)

    {

       *pData++ = *((volatile UINT16 *)port);

    }

    }

      

void   ataInLongString      (UINT32 port, UINT32 *pData, int count)

    {

    while(count--)

    {

       *pData++ = *((volatile UINT32 *)port);

    }

    }




您需要登录后才可以回帖 登录 | 注册

本版积分规则

451

主题

463

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部