X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/c1a1b6eeecb375259968ef6d989833312047f2d8..18b0d408a9e68cbc1ce36da89d74a799d7fc31de:/Bootloaders/CDC/BootloaderCDC.h diff --git a/Bootloaders/CDC/BootloaderCDC.h b/Bootloaders/CDC/BootloaderCDC.h index 0d8f1e3d8..d83b27f5e 100644 --- a/Bootloaders/CDC/BootloaderCDC.h +++ b/Bootloaders/CDC/BootloaderCDC.h @@ -41,11 +41,12 @@ #include #include #include + #include #include #include "Descriptors.h" - #include // USB Functionality + #include /* Macros: */ /** CDC Class Specific request to get the line encoding on a CDC-ACM virtual serial port, including the @@ -76,17 +77,7 @@ #define BOOTLOADER_HWVERSION_MINOR 0x00 /** Eight character bootloader firmware identifier reported to the host when requested */ - #define SOFTWARE_IDENTIFIER "LUFA-CDC" - - /* Event Handlers: */ - /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */ - HANDLES_EVENT(USB_Disconnect); - - /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */ - HANDLES_EVENT(USB_ConfigurationChanged); - - /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */ - HANDLES_EVENT(USB_UnhandledControlPacket); + #define SOFTWARE_IDENTIFIER "LUFACDC" /* Type Defines: */ /** Type define for a non-returning pointer to the start of the loaded application in flash memory. */ @@ -113,7 +104,7 @@ }; /** Enum for the possible parity modes on a CDC-ACM virtual serial port */ - enum BootloaderCDC_CDC_LineCodeingParity_t + enum BootloaderCDC_CDC_LineCodingParity_t { Parity_None = 0, /**< No data parity checking */ Parity_Odd = 1, /**< Odd data parity checking */ @@ -122,14 +113,18 @@ Parity_Space = 4, /**< Space data parity checking */ }; - /* Tasks: */ - TASK(CDC_Task); - /* Function Prototypes: */ + void CDC_Task(void); + void SetupHardware(void); + void ResetHardware(void); + + void EVENT_USB_Device_ConfigurationChanged(void); + void EVENT_USB_Device_UnhandledControlRequest(void); + #if defined(INCLUDE_FROM_BOOTLOADERCDC_C) || defined(__DOXYGEN__) - static void ProgramReadWriteMemoryBlock(const uint8_t Command); + static void ReadWriteMemoryBlock(const uint8_t Command); static uint8_t FetchNextCommandByte(void); - static void WriteNextResponseByte(const uint8_t Response); + static void WriteNextResponseByte(const uint8_t Response); #endif #endif