?? user_ds2431.h
字號:
#include <stdio.h>
#include <time.h>
#include <dir.h>
/* constants */
#define DS2431_FAM 0x2d
#define DS2401_FAM 0x01
#define DS2502_FAM 0x09
#define DS2431_ORDER 0x00
//define some structs type
//struct data content in DS2431
struct DS2431_Content
{
//memory map in page 0
uchar MakerName[8];
uchar MakerDate[3];
uchar BatteryType;
uchar BatteryCapacity;
uchar BatteryVoltage;
uchar MotorType;
uchar EbikeColor;
uchar TradeMark[6];
uchar Page0Reserved[2];
uchar EbikeType;
uchar MakerPhoneNumber[6];
uchar Page0Crc8;
//memory map in page 1
uchar OwnerName[8];
uchar OwnerPhoneNumber[8];
uchar OwnerID[9];
uchar EbikeSerialNumber[4];
uchar PurchaseDate[2];
uchar Page1Crc8;
//memory Map in Page 2
uchar ControllerMakerName[8];
uchar ControllerModelCode[3];
uchar ControllerType;
uchar ControllerRatedVoltage;
uchar ControllerRatedCurrent;
uchar ControllerRatedPower; //times 10 in display
uchar FirstHalfPage2Crc8; //CRC8 result generated by the first 16 byte in page 2
uchar KeyInformation[48];
uchar PageMode[8];
uchar ReservedData[8];
uchar RomID[8];
};
#ifdef TMEX
short DeviceROM[3][8];
ushort CRC16;
uchar CRC8;
struct DS2431_Content *DS2431;
#else
extern PACKAGE short DeviceROM[3][8];
extern PACKAGE ushort CRC16;
extern PACKAGE uchar CRC8;
extern PACKAGE struct DS2431_Content *DS2431;
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -