OSDN Git Service

(none)
authorryuz <ryuz>
Sat, 10 May 2008 14:17:47 +0000 (14:17 +0000)
committerryuz <ryuz>
Sat, 10 May 2008 14:17:47 +0000 (14:17 +0000)
aplfw/driver/console/pcattext/pcattextdrv_clearscreen.c
aplfw/driver/console/pcattext/pcattextdrv_constructor.c
aplfw/driver/console/pcattext/pcattextdrv_iocontrol.c [new file with mode: 0755]
aplfw/driver/console/pcattext/pcattextdrv_setcursor.c
aplfw/driver/console/pcattext/pcattextdrv_write.c [new file with mode: 0755]

index 6001862..4cd6baa 100755 (executable)
@@ -19,7 +19,7 @@ void PcatTextDrv_ClearScreen(C_PCATTEXTDRV *self)
        /* Text-VRAM初期化 */
        for ( i = 0; i < self->iScreenWidth * self->iScreenHeight; i++ )
        {
-               self->puhVramBase[i] = 0x0720;
+               self->puhTextVram[i] = 0x0720;
        }
        
        /* カーソル初期化 */
index c3a86ca..30c397f 100755 (executable)
@@ -19,10 +19,10 @@ const T_DRVOBJ_METHODS PcatTextDrv_Methods =
                PcatTextDrv_Open,
                PcatTextDrv_Close,
                PcatTextDrv_IoControl,
-               PcatTextDrv_Seek,
-               PcatTextDrv_Read,
+               DrvObj_Seek,
+               DrvObj_Read,
                PcatTextDrv_Write,
-               PcatTextDrv_Flush,
+               DrvObj_Flush,
        };
 
 
diff --git a/aplfw/driver/console/pcattext/pcattextdrv_iocontrol.c b/aplfw/driver/console/pcattext/pcattextdrv_iocontrol.c
new file mode 100755 (executable)
index 0000000..65735f6
--- /dev/null
@@ -0,0 +1,21 @@
+/** 
+ * Hyper Operating System  Application Framework
+ *
+ * @file  pcattextdrv_iocontrol.c
+ * @brief %jp{PC/AT text mode driver I/O制御}%en{PC/AT text mode driver  I/O control}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "pcattextdrv_local.h"
+
+
+FILE_ERR PcatTextDrv_IoControl(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, int iFunc, void *pInBuf, FILE_SIZE InSize, const void *pOutBuf, FILE_SIZE OutSize)
+{
+       return DrvObj_IoControl(pDrvObj, pFileObj, iFunc, pInBuf, InSize, pOutBuf, OutSize);
+}
+
+
+/* end of file */
index d438baa..1eeb9db 100755 (executable)
@@ -12,8 +12,9 @@
 #include "pcattextdrv_local.h"
 
 
-void PcatTextDrv_SetCursor(C_PCATTEXTDRV *self, int iX, int iY);
+void PcatTextDrv_SetCursor(C_PCATTEXTDRV *self, int iX, int iY)
 {
+       /* カーソル移動 */
        self->iCursorX = iX;
        self->iCursorY = iY;
 }
diff --git a/aplfw/driver/console/pcattext/pcattextdrv_write.c b/aplfw/driver/console/pcattext/pcattextdrv_write.c
new file mode 100755 (executable)
index 0000000..c2b35e0
--- /dev/null
@@ -0,0 +1,37 @@
+/** 
+ * Hyper Operating System  Application Framework
+ *
+ * @file  pcattextdrv_write.c
+ * @brief %jp{PC/AT text mode driver 書込み}%en{PC/AT text mode driver  write}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "pcattextdrv_local.h"
+
+
+/** %jp{送信} */
+FILE_SIZE PcatTextDrv_Write(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj, const void *pData, FILE_SIZE Size)
+{
+       C_PCATTEXTDRV           *self;
+       const unsigned char     *pubBuf;
+       FILE_SIZE                       i;
+       
+       /* upper cast */
+       self = (C_PCATTEXTDRV *)pDrvObj;
+       
+       pubBuf = (const unsigned char *)pData;
+       
+       /* 出力 */
+       for ( i = 0; i < Size; i++ )
+       {
+               PcatTextDrv_PutChar(self, pubBuf[i]);
+       }
+       
+       return i;
+}
+
+
+/* end of file */