📄 usbasp.h
字号:
/*----------------------------------------------------------------------------
文 件:USB下载器操作过程类.
功 能:提供下载过程支持.
时 间:2008-2
百强电子世界网http://www.bqmcu.com.cn
飞雪浪子 QQ:570733482 jztdx@163.com
----------------------------------------------------------------------------*/
// USBASP.h: interface for the CUSBASP class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_USBASP_H__390DF3FA_2002_4A96_9496_0024C733A26B__INCLUDED_)
#define AFX_USBASP_H__390DF3FA_2002_4A96_9496_0024C733A26B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "USBOP.h"
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
#define CHIP_FLASH 0
#define CHIP_EEPROM 1
#define CHIP_CHECK 2
#define CHIP_F_VERIFY 3 //flash verify
#define CHIP_E_VERIFY 4 //eeprom verify
#define CHIP_WRITE 0
#define CHIP_READ 1
#define CHIP_WRITE_MODE0 2
#define CHIP_READ_MODE0 3
#define CHIP_LOW_BIT 0
#define CHIP_HIGHT_BIT 1
#define CHIP_EXT_BIT 2
class CUSBASP
{
public:
CUSBASP();
virtual ~CUSBASP();
public:
BOOL chipInit();
BOOL chipEntryProgram();
BOOL chipErasure();
BOOL chipSignature(unsigned char *p);
BOOL chipCrystal(unsigned char *p);
BOOL chipRWLock(uchar rw,uchar *s);
BOOL chipRWFuse(uchar rw,uchar hl,uchar *s);
void chipSetSpeed(int ispSCK);
BOOL chipPageWrite(int flashoreeprom,uchar *buf,int page_size, int n_bytes);
BOOL chipPageRead(int flashoreeprom, uchar *buf,int n_bytes);
BOOL chipProcOver();
public:
CUSBOP m_usbop;
};
#endif // !defined(AFX_USBASP_H__390DF3FA_2002_4A96_9496_0024C733A26B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -