mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-21 08:36:29 +03:00
Reformat spacing/comments in src/usbasp.h
This commit is contained in:
53
src/usbasp.h
53
src/usbasp.h
@@ -19,7 +19,7 @@
|
||||
#ifndef usbasp_h
|
||||
#define usbasp_h
|
||||
|
||||
/* USB function call identifiers */
|
||||
// USB function call identifiers
|
||||
#define USBASP_FUNC_CONNECT 1
|
||||
#define USBASP_FUNC_DISCONNECT 2
|
||||
#define USBASP_FUNC_TRANSMIT 3
|
||||
@@ -38,35 +38,35 @@
|
||||
#define USBASP_FUNC_TPI_WRITEBLOCK 16
|
||||
#define USBASP_FUNC_GETCAPABILITIES 127
|
||||
|
||||
/* USBASP capabilities */
|
||||
// USBASP capabilities
|
||||
#define USBASP_CAP_TPI 0x01
|
||||
#define USBASP_CAP_3MHZ (1 << 24) // 3 MHz SCK in UsbAsp-flash firmware
|
||||
#define USBASP_CAP_3MHZ (1 << 24) // 3 MHz SCK in UsbAsp-flash firmware
|
||||
|
||||
/* Block mode flags */
|
||||
// Block mode flags
|
||||
#define USBASP_BLOCKFLAG_FIRST 1
|
||||
#define USBASP_BLOCKFLAG_LAST 2
|
||||
|
||||
/* Block mode data size */
|
||||
// Block mode data size
|
||||
#define USBASP_READBLOCKSIZE 200
|
||||
#define USBASP_WRITEBLOCKSIZE 200
|
||||
|
||||
/* ISP SCK speed identifiers */
|
||||
// ISP SCK speed identifiers
|
||||
#define USBASP_ISP_SCK_AUTO 0
|
||||
#define USBASP_ISP_SCK_0_5 1 /* 500 Hz */
|
||||
#define USBASP_ISP_SCK_1 2 /* 1 kHz */
|
||||
#define USBASP_ISP_SCK_2 3 /* 2 kHz */
|
||||
#define USBASP_ISP_SCK_4 4 /* 4 kHz */
|
||||
#define USBASP_ISP_SCK_8 5 /* 8 kHz */
|
||||
#define USBASP_ISP_SCK_16 6 /* 16 kHz */
|
||||
#define USBASP_ISP_SCK_32 7 /* 32 kHz */
|
||||
#define USBASP_ISP_SCK_93_75 8 /* 93.75 kHz */
|
||||
#define USBASP_ISP_SCK_187_5 9 /* 187.5 kHz */
|
||||
#define USBASP_ISP_SCK_375 10 /* 375 kHz */
|
||||
#define USBASP_ISP_SCK_750 11 /* 750 kHz */
|
||||
#define USBASP_ISP_SCK_1500 12 /* 1.5 MHz */
|
||||
#define USBASP_ISP_SCK_3000 13 /* 3 MHz only UsbAsp-flash firmware*/
|
||||
#define USBASP_ISP_SCK_0_5 1 // 500 Hz
|
||||
#define USBASP_ISP_SCK_1 2 // 1 kHz
|
||||
#define USBASP_ISP_SCK_2 3 // 2 kHz
|
||||
#define USBASP_ISP_SCK_4 4 // 4 kHz
|
||||
#define USBASP_ISP_SCK_8 5 // 8 kHz
|
||||
#define USBASP_ISP_SCK_16 6 // 16 kHz
|
||||
#define USBASP_ISP_SCK_32 7 // 32 kHz
|
||||
#define USBASP_ISP_SCK_93_75 8 // 93.75 kHz
|
||||
#define USBASP_ISP_SCK_187_5 9 // 187.5 kHz
|
||||
#define USBASP_ISP_SCK_375 10 // 375 kHz
|
||||
#define USBASP_ISP_SCK_750 11 // 750 kHz
|
||||
#define USBASP_ISP_SCK_1500 12 // 1.5 MHz
|
||||
#define USBASP_ISP_SCK_3000 13 // 3 MHz only UsbAsp-flash firmware
|
||||
|
||||
/* TPI instructions */
|
||||
// TPI instructions
|
||||
#define TPI_OP_SLD 0x20
|
||||
#define TPI_OP_SLD_INC 0x24
|
||||
#define TPI_OP_SST 0x60
|
||||
@@ -78,7 +78,7 @@
|
||||
#define TPI_OP_SSTCS(a) (0xC0 | ((a)&0x0F) )
|
||||
#define TPI_OP_SKEY 0xE0
|
||||
|
||||
/* TPI control/status registers */
|
||||
// TPI control/status registers
|
||||
#define TPIIR 0xF
|
||||
#define TPIPCR 0x2
|
||||
#define TPISR 0x0
|
||||
@@ -99,7 +99,7 @@
|
||||
// TPISR bits
|
||||
#define TPISR_NVMEN 0x02
|
||||
|
||||
/* NVM registers */
|
||||
// NVM registers
|
||||
#define NVMCSR 0x32
|
||||
#define NVMCMD 0x33
|
||||
|
||||
@@ -112,13 +112,12 @@
|
||||
#define NVMCMD_SECTION_ERASE 0x14
|
||||
#define NVMCMD_WORD_WRITE 0x1D
|
||||
|
||||
|
||||
typedef struct sckoptions {
|
||||
int id;
|
||||
double frequency;
|
||||
} CLOCKOPTIONS;
|
||||
|
||||
/* USB error identifiers */
|
||||
// USB error identifiers
|
||||
#define USB_ERROR_NOTFOUND 1
|
||||
#define USB_ERROR_ACCESS 2
|
||||
#define USB_ERROR_IO 3
|
||||
@@ -127,11 +126,11 @@ typedef struct sckoptions {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const char usbasp_desc[];
|
||||
void usbasp_initpgm(PROGRAMMER *pgm);
|
||||
extern const char usbasp_desc[];
|
||||
void usbasp_initpgm(PROGRAMMER *pgm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* usbasp_h */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user