Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: mcuelenaere on May 05, 2007, 10:24:03 AM

Title: send ATA_COMMAND function
Post by: mcuelenaere on May 05, 2007, 10:24:03 AM
Hi,

I was thinking of making a S.M.A.R.T.-status-reading plugin for Rockbox and was wondering which command is used for sending ATA_COMMANDs to the HDD?

According to http://svn.rockbox.org/viewvc.cgi/trunk/firmware/drivers/ata.c?revision=13114&view=markup, this would be SET_REG(), but is this safe to use and can this function be accessed from inside a plugin?

Or should there be somekind of wrapper function in the kernel/ATA-driver for direct access to the HDD?

And what about reading the HDD's response, do you just check the content of ATA_STATUS (in ata.c; cause #define ATA_STATUS      ATA_COMMAND)?

Thx