📄 focus.cpp
字号:
// Focus.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "Focus.h"
#include <commctrl.h>
#include "i2c.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // The current instance
HWND hwndCB; // The command bar handle
// Forward declarations of functions included in this code module:
ATOM MyRegisterClass (HINSTANCE, LPTSTR);
BOOL InitInstance (HINSTANCE, int);
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About (HWND, UINT, WPARAM, LPARAM);
#define CHIP_ADDRESS 0x48
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
int DeviceID = 0x40;
int SubAddress = 0x12;
BYTE DataRead;
BYTE DataWrite = 0;
DataRead = I2C_Read(DeviceID, SubAddress);
RETAILMSG(1,(TEXT("Data Read From 0x%x: 0x%x\r\n"), SubAddress, DataRead));
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -