2 * Hyper Operating System Application Framework
4 * @file at91usartdrv_close.c
5 * @brief %jp{ATMEL AT91シリーズUSART用デバイスドライバ}
7 * Copyright (C) 2006-2007 by Project HOS
8 * http://sourceforge.jp/projects/hos/
12 #include "at91usartdrv_local.h"
16 void At91UsartDrv_Close(C_DRVOBJ *pDrvObj, C_FILEOBJ *pFileObj)
22 self = (C_AT91USARTDRV *)pDrvObj;
23 pChrFile = (C_CHRFILE *)pFileObj;
26 if ( --self->iOpenCount == 0 )
28 SysInt_Disable(self->iIntNum);
29 StreamBuf_ClearBuf(&self->StmBufRecv);
33 ChrFile_Delete(pChrFile);
34 SysMem_Free(pFileObj);