Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
usbasp.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sckoptions_t
 

Macros

#define USBASP_FUNC_CONNECT   1
 
#define USBASP_FUNC_DISCONNECT   2
 
#define USBASP_FUNC_TRANSMIT   3
 
#define USBASP_FUNC_READFLASH   4
 
#define USBASP_FUNC_ENABLEPROG   5
 
#define USBASP_FUNC_WRITEFLASH   6
 
#define USBASP_FUNC_READEEPROM   7
 
#define USBASP_FUNC_WRITEEEPROM   8
 
#define USBASP_FUNC_SETLONGADDRESS   9
 
#define USBASP_FUNC_SETISPSCK   10
 
#define USBASP_FUNC_TPI_CONNECT   11
 
#define USBASP_FUNC_TPI_DISCONNECT   12
 
#define USBASP_FUNC_TPI_RAWREAD   13
 
#define USBASP_FUNC_TPI_RAWWRITE   14
 
#define USBASP_FUNC_TPI_READBLOCK   15
 
#define USBASP_FUNC_TPI_WRITEBLOCK   16
 
#define USBASP_FUNC_GETCAPABILITIES   127
 
#define USBASP_CAP_TPI   0x01
 
#define USBASP_BLOCKFLAG_FIRST   1
 
#define USBASP_BLOCKFLAG_LAST   2
 
#define USBASP_READBLOCKSIZE   200
 
#define USBASP_WRITEBLOCKSIZE   200
 
#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 TPI_OP_SLD   0x20
 
#define TPI_OP_SLD_INC   0x24
 
#define TPI_OP_SST   0x60
 
#define TPI_OP_SST_INC   0x64
 
#define TPI_OP_SSTPR(a)   (0x68 | (a))
 
#define TPI_OP_SIN(a)   (0x10 | (((a)<<1)&0x60) | ((a)&0x0F) )
 
#define TPI_OP_SOUT(a)   (0x90 | (((a)<<1)&0x60) | ((a)&0x0F) )
 
#define TPI_OP_SLDCS(a)   (0x80 | ((a)&0x0F) )
 
#define TPI_OP_SSTCS(a)   (0xC0 | ((a)&0x0F) )
 
#define TPI_OP_SKEY   0xE0
 
#define TPIIR   0xF
 
#define TPIPCR   0x2
 
#define TPISR   0x0
 
#define TPIPCR_GT_2   0x04
 
#define TPIPCR_GT_1   0x02
 
#define TPIPCR_GT_0   0x01
 
#define TPIPCR_GT_128b   0x00
 
#define TPIPCR_GT_64b   0x01
 
#define TPIPCR_GT_32b   0x02
 
#define TPIPCR_GT_16b   0x03
 
#define TPIPCR_GT_8b   0x04
 
#define TPIPCR_GT_4b   0x05
 
#define TPIPCR_GT_2b   0x06
 
#define TPIPCR_GT_0b   0x07
 
#define TPISR_NVMEN   0x02
 
#define NVMCSR   0x32
 
#define NVMCMD   0x33
 
#define NVMCSR_BSY   0x80
 
#define NVMCMD_NOP   0x00
 
#define NVMCMD_CHIP_ERASE   0x10
 
#define NVMCMD_SECTION_ERASE   0x14
 
#define NVMCMD_WORD_WRITE   0x1D
 
#define USB_ERROR_NOTFOUND   1
 
#define USB_ERROR_ACCESS   2
 
#define USB_ERROR_IO   3
 

Typedefs

typedef struct sckoptions_t CLOCKOPTIONS
 

Functions

void usbasp_initpgm (PROGRAMMER *pgm)
 

Variables

const char usbasp_desc []
 

Class Documentation

◆ sckoptions_t

struct sckoptions_t
Class Members
double frequency
int id

Macro Definition Documentation

◆ NVMCMD

#define NVMCMD   0x33

◆ NVMCMD_CHIP_ERASE

#define NVMCMD_CHIP_ERASE   0x10

◆ NVMCMD_NOP

#define NVMCMD_NOP   0x00

◆ NVMCMD_SECTION_ERASE

#define NVMCMD_SECTION_ERASE   0x14

◆ NVMCMD_WORD_WRITE

#define NVMCMD_WORD_WRITE   0x1D

◆ NVMCSR

#define NVMCSR   0x32

◆ NVMCSR_BSY

#define NVMCSR_BSY   0x80

◆ TPI_OP_SIN

#define TPI_OP_SIN (   a)    (0x10 | (((a)<<1)&0x60) | ((a)&0x0F) )

◆ TPI_OP_SKEY

#define TPI_OP_SKEY   0xE0

◆ TPI_OP_SLD

#define TPI_OP_SLD   0x20

◆ TPI_OP_SLD_INC

#define TPI_OP_SLD_INC   0x24

◆ TPI_OP_SLDCS

#define TPI_OP_SLDCS (   a)    (0x80 | ((a)&0x0F) )

◆ TPI_OP_SOUT

#define TPI_OP_SOUT (   a)    (0x90 | (((a)<<1)&0x60) | ((a)&0x0F) )

◆ TPI_OP_SST

#define TPI_OP_SST   0x60

◆ TPI_OP_SST_INC

#define TPI_OP_SST_INC   0x64

◆ TPI_OP_SSTCS

#define TPI_OP_SSTCS (   a)    (0xC0 | ((a)&0x0F) )

◆ TPI_OP_SSTPR

#define TPI_OP_SSTPR (   a)    (0x68 | (a))

◆ TPIIR

#define TPIIR   0xF

◆ TPIPCR

#define TPIPCR   0x2

◆ TPIPCR_GT_0

#define TPIPCR_GT_0   0x01

◆ TPIPCR_GT_0b

#define TPIPCR_GT_0b   0x07

◆ TPIPCR_GT_1

#define TPIPCR_GT_1   0x02

◆ TPIPCR_GT_128b

#define TPIPCR_GT_128b   0x00

◆ TPIPCR_GT_16b

#define TPIPCR_GT_16b   0x03

◆ TPIPCR_GT_2

#define TPIPCR_GT_2   0x04

◆ TPIPCR_GT_2b

#define TPIPCR_GT_2b   0x06

◆ TPIPCR_GT_32b

#define TPIPCR_GT_32b   0x02

◆ TPIPCR_GT_4b

#define TPIPCR_GT_4b   0x05

◆ TPIPCR_GT_64b

#define TPIPCR_GT_64b   0x01

◆ TPIPCR_GT_8b

#define TPIPCR_GT_8b   0x04

◆ TPISR

#define TPISR   0x0

◆ TPISR_NVMEN

#define TPISR_NVMEN   0x02

◆ USB_ERROR_ACCESS

#define USB_ERROR_ACCESS   2

◆ USB_ERROR_IO

#define USB_ERROR_IO   3

◆ USB_ERROR_NOTFOUND

#define USB_ERROR_NOTFOUND   1

◆ USBASP_BLOCKFLAG_FIRST

#define USBASP_BLOCKFLAG_FIRST   1

◆ USBASP_BLOCKFLAG_LAST

#define USBASP_BLOCKFLAG_LAST   2

◆ USBASP_CAP_TPI

#define USBASP_CAP_TPI   0x01

◆ USBASP_FUNC_CONNECT

#define USBASP_FUNC_CONNECT   1

◆ USBASP_FUNC_DISCONNECT

#define USBASP_FUNC_DISCONNECT   2

◆ USBASP_FUNC_ENABLEPROG

#define USBASP_FUNC_ENABLEPROG   5

◆ USBASP_FUNC_GETCAPABILITIES

#define USBASP_FUNC_GETCAPABILITIES   127

◆ USBASP_FUNC_READEEPROM

#define USBASP_FUNC_READEEPROM   7

◆ USBASP_FUNC_READFLASH

#define USBASP_FUNC_READFLASH   4

◆ USBASP_FUNC_SETISPSCK

#define USBASP_FUNC_SETISPSCK   10

◆ USBASP_FUNC_SETLONGADDRESS

#define USBASP_FUNC_SETLONGADDRESS   9

◆ USBASP_FUNC_TPI_CONNECT

#define USBASP_FUNC_TPI_CONNECT   11

◆ USBASP_FUNC_TPI_DISCONNECT

#define USBASP_FUNC_TPI_DISCONNECT   12

◆ USBASP_FUNC_TPI_RAWREAD

#define USBASP_FUNC_TPI_RAWREAD   13

◆ USBASP_FUNC_TPI_RAWWRITE

#define USBASP_FUNC_TPI_RAWWRITE   14

◆ USBASP_FUNC_TPI_READBLOCK

#define USBASP_FUNC_TPI_READBLOCK   15

◆ USBASP_FUNC_TPI_WRITEBLOCK

#define USBASP_FUNC_TPI_WRITEBLOCK   16

◆ USBASP_FUNC_TRANSMIT

#define USBASP_FUNC_TRANSMIT   3

◆ USBASP_FUNC_WRITEEEPROM

#define USBASP_FUNC_WRITEEEPROM   8

◆ USBASP_FUNC_WRITEFLASH

#define USBASP_FUNC_WRITEFLASH   6

◆ USBASP_ISP_SCK_0_5

#define USBASP_ISP_SCK_0_5   1 /* 500 Hz */

◆ USBASP_ISP_SCK_1

#define USBASP_ISP_SCK_1   2 /* 1 kHz */

◆ USBASP_ISP_SCK_1500

#define USBASP_ISP_SCK_1500   12 /* 1.5 MHz */

◆ USBASP_ISP_SCK_16

#define USBASP_ISP_SCK_16   6 /* 16 kHz */

◆ USBASP_ISP_SCK_187_5

#define USBASP_ISP_SCK_187_5   9 /* 187.5 kHz */

◆ USBASP_ISP_SCK_2

#define USBASP_ISP_SCK_2   3 /* 2 kHz */

◆ USBASP_ISP_SCK_32

#define USBASP_ISP_SCK_32   7 /* 32 kHz */

◆ USBASP_ISP_SCK_375

#define USBASP_ISP_SCK_375   10 /* 375 kHz */

◆ USBASP_ISP_SCK_4

#define USBASP_ISP_SCK_4   4 /* 4 kHz */

◆ USBASP_ISP_SCK_750

#define USBASP_ISP_SCK_750   11 /* 750 kHz */

◆ USBASP_ISP_SCK_8

#define USBASP_ISP_SCK_8   5 /* 8 kHz */

◆ USBASP_ISP_SCK_93_75

#define USBASP_ISP_SCK_93_75   8 /* 93.75 kHz */

◆ USBASP_ISP_SCK_AUTO

#define USBASP_ISP_SCK_AUTO   0

◆ USBASP_READBLOCKSIZE

#define USBASP_READBLOCKSIZE   200

◆ USBASP_WRITEBLOCKSIZE

#define USBASP_WRITEBLOCKSIZE   200

Typedef Documentation

◆ CLOCKOPTIONS

typedef struct sckoptions_t CLOCKOPTIONS

Function Documentation

◆ usbasp_initpgm()

void usbasp_initpgm ( PROGRAMMER pgm)
1212{
1213 strcpy(pgm->type, "usbasp");
1214
1216}
static PROGRAMMER * pgm
Definition main.c:192
int(* open)(struct programmer_t *pgm, char *port)
Definition libavrdude.h:657
char type[PGM_TYPELEN]
Definition libavrdude.h:619
static int usbasp_nousb_open(struct programmer_t *pgm, char *name)
Definition usbasp.c:1203

References programmer_t::open, pgm, programmer_t::type, and usbasp_nousb_open().

+ Here is the call graph for this function:

Variable Documentation

◆ usbasp_desc

const char usbasp_desc[]
extern