Reformat spacing/comments in src/usbtiny.h

This commit is contained in:
Stefan Rueger
2024-08-18 01:54:36 +01:00
parent 7e76388fe9
commit 1f32f6260e

View File

@@ -16,53 +16,50 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef usbtiny_h
#define usbtiny_h
// Generic requests to the USBtiny
#define USBTINY_ECHO 0 // echo test
#define USBTINY_READ 1 // read byte (wIndex:address)
#define USBTINY_WRITE 2 // write byte (wIndex:address, wValue:value)
#define USBTINY_CLR 3 // clear bit (wIndex:address, wValue:bitno)
#define USBTINY_SET 4 // set bit (wIndex:address, wValue:bitno)
#define USBTINY_ECHO 0 // Echo test
#define USBTINY_READ 1 // Read byte (wIndex:address)
#define USBTINY_WRITE 2 // Write byte (wIndex:address, wValue:value)
#define USBTINY_CLR 3 // Clear bit (wIndex:address, wValue:bitno)
#define USBTINY_SET 4 // Set bit (wIndex:address, wValue:bitno)
// Programming requests
#define USBTINY_POWERUP 5 // apply power (wValue:SCK-period, wIndex:RESET)
#define USBTINY_POWERDOWN 6 // remove power from chip
#define USBTINY_SPI 7 // issue SPI command (wValue:c1c0, wIndex:c3c2)
#define USBTINY_POLL_BYTES 8 // set poll bytes for write (wValue:p1p2)
#define USBTINY_FLASH_READ 9 // read flash (wIndex:address)
#define USBTINY_FLASH_WRITE 10 // write flash (wIndex:address, wValue:timeout)
#define USBTINY_EEPROM_READ 11 // read eeprom (wIndex:address)
#define USBTINY_EEPROM_WRITE 12 // write eeprom (wIndex:address, wValue:timeout)
#define USBTINY_POWERUP 5 // Apply power (wValue:SCK-period, wIndex:RESET)
#define USBTINY_POWERDOWN 6 // Remove power from chip
#define USBTINY_SPI 7 // Issue SPI command (wValue:c1c0, wIndex:c3c2)
#define USBTINY_POLL_BYTES 8 // Set poll bytes for write (wValue:p1p2)
#define USBTINY_FLASH_READ 9 // Read flash (wIndex:address)
#define USBTINY_FLASH_WRITE 10 // Write flash (wIndex:address, wValue:timeout)
#define USBTINY_EEPROM_READ 11 // Read eeprom (wIndex:address)
#define USBTINY_EEPROM_WRITE 12 // Write eeprom (wIndex:address, wValue:timeout)
// Flags to indicate how to set RESET on power up
#define RESET_LOW 0
#define RESET_HIGH 1
#define RESET_LOW 0
#define RESET_HIGH 1
// The SCK speed can be set by avrdude, to allow programming of slow-clocked parts
#define SCK_MIN 1 // usec delay (target clock >= 4 MHz)
#define SCK_MAX 250 // usec (target clock >= 16 kHz)
#define SCK_DEFAULT 10 // usec (target clock >= 0.4 MHz)
#define SCK_MIN 1 // usec delay (target clock >= 4 MHz)
#define SCK_MAX 250 // usec (target clock >= 16 kHz)
#define SCK_DEFAULT 10 // usec (target clock >= 0.4 MHz)
// How much data, max, do we want to send in one USB packet?
#define CHUNK_SIZE 128 // must be power of 2 less than 256
#define CHUNK_SIZE 128 // Must be power of 2 less than 256
// The default USB Timeout
#define USB_TIMEOUT 500 // msec
#define USB_TIMEOUT 500 // msec
#ifdef __cplusplus
extern "C" {
#endif
extern const char usbtiny_desc[];
void usbtiny_initpgm(PROGRAMMER *pgm);
extern const char usbtiny_desc[];
void usbtiny_initpgm(PROGRAMMER *pgm);
#ifdef __cplusplus
}
#endif
#endif /* usbtiny_h */
#endif