Changeset 8659a17 in avrstuff for V-USB_Dev/firmwares/herePic/main.c
- Timestamp:
- Sep 3, 2012, 8:21:47 PM (12 years ago)
- Branches:
- main
- Children:
- c8ec8ce
- Parents:
- f0689d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
V-USB_Dev/firmwares/herePic/main.c
rf0689d3 r8659a17 1 /* HEREPIC - AVR-based ICSP programmer for microchip PIC16F6xx and 16F8xx devices2 * Copyright 2012, Adrien Destugues <pulkomandy@pulkomandy.tk>3 *4 * This file is distributed under the terms of the MIT licence.5 */6 1 7 2 /* This project is targetted at the VUSBDev hacking board. */ … … 17 12 18 13 #include "usbdrv/usbdrv.h" 14 #include "shared.h" 19 15 20 16 // IO pins: … … 39 35 // Timers may make it easier to do that in parallel with the USB handling, since 40 36 // timings are in the nanosecond range. 41 42 43 // ICSP commands are 6-bit wide, for most of them (but not all) the 2 MSb are44 // ignored.45 // We also use these as USB commands for now, but we may do otherwise, since46 // transferring only 14 data bytes in an USB frame is quite a bit of waste.47 // We need some custom commands on USB side as well, to reset the PIC and such48 // things.49 typedef enum50 {51 // HOST to DEVICE52 LoadConfigWord = 0b0000,53 LoadCodeWord = 0b0010,54 LoadDataWord = 0b0011,55 56 // Configuration57 NextAddress = 0b0110,58 BeginEraseProgram = 0b001000,59 BeginProgramOnly = 0b011000,60 BulkEraseCode = 0b1001,61 BulkEraseData = 0b1011,62 BulkEraseConfig1 = 0b000001,63 BulkEraseConfig2 = 0b000111,64 65 // DEVICE to HOST66 ReadCodeWord = 0b0100,67 ReadDataWord = 0b0101,68 } ICSPCommands;69 37 70 38
Note:
See TracChangeset
for help on using the changeset viewer.