OSDN Git Service

(none)
[hos/hos-v4a.git] / aplfw / driver / serial / at91 / at91usartdrv_delete.c
1 /** 
2  *  Hyper Operating System  Application Framework
3  *
4  * @file  at91usartdrv_delete.c
5  * @brief %jp{ATMEL AT91シリーズUSART用デバイスドライバ}
6  *
7  * Copyright (C) 2006-2007 by Project HOS
8  * http://sourceforge.jp/projects/hos/
9  */
10
11
12 #include "at91usartdrv_local.h"
13
14
15 /** デストラクタ */
16 void At91UsartDrv_Delete(C_DRVOBJ *pDrvObj)
17 {
18         C_AT91USARTDRV  *self;
19         void                    *pMem;
20         
21         /* upper cast */
22         self = (C_AT91USARTDRV *)pDrvObj;
23
24         /* 同期オブジェクト削除 */
25         SysEvt_Delete(self->hEvtRecv);
26         SysEvt_Delete(self->hEvtSend);
27         SysMtx_Delete(self->hMtxRecv);
28         SysMtx_Delete(self->hMtxSend);
29
30         /* バッファ削除 */
31         pMem = StreamBuf_RefBufAddr(&self->StmBufRecv);
32         StreamBuf_Delete(&self->StmBuf);
33         SysMem_Free(pMem);
34 }
35
36
37 /* end of file */