PS2SDK
PS2 Homebrew Libraries
acuart.h
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #ifndef _ACUART_H
12 #define _ACUART_H
13 
14 #include <accore.h>
15 
16 typedef enum ac_uart_flag
17 {
18  AC_UART_FLAG_READ = 0x1,
19  AC_UART_FLAG_WRITE = 0x2,
20  AC_UART_FLAG_BOTH = 0x3,
21 } acUartFlag;
22 
23 typedef struct ac_uart_attr
24 {
25  acInt32 ua_speed;
26  acInt32 ua_fifo;
27  acInt32 ua_loopback;
28  acInt32 ua_padding;
31 
32 extern int acUartModuleRestart(int argc, char **argv);
33 extern int acUartModuleStart(int argc, char **argv);
34 extern int acUartModuleStatus();
35 extern int acUartModuleStop();
36 extern int acUartRead(void *buf, int count);
37 extern int acUartWrite(void *buf, int count);
38 extern int acUartWait(acUartFlag rw, int usec);
39 extern int acUartGetAttr(acUartAttrData *attr);
40 extern int acUartSetAttr(const acUartAttrData *attr);
41 
42 #define acuart_IMPORTS_start DECLARE_IMPORT_TABLE(acuart, 1, 1)
43 #define acuart_IMPORTS_end END_IMPORT_TABLE
44 
45 #define I_acUartModuleRestart DECLARE_IMPORT(4, acUartModuleRestart)
46 #define I_acUartModuleStart DECLARE_IMPORT(5, acUartModuleStart)
47 #define I_acUartModuleStatus DECLARE_IMPORT(6, acUartModuleStatus)
48 #define I_acUartModuleStop DECLARE_IMPORT(7, acUartModuleStop)
49 #define I_acUartRead DECLARE_IMPORT(8, acUartRead)
50 #define I_acUartWrite DECLARE_IMPORT(9, acUartWrite)
51 #define I_acUartWait DECLARE_IMPORT(10, acUartWait)
52 #define I_acUartGetAttr DECLARE_IMPORT(11, acUartGetAttr)
53 #define I_acUartSetAttr DECLARE_IMPORT(12, acUartSetAttr)
54 
55 #endif
count
u32 count
start sector of fragmented bd/file
Definition: usbhdfsd-common.h:3
ac_uart_attr
Definition: acuart.h:23