\hypertarget{di_8h}{
\section{libbroadway/include/broadway/di.h File Reference}
\label{di_8h}\index{libbroadway/include/broadway/di.h@{libbroadway/include/broadway/di.h}}
}
{\ttfamily \#include $<$types.h$>$}\par
{\ttfamily \#include $<$broadway.h$>$}\par
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220}{di\_\-cmd\_\-t} \{ \par
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a57b125c6d3c5029a3c8271df82f18db7}{DI\_\-CMD\_\-INQUIRY} =  0x12, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a9863855df7b5afcd6d10acbadd2f8588}{DI\_\-CMD\_\-DMAREAD} =  0xA8, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ab647eec4b8f714c31a588436ffa5af1a}{DI\_\-CMD\_\-SEEK} =  0xAB, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ab36f070e4ad45a9a79e45101217ce183}{DI\_\-CMD\_\-GETERROR} =  0xE0, 
\par
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ac0670506c24fa6c2c1bf2e4e38c6ab1e}{DI\_\-CMD\_\-PLAYAUDIO} =  0xE1, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a3fc0417b6178848db31e3b06cd2a0dbd}{DI\_\-CMD\_\-AUDIOSTATUS} =  0xE2, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220af1f61ba7b666cb970bd6d33372082ef0}{DI\_\-CMD\_\-STOPMOTOR} =  0xE3, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ad1f77728fb7a47d748c1c94e25564cb7}{DI\_\-CMD\_\-DVDAUDIO} =  0xE4, 
\par
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a92b9ebcfd3c41b5273d1fe14280481a2}{DI\_\-CMD\_\-DEBUG} =  0xFE, 
\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220afff5ed5447362ee2b04e1d6e3216c255}{DI\_\-CMD\_\-UNLOCK} =  0xFF
 \}
\item 
enum \hyperlink{di_8h_a42fa77c4db8277c8037b506e7b74703a}{di\_\-dmaread\_\-cmd\_\-t} \{ \hyperlink{di_8h_a42fa77c4db8277c8037b506e7b74703aa9d9aa5b880591cedff279915335c53bb}{DI\_\-DMAREAD\_\-SECTOR} =  0x00, 
\hyperlink{di_8h_a42fa77c4db8277c8037b506e7b74703aa110065f02edca0c89bddc2a0a589b259}{DI\_\-DMAREAD\_\-DISCID} =  0x40
 \}
\item 
enum \hyperlink{di_8h_acef881ede0b92f847bfd747f95a8b41c}{di\_\-debug\_\-cmd\_\-t} \{ \hyperlink{di_8h_acef881ede0b92f847bfd747f95a8b41cacdb0f284ea454629ad2d98a6b2f41f0d}{DI\_\-DEBUG\_\-MEMORY} =  0x01, 
\hyperlink{di_8h_acef881ede0b92f847bfd747f95a8b41cad93e0ef2cd4877dfe644da9cce60cec6}{DI\_\-DEBUG\_\-DRVCONTROL} =  0x11, 
\hyperlink{di_8h_acef881ede0b92f847bfd747f95a8b41ca8daa5989542dd193e1cea52467fff9d6}{DI\_\-DEBUG\_\-JUMP} =  0x12
 \}
\item 
enum \hyperlink{di_8h_a08714da0a39d97dda8ed3779a6837bef}{di\_\-drvctrl\_\-cmd2\_\-t} \{ \hyperlink{di_8h_a08714da0a39d97dda8ed3779a6837befac94bb165c9b1af9092d0fb027240b812}{DI\_\-MOTOR\_\-DOWN} =  0x0000, 
\hyperlink{di_8h_a08714da0a39d97dda8ed3779a6837befa6b9d0e699534f0dca4d61402b1da0372}{DI\_\-MOTOR\_\-UP} =  0x0100, 
\hyperlink{di_8h_a08714da0a39d97dda8ed3779a6837befa518f78874f61ab8df66a84b6be38bba0}{DI\_\-DRIVE\_\-ACCEPT} =  0x0400, 
\hyperlink{di_8h_a08714da0a39d97dda8ed3779a6837befa1e7123e51ddb78121e755178d2a56c20}{DI\_\-DRIVE\_\-CHECKDISK} =  0x0800
 \}
\item 
enum \hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8}{di\_\-error1\_\-t} \{ \par
\hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8af6583429e198675988f11b0473376cd9}{DI\_\-ERROR1\_\-OK} =  0x00, 
\hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8a88f76cf92bc9503b6d8666f99a040d3c}{DI\_\-ERROR1\_\-LIDOPEN} =  0x01, 
\hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8ac9cf364eeb21c02b91367487d66fc806}{DI\_\-ERROR1\_\-DISKCHANGED} =  0x02, 
\hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8ae591e34fd3645d3e3a6849a8d3c71001}{DI\_\-ERROR1\_\-NODISC} =  0x03, 
\par
\hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8aa49e6a4064365772b06f372fe17e1bf4}{DI\_\-ERROR1\_\-MOTOROFF} =  0x04, 
\hyperlink{di_8h_a96be7b670c2e2cabdf4532f670a948b8a7f7d8056c2708918d5d97361e29b9f81}{DI\_\-ERROR1\_\-BADDISC} =  0x05
 \}
\item 
enum \hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515fa}{di\_\-error2\_\-t} \{ \par
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faaf6881be4fa43fb76618bf501bbd85f13}{DI\_\-ERROR2\_\-OK} =  0x000000, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa735fa781eb56cd54f55920f3a3cc950e}{DI\_\-ERROR2\_\-MOTORSTOP} =  0x020400, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa84e7df62928a1f4d350d152a54faad4a}{DI\_\-ERROR2\_\-DISCID} =  0x020401, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faae03760cd37ce660946b3190c2e94722c}{DI\_\-ERROR2\_\-COVEROPEN} =  0x023A00, 
\par
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa2f586298df175a3289a6c5be2b06886f}{DI\_\-ERROR2\_\-NOSEEK} =  0x030200, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faabba15ed93de7b7e71d2391ba9bb57d95}{DI\_\-ERROR2\_\-READERROR} =  0x031100, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa603a2d069b5f820a223c59a81c1121bb}{DI\_\-ERROR2\_\-TRANSFER} =  0x040800, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa372a92635f8332f7e0ae429bf413d3c1}{DI\_\-ERROR2\_\-COMMAND} =  0x052000, 
\par
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa89a444c0fb5a6287e5f5af7f2c1d864e}{DI\_\-ERROR2\_\-AUDIOBUF} =  0x052001, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa70031ebf2d5640eed8eb1b6a4d73bb33}{DI\_\-ERROR2\_\-LBARANGE} =  0x052100, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa2a25281268fa8e71addbd1a31bf0627c}{DI\_\-ERROR2\_\-INVALIDFIELD} =  0x052400, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faaca12a1d067118e4c8a9fcab7b945f4f6}{DI\_\-ERROR2\_\-AUDIOCMD} =  0x052401, 
\par
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faac0f0738b5f51cb0364a76ffc874bdf9e}{DI\_\-ERROR2\_\-CONFIG} =  0x052402, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faab3afe5bb461bed6161a58258ae54eb87}{DI\_\-ERROR2\_\-ENDOFUSER} =  0x056300, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faaf766589444741f8a6bf2ad919879787e}{DI\_\-ERROR2\_\-MEDIUMCHANGE} =  0x062800, 
\hyperlink{di_8h_ad84d2340f5921fbea901f31a0b8515faa55b48fad6dffb5ade70183913d88b9dc}{DI\_\-ERROR2\_\-OPREMOVAL} =  0x0B5A01
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{di_8h_a09e5792ab1c931d204d0597aa76847e2}{di\_\-initialize} (void)
\begin{DoxyCompactList}\small\item\em Initialize the DI subsystem. \item\end{DoxyCompactList}\item 
int \hyperlink{di_8h_ab8f29845911a3cd98e438d1cfadebfae}{di\_\-shutdown} (void)
\begin{DoxyCompactList}\small\item\em Shut down the DI subsystem. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_a6151149f7396221205962aa1c5a87b9a}{di\_\-reset} (BOOL hard)
\begin{DoxyCompactList}\small\item\em Resets the drive. \item\end{DoxyCompactList}\item 
BOOL \hyperlink{di_8h_ac98ce34cee69ce27c9ae15971a6d22b9}{di\_\-cover\_\-open} (void)
\begin{DoxyCompactList}\small\item\em Detects if the drive cover is open. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_a07fa50a82c048ab6bed95eca8967694b}{di\_\-set\_\-command} (\hyperlink{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220}{di\_\-cmd\_\-t} cmd, u8 subcmd1, u16 subcmd2, u32 off, u32 len)
\begin{DoxyCompactList}\small\item\em Set the command to be sent for a transfer. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_ac1b3c49a51e15ed4c39e26d1b1e74893}{di\_\-set\_\-dma} (u32 addr, u32 len)
\begin{DoxyCompactList}\small\item\em Set DMA address and length. \item\end{DoxyCompactList}\item 
u32 \hyperlink{di_8h_ac05bcd07ec22770cd995d97238d69b21}{di\_\-immediate\_\-recv} (void)
\begin{DoxyCompactList}\small\item\em Read the immediate data buffer. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_a00609574f7a134957d30d1eca3d7e1b6}{di\_\-immediate\_\-send} (u32 data)
\begin{DoxyCompactList}\small\item\em Write the immediate data buffer. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_a72e5a5c33130979ad8109c2255c7f361}{di\_\-transfer} (BOOL write, BOOL dma)
\begin{DoxyCompactList}\small\item\em Starts a transfer from the DI. \item\end{DoxyCompactList}\item 
BOOL \hyperlink{di_8h_a38c4af32db279cef68b0b6f7686e5dc1}{di\_\-transfer\_\-ended} (void)
\begin{DoxyCompactList}\small\item\em Check if the DI transfer is complete. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_aca60f9d02f40b9f3d17ef313d25ea2c0}{irq\_\-di\_\-enable} (u32 irq)
\begin{DoxyCompactList}\small\item\em Enables a specific DI IRQ. \item\end{DoxyCompactList}\item 
void \hyperlink{di_8h_aaffae0a7637b924eb4c4f1ec98aeb32e}{irq\_\-di\_\-disable} (u32 irq)
\begin{DoxyCompactList}\small\item\em Disables a specific DI IRQ. \item\end{DoxyCompactList}\item 
int \hyperlink{di_8h_ab086a3a4873c8f405c908f07f35ce31e}{irq\_\-di\_\-register\_\-handler} (u32 irqn, int($\ast$exec)(u32 irq, void $\ast$data), void $\ast$data)
\begin{DoxyCompactList}\small\item\em Register a DI IRQ handler. \item\end{DoxyCompactList}\item 
\hyperlink{structirq__handler__t}{irq\_\-handler\_\-t} \hyperlink{di_8h_abd2bbb61f23f4acfa091bd3559a425ff}{irq\_\-di\_\-get\_\-handler} (u32 irqn)
\begin{DoxyCompactList}\small\item\em Gets a DI IRQ handler. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
An abstraction of the Drive Interface (DI). Low level access is abstracted; a higher level abstraction should be available soon. 

\subsection{Enumeration Type Documentation}
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220}{
\index{di.h@{di.h}!di\_\-cmd\_\-t@{di\_\-cmd\_\-t}}
\index{di\_\-cmd\_\-t@{di\_\-cmd\_\-t}!di.h@{di.h}}
\subsubsection[{di\_\-cmd\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf di\_\-cmd\_\-t}}}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220}
The known command numbers for di\_\-send\_\-command() \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{DI\_\-CMD\_\-INQUIRY@{DI\_\-CMD\_\-INQUIRY}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-INQUIRY@{DI\_\-CMD\_\-INQUIRY}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a57b125c6d3c5029a3c8271df82f18db7}{
DI\_\-CMD\_\-INQUIRY}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a57b125c6d3c5029a3c8271df82f18db7}
}]DMA, read, gets drive info \index{DI\_\-CMD\_\-DMAREAD@{DI\_\-CMD\_\-DMAREAD}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-DMAREAD@{DI\_\-CMD\_\-DMAREAD}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a9863855df7b5afcd6d10acbadd2f8588}{
DI\_\-CMD\_\-DMAREAD}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a9863855df7b5afcd6d10acbadd2f8588}
}]DMA, read, subcmd2 is di\_\-dmaread\_\-cmd\_\-t \index{DI\_\-CMD\_\-SEEK@{DI\_\-CMD\_\-SEEK}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-SEEK@{DI\_\-CMD\_\-SEEK}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ab647eec4b8f714c31a588436ffa5af1a}{
DI\_\-CMD\_\-SEEK}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ab647eec4b8f714c31a588436ffa5af1a}
}]Imm, read, seeks the drive \index{DI\_\-CMD\_\-GETERROR@{DI\_\-CMD\_\-GETERROR}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-GETERROR@{DI\_\-CMD\_\-GETERROR}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ab36f070e4ad45a9a79e45101217ce183}{
DI\_\-CMD\_\-GETERROR}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ab36f070e4ad45a9a79e45101217ce183}
}]Imm, read, request error status \index{DI\_\-CMD\_\-PLAYAUDIO@{DI\_\-CMD\_\-PLAYAUDIO}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-PLAYAUDIO@{DI\_\-CMD\_\-PLAYAUDIO}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ac0670506c24fa6c2c1bf2e4e38c6ab1e}{
DI\_\-CMD\_\-PLAYAUDIO}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ac0670506c24fa6c2c1bf2e4e38c6ab1e}
}]Imm, read, play audio stream (?) \index{DI\_\-CMD\_\-AUDIOSTATUS@{DI\_\-CMD\_\-AUDIOSTATUS}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-AUDIOSTATUS@{DI\_\-CMD\_\-AUDIOSTATUS}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a3fc0417b6178848db31e3b06cd2a0dbd}{
DI\_\-CMD\_\-AUDIOSTATUS}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a3fc0417b6178848db31e3b06cd2a0dbd}
}]Imm, read, request audio status \index{DI\_\-CMD\_\-STOPMOTOR@{DI\_\-CMD\_\-STOPMOTOR}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-STOPMOTOR@{DI\_\-CMD\_\-STOPMOTOR}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220af1f61ba7b666cb970bd6d33372082ef0}{
DI\_\-CMD\_\-STOPMOTOR}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220af1f61ba7b666cb970bd6d33372082ef0}
}]Imm, read, stop drive motor \index{DI\_\-CMD\_\-DVDAUDIO@{DI\_\-CMD\_\-DVDAUDIO}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-DVDAUDIO@{DI\_\-CMD\_\-DVDAUDIO}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ad1f77728fb7a47d748c1c94e25564cb7}{
DI\_\-CMD\_\-DVDAUDIO}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220ad1f77728fb7a47d748c1c94e25564cb7}
}]Imm, read, subcmd1 is on/off \index{DI\_\-CMD\_\-DEBUG@{DI\_\-CMD\_\-DEBUG}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-DEBUG@{DI\_\-CMD\_\-DEBUG}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a92b9ebcfd3c41b5273d1fe14280481a2}{
DI\_\-CMD\_\-DEBUG}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220a92b9ebcfd3c41b5273d1fe14280481a2}
}]Imm, subcmd1 is di\_\-debug\_\-cmd\_\-t \index{DI\_\-CMD\_\-UNLOCK@{DI\_\-CMD\_\-UNLOCK}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-CMD\_\-UNLOCK@{DI\_\-CMD\_\-UNLOCK}}\item[{\em 
\hypertarget{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220afff5ed5447362ee2b04e1d6e3216c255}{
DI\_\-CMD\_\-UNLOCK}
\label{di_8h_a2cc7b255d1e5f0c8a0fd0bc741e17220afff5ed5447362ee2b04e1d6e3216c255}
}]Imm, read, unlock the drive \end{description}
\end{Desc}

\hypertarget{di_8h_acef881ede0b92f847bfd747f95a8b41c}{
\index{di.h@{di.h}!di\_\-debug\_\-cmd\_\-t@{di\_\-debug\_\-cmd\_\-t}}
\index{di\_\-debug\_\-cmd\_\-t@{di\_\-debug\_\-cmd\_\-t}!di.h@{di.h}}
\subsubsection[{di\_\-debug\_\-cmd\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf di\_\-debug\_\-cmd\_\-t}}}
\label{di_8h_acef881ede0b92f847bfd747f95a8b41c}
The known DI\_\-CMD\_\-DEBUG subcommands \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{DI\_\-DEBUG\_\-MEMORY@{DI\_\-DEBUG\_\-MEMORY}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DEBUG\_\-MEMORY@{DI\_\-DEBUG\_\-MEMORY}}\item[{\em 
\hypertarget{di_8h_acef881ede0b92f847bfd747f95a8b41cacdb0f284ea454629ad2d98a6b2f41f0d}{
DI\_\-DEBUG\_\-MEMORY}
\label{di_8h_acef881ede0b92f847bfd747f95a8b41cacdb0f284ea454629ad2d98a6b2f41f0d}
}]Imm, read/write memory/cache \index{DI\_\-DEBUG\_\-DRVCONTROL@{DI\_\-DEBUG\_\-DRVCONTROL}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DEBUG\_\-DRVCONTROL@{DI\_\-DEBUG\_\-DRVCONTROL}}\item[{\em 
\hypertarget{di_8h_acef881ede0b92f847bfd747f95a8b41cad93e0ef2cd4877dfe644da9cce60cec6}{
DI\_\-DEBUG\_\-DRVCONTROL}
\label{di_8h_acef881ede0b92f847bfd747f95a8b41cad93e0ef2cd4877dfe644da9cce60cec6}
}]Imm, read, various drive controls \index{DI\_\-DEBUG\_\-JUMP@{DI\_\-DEBUG\_\-JUMP}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DEBUG\_\-JUMP@{DI\_\-DEBUG\_\-JUMP}}\item[{\em 
\hypertarget{di_8h_acef881ede0b92f847bfd747f95a8b41ca8daa5989542dd193e1cea52467fff9d6}{
DI\_\-DEBUG\_\-JUMP}
\label{di_8h_acef881ede0b92f847bfd747f95a8b41ca8daa5989542dd193e1cea52467fff9d6}
}]Imm, read, JSR to off \end{description}
\end{Desc}

\hypertarget{di_8h_a42fa77c4db8277c8037b506e7b74703a}{
\index{di.h@{di.h}!di\_\-dmaread\_\-cmd\_\-t@{di\_\-dmaread\_\-cmd\_\-t}}
\index{di\_\-dmaread\_\-cmd\_\-t@{di\_\-dmaread\_\-cmd\_\-t}!di.h@{di.h}}
\subsubsection[{di\_\-dmaread\_\-cmd\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf di\_\-dmaread\_\-cmd\_\-t}}}
\label{di_8h_a42fa77c4db8277c8037b506e7b74703a}
The known DI\_\-CMD\_\-DMAREAD subcommands \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{DI\_\-DMAREAD\_\-SECTOR@{DI\_\-DMAREAD\_\-SECTOR}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DMAREAD\_\-SECTOR@{DI\_\-DMAREAD\_\-SECTOR}}\item[{\em 
\hypertarget{di_8h_a42fa77c4db8277c8037b506e7b74703aa9d9aa5b880591cedff279915335c53bb}{
DI\_\-DMAREAD\_\-SECTOR}
\label{di_8h_a42fa77c4db8277c8037b506e7b74703aa9d9aa5b880591cedff279915335c53bb}
}]DMA, read, reads a sector \index{DI\_\-DMAREAD\_\-DISCID@{DI\_\-DMAREAD\_\-DISCID}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DMAREAD\_\-DISCID@{DI\_\-DMAREAD\_\-DISCID}}\item[{\em 
\hypertarget{di_8h_a42fa77c4db8277c8037b506e7b74703aa110065f02edca0c89bddc2a0a589b259}{
DI\_\-DMAREAD\_\-DISCID}
\label{di_8h_a42fa77c4db8277c8037b506e7b74703aa110065f02edca0c89bddc2a0a589b259}
}]DMA, read, reads Disc ID/Init Disc \end{description}
\end{Desc}

\hypertarget{di_8h_a08714da0a39d97dda8ed3779a6837bef}{
\index{di.h@{di.h}!di\_\-drvctrl\_\-cmd2\_\-t@{di\_\-drvctrl\_\-cmd2\_\-t}}
\index{di\_\-drvctrl\_\-cmd2\_\-t@{di\_\-drvctrl\_\-cmd2\_\-t}!di.h@{di.h}}
\subsubsection[{di\_\-drvctrl\_\-cmd2\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf di\_\-drvctrl\_\-cmd2\_\-t}}}
\label{di_8h_a08714da0a39d97dda8ed3779a6837bef}
DI\_\-DEBUG\_\-DRVCONTROL subcommands \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{DI\_\-MOTOR\_\-DOWN@{DI\_\-MOTOR\_\-DOWN}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-MOTOR\_\-DOWN@{DI\_\-MOTOR\_\-DOWN}}\item[{\em 
\hypertarget{di_8h_a08714da0a39d97dda8ed3779a6837befac94bb165c9b1af9092d0fb027240b812}{
DI\_\-MOTOR\_\-DOWN}
\label{di_8h_a08714da0a39d97dda8ed3779a6837befac94bb165c9b1af9092d0fb027240b812}
}]Spin down the motor \index{DI\_\-MOTOR\_\-UP@{DI\_\-MOTOR\_\-UP}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-MOTOR\_\-UP@{DI\_\-MOTOR\_\-UP}}\item[{\em 
\hypertarget{di_8h_a08714da0a39d97dda8ed3779a6837befa6b9d0e699534f0dca4d61402b1da0372}{
DI\_\-MOTOR\_\-UP}
\label{di_8h_a08714da0a39d97dda8ed3779a6837befa6b9d0e699534f0dca4d61402b1da0372}
}]Spin up the motor \index{DI\_\-DRIVE\_\-ACCEPT@{DI\_\-DRIVE\_\-ACCEPT}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DRIVE\_\-ACCEPT@{DI\_\-DRIVE\_\-ACCEPT}}\item[{\em 
\hypertarget{di_8h_a08714da0a39d97dda8ed3779a6837befa518f78874f61ab8df66a84b6be38bba0}{
DI\_\-DRIVE\_\-ACCEPT}
\label{di_8h_a08714da0a39d97dda8ed3779a6837befa518f78874f61ab8df66a84b6be38bba0}
}]Force the drive to accept the disc \index{DI\_\-DRIVE\_\-CHECKDISK@{DI\_\-DRIVE\_\-CHECKDISK}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-DRIVE\_\-CHECKDISK@{DI\_\-DRIVE\_\-CHECKDISK}}\item[{\em 
\hypertarget{di_8h_a08714da0a39d97dda8ed3779a6837befa1e7123e51ddb78121e755178d2a56c20}{
DI\_\-DRIVE\_\-CHECKDISK}
\label{di_8h_a08714da0a39d97dda8ed3779a6837befa1e7123e51ddb78121e755178d2a56c20}
}]Force the drive to check the disc \end{description}
\end{Desc}

\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8}{
\index{di.h@{di.h}!di\_\-error1\_\-t@{di\_\-error1\_\-t}}
\index{di\_\-error1\_\-t@{di\_\-error1\_\-t}!di.h@{di.h}}
\subsubsection[{di\_\-error1\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf di\_\-error1\_\-t}}}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8}
Error codes (top byte) \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{DI\_\-ERROR1\_\-OK@{DI\_\-ERROR1\_\-OK}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR1\_\-OK@{DI\_\-ERROR1\_\-OK}}\item[{\em 
\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8af6583429e198675988f11b0473376cd9}{
DI\_\-ERROR1\_\-OK}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8af6583429e198675988f11b0473376cd9}
}]No error \index{DI\_\-ERROR1\_\-LIDOPEN@{DI\_\-ERROR1\_\-LIDOPEN}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR1\_\-LIDOPEN@{DI\_\-ERROR1\_\-LIDOPEN}}\item[{\em 
\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8a88f76cf92bc9503b6d8666f99a040d3c}{
DI\_\-ERROR1\_\-LIDOPEN}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8a88f76cf92bc9503b6d8666f99a040d3c}
}]Lid open \index{DI\_\-ERROR1\_\-DISKCHANGED@{DI\_\-ERROR1\_\-DISKCHANGED}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR1\_\-DISKCHANGED@{DI\_\-ERROR1\_\-DISKCHANGED}}\item[{\em 
\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8ac9cf364eeb21c02b91367487d66fc806}{
DI\_\-ERROR1\_\-DISKCHANGED}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8ac9cf364eeb21c02b91367487d66fc806}
}]Disc changed \index{DI\_\-ERROR1\_\-NODISC@{DI\_\-ERROR1\_\-NODISC}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR1\_\-NODISC@{DI\_\-ERROR1\_\-NODISC}}\item[{\em 
\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8ae591e34fd3645d3e3a6849a8d3c71001}{
DI\_\-ERROR1\_\-NODISC}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8ae591e34fd3645d3e3a6849a8d3c71001}
}]No disc \index{DI\_\-ERROR1\_\-MOTOROFF@{DI\_\-ERROR1\_\-MOTOROFF}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR1\_\-MOTOROFF@{DI\_\-ERROR1\_\-MOTOROFF}}\item[{\em 
\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8aa49e6a4064365772b06f372fe17e1bf4}{
DI\_\-ERROR1\_\-MOTOROFF}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8aa49e6a4064365772b06f372fe17e1bf4}
}]Motor off \index{DI\_\-ERROR1\_\-BADDISC@{DI\_\-ERROR1\_\-BADDISC}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR1\_\-BADDISC@{DI\_\-ERROR1\_\-BADDISC}}\item[{\em 
\hypertarget{di_8h_a96be7b670c2e2cabdf4532f670a948b8a7f7d8056c2708918d5d97361e29b9f81}{
DI\_\-ERROR1\_\-BADDISC}
\label{di_8h_a96be7b670c2e2cabdf4532f670a948b8a7f7d8056c2708918d5d97361e29b9f81}
}]Disc not initialized/disc ID not read \end{description}
\end{Desc}

\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515fa}{
\index{di.h@{di.h}!di\_\-error2\_\-t@{di\_\-error2\_\-t}}
\index{di\_\-error2\_\-t@{di\_\-error2\_\-t}!di.h@{di.h}}
\subsubsection[{di\_\-error2\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf di\_\-error2\_\-t}}}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515fa}
Error codes (bottom 3 bytes) \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{DI\_\-ERROR2\_\-OK@{DI\_\-ERROR2\_\-OK}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-OK@{DI\_\-ERROR2\_\-OK}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faaf6881be4fa43fb76618bf501bbd85f13}{
DI\_\-ERROR2\_\-OK}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faaf6881be4fa43fb76618bf501bbd85f13}
}]No error \index{DI\_\-ERROR2\_\-MOTORSTOP@{DI\_\-ERROR2\_\-MOTORSTOP}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-MOTORSTOP@{DI\_\-ERROR2\_\-MOTORSTOP}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa735fa781eb56cd54f55920f3a3cc950e}{
DI\_\-ERROR2\_\-MOTORSTOP}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa735fa781eb56cd54f55920f3a3cc950e}
}]Motor stopped \index{DI\_\-ERROR2\_\-DISCID@{DI\_\-ERROR2\_\-DISCID}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-DISCID@{DI\_\-ERROR2\_\-DISCID}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa84e7df62928a1f4d350d152a54faad4a}{
DI\_\-ERROR2\_\-DISCID}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa84e7df62928a1f4d350d152a54faad4a}
}]Disc ID not read \index{DI\_\-ERROR2\_\-COVEROPEN@{DI\_\-ERROR2\_\-COVEROPEN}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-COVEROPEN@{DI\_\-ERROR2\_\-COVEROPEN}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faae03760cd37ce660946b3190c2e94722c}{
DI\_\-ERROR2\_\-COVEROPEN}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faae03760cd37ce660946b3190c2e94722c}
}]Medium not preset/Cover opened \index{DI\_\-ERROR2\_\-NOSEEK@{DI\_\-ERROR2\_\-NOSEEK}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-NOSEEK@{DI\_\-ERROR2\_\-NOSEEK}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa2f586298df175a3289a6c5be2b06886f}{
DI\_\-ERROR2\_\-NOSEEK}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa2f586298df175a3289a6c5be2b06886f}
}]No seek complete \index{DI\_\-ERROR2\_\-READERROR@{DI\_\-ERROR2\_\-READERROR}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-READERROR@{DI\_\-ERROR2\_\-READERROR}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faabba15ed93de7b7e71d2391ba9bb57d95}{
DI\_\-ERROR2\_\-READERROR}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faabba15ed93de7b7e71d2391ba9bb57d95}
}]Unrecovered read error \index{DI\_\-ERROR2\_\-TRANSFER@{DI\_\-ERROR2\_\-TRANSFER}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-TRANSFER@{DI\_\-ERROR2\_\-TRANSFER}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa603a2d069b5f820a223c59a81c1121bb}{
DI\_\-ERROR2\_\-TRANSFER}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa603a2d069b5f820a223c59a81c1121bb}
}]Transfer protocol error \index{DI\_\-ERROR2\_\-COMMAND@{DI\_\-ERROR2\_\-COMMAND}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-COMMAND@{DI\_\-ERROR2\_\-COMMAND}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa372a92635f8332f7e0ae429bf413d3c1}{
DI\_\-ERROR2\_\-COMMAND}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa372a92635f8332f7e0ae429bf413d3c1}
}]Invalid command operation code \index{DI\_\-ERROR2\_\-AUDIOBUF@{DI\_\-ERROR2\_\-AUDIOBUF}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-AUDIOBUF@{DI\_\-ERROR2\_\-AUDIOBUF}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa89a444c0fb5a6287e5f5af7f2c1d864e}{
DI\_\-ERROR2\_\-AUDIOBUF}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa89a444c0fb5a6287e5f5af7f2c1d864e}
}]Audio buffer not set \index{DI\_\-ERROR2\_\-LBARANGE@{DI\_\-ERROR2\_\-LBARANGE}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-LBARANGE@{DI\_\-ERROR2\_\-LBARANGE}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa70031ebf2d5640eed8eb1b6a4d73bb33}{
DI\_\-ERROR2\_\-LBARANGE}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa70031ebf2d5640eed8eb1b6a4d73bb33}
}]LBA out of range \index{DI\_\-ERROR2\_\-INVALIDFIELD@{DI\_\-ERROR2\_\-INVALIDFIELD}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-INVALIDFIELD@{DI\_\-ERROR2\_\-INVALIDFIELD}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa2a25281268fa8e71addbd1a31bf0627c}{
DI\_\-ERROR2\_\-INVALIDFIELD}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa2a25281268fa8e71addbd1a31bf0627c}
}]Invalid field in command packet \index{DI\_\-ERROR2\_\-AUDIOCMD@{DI\_\-ERROR2\_\-AUDIOCMD}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-AUDIOCMD@{DI\_\-ERROR2\_\-AUDIOCMD}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faaca12a1d067118e4c8a9fcab7b945f4f6}{
DI\_\-ERROR2\_\-AUDIOCMD}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faaca12a1d067118e4c8a9fcab7b945f4f6}
}]Invalid audio command \index{DI\_\-ERROR2\_\-CONFIG@{DI\_\-ERROR2\_\-CONFIG}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-CONFIG@{DI\_\-ERROR2\_\-CONFIG}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faac0f0738b5f51cb0364a76ffc874bdf9e}{
DI\_\-ERROR2\_\-CONFIG}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faac0f0738b5f51cb0364a76ffc874bdf9e}
}]Configuration out of permitted period \index{DI\_\-ERROR2\_\-ENDOFUSER@{DI\_\-ERROR2\_\-ENDOFUSER}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-ENDOFUSER@{DI\_\-ERROR2\_\-ENDOFUSER}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faab3afe5bb461bed6161a58258ae54eb87}{
DI\_\-ERROR2\_\-ENDOFUSER}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faab3afe5bb461bed6161a58258ae54eb87}
}]End of user area encountered on this track \index{DI\_\-ERROR2\_\-MEDIUMCHANGE@{DI\_\-ERROR2\_\-MEDIUMCHANGE}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-MEDIUMCHANGE@{DI\_\-ERROR2\_\-MEDIUMCHANGE}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faaf766589444741f8a6bf2ad919879787e}{
DI\_\-ERROR2\_\-MEDIUMCHANGE}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faaf766589444741f8a6bf2ad919879787e}
}]Medium may have changed \index{DI\_\-ERROR2\_\-OPREMOVAL@{DI\_\-ERROR2\_\-OPREMOVAL}!di.h@{di.h}}\index{di.h@{di.h}!DI\_\-ERROR2\_\-OPREMOVAL@{DI\_\-ERROR2\_\-OPREMOVAL}}\item[{\em 
\hypertarget{di_8h_ad84d2340f5921fbea901f31a0b8515faa55b48fad6dffb5ade70183913d88b9dc}{
DI\_\-ERROR2\_\-OPREMOVAL}
\label{di_8h_ad84d2340f5921fbea901f31a0b8515faa55b48fad6dffb5ade70183913d88b9dc}
}]Operator medium removal request \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{di_8h_ac98ce34cee69ce27c9ae15971a6d22b9}{
\index{di.h@{di.h}!di\_\-cover\_\-open@{di\_\-cover\_\-open}}
\index{di\_\-cover\_\-open@{di\_\-cover\_\-open}!di.h@{di.h}}
\subsubsection[{di\_\-cover\_\-open}]{\setlength{\rightskip}{0pt plus 5cm}BOOL di\_\-cover\_\-open (void)}}
\label{di_8h_ac98ce34cee69ce27c9ae15971a6d22b9}


Detects if the drive cover is open. 

\begin{DoxyReturn}{Returns}
TRUE if the cover is open, FALSE if it's closed. 
\end{DoxyReturn}
\hypertarget{di_8h_ac05bcd07ec22770cd995d97238d69b21}{
\index{di.h@{di.h}!di\_\-immediate\_\-recv@{di\_\-immediate\_\-recv}}
\index{di\_\-immediate\_\-recv@{di\_\-immediate\_\-recv}!di.h@{di.h}}
\subsubsection[{di\_\-immediate\_\-recv}]{\setlength{\rightskip}{0pt plus 5cm}u32 di\_\-immediate\_\-recv (void)}}
\label{di_8h_ac05bcd07ec22770cd995d97238d69b21}


Read the immediate data buffer. 

\begin{DoxyReturn}{Returns}
The immediate data buffer. 
\end{DoxyReturn}
\hypertarget{di_8h_a00609574f7a134957d30d1eca3d7e1b6}{
\index{di.h@{di.h}!di\_\-immediate\_\-send@{di\_\-immediate\_\-send}}
\index{di\_\-immediate\_\-send@{di\_\-immediate\_\-send}!di.h@{di.h}}
\subsubsection[{di\_\-immediate\_\-send}]{\setlength{\rightskip}{0pt plus 5cm}void di\_\-immediate\_\-send (u32 {\em data})}}
\label{di_8h_a00609574f7a134957d30d1eca3d7e1b6}


Write the immediate data buffer. 


\begin{DoxyParams}{Parameters}
\item[{\em data}]data to write to immediate data buffer. \end{DoxyParams}
\hypertarget{di_8h_a09e5792ab1c931d204d0597aa76847e2}{
\index{di.h@{di.h}!di\_\-initialize@{di\_\-initialize}}
\index{di\_\-initialize@{di\_\-initialize}!di.h@{di.h}}
\subsubsection[{di\_\-initialize}]{\setlength{\rightskip}{0pt plus 5cm}int di\_\-initialize (void)}}
\label{di_8h_a09e5792ab1c931d204d0597aa76847e2}


Initialize the DI subsystem. 

Initializes the DI subsystem, registers the handler for the DI interrupt and performs all other required initialization tasks. \begin{DoxyReturn}{Returns}
If initialization was successful, returns 1. Otherwise 0. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_ab8f29845911a3cd98e438d1cfadebfae}{di\_\-shutdown()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_a6151149f7396221205962aa1c5a87b9a}{
\index{di.h@{di.h}!di\_\-reset@{di\_\-reset}}
\index{di\_\-reset@{di\_\-reset}!di.h@{di.h}}
\subsubsection[{di\_\-reset}]{\setlength{\rightskip}{0pt plus 5cm}void di\_\-reset (BOOL {\em hard})}}
\label{di_8h_a6151149f7396221205962aa1c5a87b9a}


Resets the drive. 


\begin{DoxyParams}{Parameters}
\item[{\em hard}]if TRUE, perform a hard drive reset. If FALSE, just soft reset. \end{DoxyParams}
\hypertarget{di_8h_a07fa50a82c048ab6bed95eca8967694b}{
\index{di.h@{di.h}!di\_\-set\_\-command@{di\_\-set\_\-command}}
\index{di\_\-set\_\-command@{di\_\-set\_\-command}!di.h@{di.h}}
\subsubsection[{di\_\-set\_\-command}]{\setlength{\rightskip}{0pt plus 5cm}void di\_\-set\_\-command ({\bf di\_\-cmd\_\-t} {\em cmd}, \/  u8 {\em subcmd1}, \/  u16 {\em subcmd2}, \/  u32 {\em off}, \/  u32 {\em len})}}
\label{di_8h_a07fa50a82c048ab6bed95eca8967694b}


Set the command to be sent for a transfer. 


\begin{DoxyParams}{Parameters}
\item[{\em cmd}]the command to use. \item[{\em subcmd1}]a parameter to cmd. \item[{\em subcmd2}]a parameter to cmd. \item[{\em off}]offset to data to use. (in 32bit words) \item[{\em len}]length of the data to use. \end{DoxyParams}
\hypertarget{di_8h_ac1b3c49a51e15ed4c39e26d1b1e74893}{
\index{di.h@{di.h}!di\_\-set\_\-dma@{di\_\-set\_\-dma}}
\index{di\_\-set\_\-dma@{di\_\-set\_\-dma}!di.h@{di.h}}
\subsubsection[{di\_\-set\_\-dma}]{\setlength{\rightskip}{0pt plus 5cm}void di\_\-set\_\-dma (u32 {\em addr}, \/  u32 {\em len})}}
\label{di_8h_ac1b3c49a51e15ed4c39e26d1b1e74893}


Set DMA address and length. 


\begin{DoxyParams}{Parameters}
\item[{\em addr}]address of the buffer in main memory. (32byte aligned) \item[{\em len}]length of the buffer. (32byte aligned) \end{DoxyParams}
\hypertarget{di_8h_ab8f29845911a3cd98e438d1cfadebfae}{
\index{di.h@{di.h}!di\_\-shutdown@{di\_\-shutdown}}
\index{di\_\-shutdown@{di\_\-shutdown}!di.h@{di.h}}
\subsubsection[{di\_\-shutdown}]{\setlength{\rightskip}{0pt plus 5cm}int di\_\-shutdown (void)}}
\label{di_8h_ab8f29845911a3cd98e438d1cfadebfae}


Shut down the DI subsystem. 

Shuts down the DI subsystem, unregisters the handler for the DI interrupt and performs all other required shut down tasks. \begin{DoxyReturn}{Returns}
If shut down was successful, returns 1. Otherwise 0. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_a09e5792ab1c931d204d0597aa76847e2}{di\_\-initialize()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_a72e5a5c33130979ad8109c2255c7f361}{
\index{di.h@{di.h}!di\_\-transfer@{di\_\-transfer}}
\index{di\_\-transfer@{di\_\-transfer}!di.h@{di.h}}
\subsubsection[{di\_\-transfer}]{\setlength{\rightskip}{0pt plus 5cm}void di\_\-transfer (BOOL {\em write}, \/  BOOL {\em dma})}}
\label{di_8h_a72e5a5c33130979ad8109c2255c7f361}


Starts a transfer from the DI. 


\begin{DoxyParams}{Parameters}
\item[{\em write}]if TRUE, this transfer is a write. If FALSE, it's a read. \item[{\em dma}]if TRUE, this transfer is a DMA. If FALSE, it's an immediate transfer. \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_a38c4af32db279cef68b0b6f7686e5dc1}{di\_\-transfer\_\-ended()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_a38c4af32db279cef68b0b6f7686e5dc1}{
\index{di.h@{di.h}!di\_\-transfer\_\-ended@{di\_\-transfer\_\-ended}}
\index{di\_\-transfer\_\-ended@{di\_\-transfer\_\-ended}!di.h@{di.h}}
\subsubsection[{di\_\-transfer\_\-ended}]{\setlength{\rightskip}{0pt plus 5cm}BOOL di\_\-transfer\_\-ended (void)}}
\label{di_8h_a38c4af32db279cef68b0b6f7686e5dc1}


Check if the DI transfer is complete. 

\begin{DoxyReturn}{Returns}
TRUE if transfer is complete, FALSE if transfer is still in progress. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_a72e5a5c33130979ad8109c2255c7f361}{di\_\-transfer()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_aaffae0a7637b924eb4c4f1ec98aeb32e}{
\index{di.h@{di.h}!irq\_\-di\_\-disable@{irq\_\-di\_\-disable}}
\index{irq\_\-di\_\-disable@{irq\_\-di\_\-disable}!di.h@{di.h}}
\subsubsection[{irq\_\-di\_\-disable}]{\setlength{\rightskip}{0pt plus 5cm}void irq\_\-di\_\-disable (u32 {\em irq})}}
\label{di_8h_aaffae0a7637b924eb4c4f1ec98aeb32e}


Disables a specific DI IRQ. 


\begin{DoxyParams}{Parameters}
\item[{\em irq}]the IRQ to disable \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_aca60f9d02f40b9f3d17ef313d25ea2c0}{irq\_\-di\_\-enable()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_aca60f9d02f40b9f3d17ef313d25ea2c0}{
\index{di.h@{di.h}!irq\_\-di\_\-enable@{irq\_\-di\_\-enable}}
\index{irq\_\-di\_\-enable@{irq\_\-di\_\-enable}!di.h@{di.h}}
\subsubsection[{irq\_\-di\_\-enable}]{\setlength{\rightskip}{0pt plus 5cm}void irq\_\-di\_\-enable (u32 {\em irq})}}
\label{di_8h_aca60f9d02f40b9f3d17ef313d25ea2c0}


Enables a specific DI IRQ. 


\begin{DoxyParams}{Parameters}
\item[{\em irq}]the IRQ to enable \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_aaffae0a7637b924eb4c4f1ec98aeb32e}{irq\_\-di\_\-disable()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_abd2bbb61f23f4acfa091bd3559a425ff}{
\index{di.h@{di.h}!irq\_\-di\_\-get\_\-handler@{irq\_\-di\_\-get\_\-handler}}
\index{irq\_\-di\_\-get\_\-handler@{irq\_\-di\_\-get\_\-handler}!di.h@{di.h}}
\subsubsection[{irq\_\-di\_\-get\_\-handler}]{\setlength{\rightskip}{0pt plus 5cm}{\bf irq\_\-handler\_\-t} irq\_\-di\_\-get\_\-handler (u32 {\em irqn})}}
\label{di_8h_abd2bbb61f23f4acfa091bd3559a425ff}


Gets a DI IRQ handler. 

Gets the IRQ handler information for a DI IRQ. 
\begin{DoxyParams}{Parameters}
\item[{\em irqn}]the IRQ whose handler is to be returned. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The \hyperlink{structirq__handler__t}{irq\_\-handler\_\-t} structure containing information about the handler. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_ab086a3a4873c8f405c908f07f35ce31e}{irq\_\-di\_\-register\_\-handler()} 
\end{DoxySeeAlso}
\hypertarget{di_8h_ab086a3a4873c8f405c908f07f35ce31e}{
\index{di.h@{di.h}!irq\_\-di\_\-register\_\-handler@{irq\_\-di\_\-register\_\-handler}}
\index{irq\_\-di\_\-register\_\-handler@{irq\_\-di\_\-register\_\-handler}!di.h@{di.h}}
\subsubsection[{irq\_\-di\_\-register\_\-handler}]{\setlength{\rightskip}{0pt plus 5cm}int irq\_\-di\_\-register\_\-handler (u32 {\em irqn}, \/  int($\ast$)(u32 irq, void $\ast$data) {\em exec}, \/  void $\ast$ {\em data})}}
\label{di_8h_ab086a3a4873c8f405c908f07f35ce31e}


Register a DI IRQ handler. 


\begin{DoxyParams}{Parameters}
\item[{\em irqn}]the IRQ whose handle is to be registered. \item[{\em exec}]the callback to be called when the IRQ fires. Pass NULL to unregister the IRQ. \item[{\em data}]the data to be passed to the IRQ when it fires. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns 1 on success, 0 on failure. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{di_8h_abd2bbb61f23f4acfa091bd3559a425ff}{irq\_\-di\_\-get\_\-handler()} 
\end{DoxySeeAlso}
