X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/a54ed0085b29f81946f3652bd412103292da7589..f3c061d5c8ef95a0bd2ec829cc1d7461af94a845:/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.h diff --git a/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.h b/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.h index e9c1d9fb9..4656d190e 100644 --- a/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.h +++ b/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.h @@ -33,27 +33,36 @@ /* Includes: */ #include + #include #include /* Macros: */ - #define PROTOCOL_UNIDIRECTIONAL 0x01 - #define PROTOCOL_BIDIRECTIONAL 0x02 - #define PROTOCOL_IEEE1284 0x03 - + /** Printer class-specific request to retrieve the printer's ID string */ #define GET_DEVICE_ID 0 + + /** Printer class-specific request to retrieve the printer's virtual port status flags */ #define GET_PORT_STATUS 1 + + /** Printer class-specific request to soft-reset the device */ #define SOFT_RESET 2 + /** Pipe number of the Printer data IN pipe */ + #define PRINTER_DATA_IN_PIPE 1 + + /** Pipe number of the Printer data OUT pipe */ + #define PRINTER_DATA_OUT_PIPE 2 + /* Type Defines: */ typedef struct { + char* Data; uint16_t Length; - uint8_t String[128]; - } Device_ID_String_t; + } Printer_Data_t; /* Function Prototypes: */ - uint8_t Printer_GetDeviceID(Device_ID_String_t* DeviceIDString); + uint8_t Printer_SendData(Printer_Data_t* PrinterCommands); + uint8_t Printer_GetDeviceID(char* DeviceIDString, uint16_t BufferSize); uint8_t Printer_GetPortStatus(uint8_t* PortStatus); uint8_t Printer_SoftReset(void);