Add partial project documentation to the incomplete PrinterHost demo.
[pub/USBasp.git] / Demos / Host / Incomplete / PrinterHost / Lib / PrinterCommands.h
index e9c1d9f..01f1f14 100644 (file)
 \r
        /* Includes: */\r
                #include <avr/io.h>\r
 \r
        /* Includes: */\r
                #include <avr/io.h>\r
+               #include <string.h>\r
 \r
                #include <LUFA/Drivers/USB/USB.h>\r
 \r
        /* Macros: */\r
 \r
                #include <LUFA/Drivers/USB/USB.h>\r
 \r
        /* Macros: */\r
-               #define PROTOCOL_UNIDIRECTIONAL      0x01\r
-               #define PROTOCOL_BIDIRECTIONAL       0x02\r
-               #define PROTOCOL_IEEE1284            0x03\r
-               \r
+               /** Printer class-specific request to retrieve the printer's ID string */\r
                #define GET_DEVICE_ID                0\r
                #define GET_DEVICE_ID                0\r
+\r
+               /** Printer class-specific request to retrieve the printer's virtual port status flags */\r
                #define GET_PORT_STATUS              1\r
                #define GET_PORT_STATUS              1\r
+\r
+               /** Printer class-specific request to soft-reset the device */\r
                #define SOFT_RESET                   2\r
 \r
                #define SOFT_RESET                   2\r
 \r
-       /* Type Defines: */\r
-               typedef struct\r
-               {\r
-                       uint16_t Length;\r
-                       uint8_t  String[128];\r
-               } Device_ID_String_t;\r
+               /** Pipe number of the Printer data IN pipe */\r
+               #define PRINTER_DATA_IN_PIPE         1\r
+\r
+               /** Pipe number of the Printer data OUT pipe */\r
+               #define PRINTER_DATA_OUT_PIPE        2\r
                \r
        /* Function Prototypes: */\r
                \r
        /* Function Prototypes: */\r
-               uint8_t Printer_GetDeviceID(Device_ID_String_t* DeviceIDString);\r
+               uint8_t Printer_SendData(char* PrinterCommands);\r
+               uint8_t Printer_GetDeviceID(char* DeviceIDString, uint8_t BufferSize);\r
                uint8_t Printer_GetPortStatus(uint8_t* PortStatus);\r
                uint8_t Printer_SoftReset(void);\r
        \r
                uint8_t Printer_GetPortStatus(uint8_t* PortStatus);\r
                uint8_t Printer_SoftReset(void);\r
        \r