본문 바로가기

Hello CE,Mobile

Kernel IO 추가하는법

-------------------------------------------------------------

*** Kernel IO 추가 하는 ***

-------------------------------------------------------------

1. ioctl_cfg.h ioctl define 추가

#define SET_LCD_PCD_ARGS_FID                  4002

#define IOCTL_LCD_INIT                        CTL_CODE(FILE_DEVICE_HAL, (SET_LCD_PCD_ARGS_FID), METHOD_BUFFERED, FILE_ANY_ACCESS)

   

2. g_oalIoCtlTable 추가하기 위해서 ioctl_tab.h 해당 function interface 추가

{ IOCTL_LCD_INIT,       0,  OALIoCtlHalLCDInit   },

   

3. ioctl.c 해당 함수(OALIoCtlHalLCDInit) 추가

BOOL OALIoCtlHalLCDInit(

    UINT32 code, VOID *pInpBuffer, UINT32 inpSize, VOID *pOutBuffer,

    UINT32 outSize, UINT32 *pOutSize)

{

  return(TRUE);

}

   

-------------------------------------------------------------

*** 사용할 때는 ***

-------------------------------------------------------------

DWORD out_size;

DWORD in_buf[2];

KernelIoControl(IOCTL_LCD_INIT, in_buf, sizeof(in_buf), NULL, 0, &out_size);

   

원본 위치 <http://blog.naver.com/PostList.nhn?blogId=jwrho&categoryNo=2&currentPage=2>