1 #ifndef USBPROGRAMMER_H
2 #define USBPROGRAMMER_H
4 #include "programmer.h"
8 /* This file servers as usbspi.dll programmer interface
9 * and partially as pttransport.dll transport layer
12 #define CSRVENDOR 0x0a12
13 #define CSRDEVICE 0x0042
15 class UsbProgrammer : public Programmer
19 bool ReadBlock(uint16_t addr, int size, uint16_t buffer[]);
20 bool WriteBlock(uint16_t addr, int size, uint16_t buffer[]);
21 bool SetTransferSpeed(uint16_t speedkhz);
22 bool IsXAPStopped(void);
23 bool IsConnected(void);
26 bool SetMode(bool spi);
34 #endif // USBPROGRAMMER_H