RS485转USB 驱动 支持WINCE Android


RS485转USB 驱动 支持WINCE Android,Windows 全系列, Linux等平台 带详细的使用文档, TCPTest、Ping、串口调试助手等小工具
资源截图
代码片段和文件信息

#include “windows.h“
#include 
#include 
#include 
#include 
#include 
#include “Dll1.h“

#define IDM_EXIT        110
#define IDC_ADDR        200
#define IDC_DA          300
#define TIMER1            1
#define NONE              0
#define DEMO              1

int PASCAL      WinMain(HANDLE HANDLE LPSTR int);

long  PASCAL MainWndProc(HWND UINT WPARAM  LPARAM);

HANDLE  hInst;
HWND hAddrComboBox;
unsigned long input=0 output=0;
unsigned long oldinput=0 ;
unsigned long demo_input=0 demo_output;

HBRUSH  hLTGreenBrushhGreenBrushhBlueBrushhYellowBrushhRedBrush;

int base_addr=NONE;

POINT input_pos[32] = {{320 60} {300 60} {280 60} {260 60}
                       {240 60} {220 60} {200 60} {180 60}
                       {160 60} {140 60} {120 60} {100 60}
                       { 80 60} { 60 60} { 40 60} { 20 60}
                       {320 40} {300 40} {280 40} {260 40}
                       {240 40} {220 40} {200 40} {180 40}
                       {160 40} {140 40} {120 40} {100 40}
                       { 80 40} { 60 40} { 40 40} { 20 40}};

POINT output_pos[32] = {{320154} {300154} {280154} {260154}
                        {240154} {220154} {200154} {180154}
                        {160154} {140154} {120154} {100154}
                        { 80154} { 60154} { 40154} { 20154}
                        {320134} {300134} {280134} {260134}
                        {240134} {220134} {200134} {180134}
                        {160134} {140134} {120134} {100134}
                        { 80134} { 60134} { 40134} { 20134}};


BOOL InitApplication(HANDLE);
BOOL InitInstance(HANDLE int);

int PASCAL WinMain(hInstance hPrevInstance lpCmdLine nCmdShow)
HANDLE hInstance hPrevInstance;
LPSTR lpCmdLine;
int nCmdShow;
{
  MSG msg;

  if (!hPrevInstance)
     if (!InitApplication(hInstance))  return(FALSE);
  if (!InitInstance(hInstance nCmdShow)) return(FALSE);
  while (GetMessage(&msg NULL NULL NULL)) {
     TranslateMessage(&msg);
     DispatchMessage(&msg);
  }
  return(msg.wParam);
}

BOOL InitApplication(hInstance)
HANDLE hInstance;
{
  WNDCLASS wc;

  /* Main Window Class */
  wc.style = NULL;
  wc.lpfnWndProc = (WNDPROC)MainWndProc;
  wc.cbClsExtra = 0;
  wc.cbWndExtra = 0;
  wc.hInstance = hInstance;
  wc.hIcon = LoadIcon(hInstance “MyIcon“);
  wc.hCursor = LoadCursor(NULL IDC_ARROW);
  wc.hbrBackground = GetStockobject(LTGRAY_BRUSH);
  wc.lpszMenuName = NULL;
  wc.lpszClassName = “GenericWClass“;
  if (!RegisterClass(&wc)) return(FALSE);
}


BOOL InitInstance(hInstance nCmdShow)
HANDLE hInstance;
int nCmdShow;
{
  HWND hWnd;
  HMENU hSampleMenu;

  hInst = hInstance;
  hSampleMenu = LoadMenu(hInstance “U7120Menu“);
  hWnd = CreateWindow(“GenericWClass“
         

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         685  2015-03-03 12:09  FTDI.bib
     文件         880  2015-03-03 12:09  FTDI.reg
     文件      184320  2015-03-02 13:19  ftdi_ser.dll
     文件      217775  2015-03-02 13:19  ftdi_ser.map
     文件         786  2015-03-03 12:10  FTDIPORT.INF
     文件       12559  2015-03-03 12:09  README.txt
     文件         835  2015-03-03 12:09  registry settings.txt
     文件        6090  2015-03-03 12:09  Update.txt

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)