Changeset 8659a17 in avrstuff for V-USB_Dev/firmwares/herePic/main.c


Ignore:
Timestamp:
Sep 3, 2012, 8:21:47 PM (12 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
c8ec8ce
Parents:
f0689d3
Message:

Progress on the host driver. Still untested.

git-svn-id: svn://pulkomandy.tk/avrstuff@66 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

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 devices
    2  * Copyright 2012, Adrien Destugues <pulkomandy@pulkomandy.tk>
    3  *
    4  * This file is distributed under the terms of the MIT licence.
    5  */
    61
    72/* This project is targetted at the VUSBDev hacking board. */
     
    1712
    1813#include "usbdrv/usbdrv.h"
     14#include "shared.h"
    1915
    2016// IO pins:
     
    3935// Timers may make it easier to do that in parallel with the USB handling, since
    4036// 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 are
    44 // ignored.
    45 // We also use these as USB commands for now, but we may do otherwise, since
    46 // 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 such
    48 // things.
    49 typedef enum
    50 {
    51         // HOST to DEVICE
    52         LoadConfigWord          =   0b0000,
    53         LoadCodeWord            =   0b0010,
    54         LoadDataWord            =   0b0011,
    55 
    56         // Configuration
    57         NextAddress                     =   0b0110,
    58         BeginEraseProgram       = 0b001000,
    59         BeginProgramOnly        = 0b011000,
    60         BulkEraseCode           =   0b1001,
    61         BulkEraseData           =   0b1011,
    62         BulkEraseConfig1        = 0b000001,
    63         BulkEraseConfig2        = 0b000111,
    64 
    65         // DEVICE to HOST
    66         ReadCodeWord            =   0b0100,
    67         ReadDataWord            =   0b0101,
    68 } ICSPCommands;
    6937
    7038
Note: See TracChangeset for help on using the changeset viewer.