📄 lcd_plugin.cpp
字号:
/*
* Copyright (c) 2005 Zhejiang University, P.R.China
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
//=============================================================================
/**
* \file Device/UART_EP7312/LCD_Plugin.cpp
*
* $Id: LCD_Plugin.cpp,v 1.1 2005/06/08 08:12:24 qilj Exp $
*
* \author Lingjie Qi <lingjie_qi@163.com>
*/
//=============================================================================
#include "./LCD_Plugin.h"
#include "./LCD.h"
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#ifdef WIN32
// Windows Header Files:
#include <windows.h>
#endif
extern "C"{
LCD_API size_t Wukong_Enum_Module(std::vector<Core::Module_Meta> &res)
{
res.clear();
Core::Module_Manager::append_meta(res, "LCD", Core::Module_Manager::MT_DEVICE);
return res.size();
}
LCD_API Core::Module * Wukong_Create_Module(const std::string & name)
{
if (name == "LCD")
{
Core::Module* module;
module = new DEVICE::LCD();
module->on_create();
return module;
}
return 0;
}
LCD_API bool Wukong_Destroy_Module(const std::string & name, Core::Module * module)
{
assert(name == module->get_name());
if (name == module->get_name())
{
module->on_destroy();
delete module;
return true;
}
else
{
return false;
}
}
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -