diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-07-21 16:19:32 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-07-21 16:19:32 +0000 |
commit | 6bda628718f67c04ed43e8328f55bdce5319c504 (patch) | |
tree | efd08eefa90cef94440f880a70902f5803fb12a7 /Demos/Host/LowLevel/PrinterHost | |
parent | 83e293a6ec98c7faad1b76dd312b31b86cbeecc1 (diff) | |
download | lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.gz lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.bz2 lufa-6bda628718f67c04ed43e8328f55bdce5319c504.zip |
Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability.
Add missing const qualifiers to the demos.
Diffstat (limited to 'Demos/Host/LowLevel/PrinterHost')
4 files changed, 15 insertions, 9 deletions
diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c index 5f3effa7b..024895991 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c @@ -44,7 +44,8 @@ * * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum */ -uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t CommandSize) +uint8_t Printer_SendData(const void* const PrinterCommands, + const uint16_t CommandSize) { uint8_t ErrorCode; @@ -74,7 +75,8 @@ uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t Comma * * \return A value from the USB_Host_SendControlErrorCodes_t enum */ -uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize) +uint8_t Printer_GetDeviceID(char* DeviceIDString, + const uint16_t BufferSize) { uint8_t ErrorCode = HOST_SENDCONTROL_Successful; uint16_t DeviceIDStringLength = 0; diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h index cbc54564c..8c3bd3316 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h @@ -59,9 +59,11 @@ #define PRINTER_DATA_OUT_PIPE 2 /* Function Prototypes: */ - uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t CommandSize); - uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize); - uint8_t Printer_GetPortStatus(uint8_t* PortStatus); + uint8_t Printer_SendData(const void* const PrinterCommands, + const uint16_t CommandSize); + uint8_t Printer_GetDeviceID(char* DeviceIDString, + const uint16_t BufferSize); + uint8_t Printer_GetPortStatus(uint8_t* const PortStatus); uint8_t Printer_SoftReset(void); #endif diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c index b6f3efae3..f12c95ef9 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c @@ -98,7 +98,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void) } /** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */ -void EVENT_USB_Host_HostError(uint8_t ErrorCode) +void EVENT_USB_Host_HostError(const uint8_t ErrorCode) { USB_ShutDown(); @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(uint8_t ErrorCode) /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while * enumerating an attached USB device. */ -void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, + const uint8_t SubErrorCode) { printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n" " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h index 99bbd4a66..78583f0e4 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h @@ -74,8 +74,9 @@ void EVENT_USB_Host_DeviceAttached(void); void EVENT_USB_Host_DeviceUnattached(void); void EVENT_USB_Host_DeviceEnumerationComplete(void); - void EVENT_USB_Host_HostError(uint8_t ErrorCode); - void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode); + void EVENT_USB_Host_HostError(const uint8_t ErrorCode); + void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, + const uint8_t SubErrorCode); void SetupHardware(void); |