OSDN Git Service

add microblaze sample
[hos/hos-v4a.git] / aplfw / driver / serial / xilinxuartdrv / xilinxuartdrv_destructor.c
diff --git a/aplfw/driver/serial/xilinxuartdrv/xilinxuartdrv_destructor.c b/aplfw/driver/serial/xilinxuartdrv/xilinxuartdrv_destructor.c
new file mode 100644 (file)
index 0000000..d5fefa8
--- /dev/null
@@ -0,0 +1,33 @@
+/** 
+ * Hyper Operating System  Application Framework
+ *
+ * @file  xilinxuartdrv_destructor.c
+ * @brief %jp{XILINX UART driver デストラクタ}%en{XILINX UART driver  destructor}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "xilinxuartdrv_local.h"
+
+
+/** デストラクタ */
+void XilinxUartDrv_Destructor(C_XILINXUARTDRV *self)
+{
+       void    *pMem;
+
+       /* 割込みサービスルーチン削除 */
+       SysIsr_Delete(self->hIsr);
+       
+       /* バッファ削除 */
+       pMem = StreamBuf_RefBufAddr(&self->StmBufRecv);
+       StreamBuf_Delete(&self->StmBuf);
+       SysMem_Free(pMem);
+       
+       /* 親クラスデストラクタ */
+       SyncDrv_Destructor(&self->SyncDrv);
+}
+
+
+/* end of file */