From ad9225bdd34230e13333be5d4c29e4f96abc9b2b Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 4 Jan 2018 20:12:48 +1100 Subject: Update copyrights for 2018. --- LUFA/Drivers/USB/Class/Device/CDCClassDevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Device/CDCClassDevice.h') diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h index 9d5c4e5a0..4b307fc9e 100644 --- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h +++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2017. + Copyright (C) Dean Camera, 2018. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted -- cgit v1.2.3 From 2028e82e455a3d4caab3ad47b0c3a0815e1c1ae6 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 18 Feb 2018 19:58:33 +1100 Subject: Fixed CDC class Send_Device_*_P() and Send_Host_*_P() variant functions not compiled out for UC3 architecture. --- LUFA/Drivers/USB/Class/Device/CDCClassDevice.h | 56 +++++++++++++++----------- 1 file changed, 32 insertions(+), 24 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Device/CDCClassDevice.h') diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h index 4b307fc9e..6fea69176 100644 --- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h +++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h @@ -182,27 +182,25 @@ void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1); - /** Sends a given data buffer to the attached USB host, if connected. If a host is not connected when the function is - * called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank - * becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows - * for multiple bytes to be packed into a single endpoint packet, increasing data throughput. + /** Sends a given null terminated string to the attached USB host, if connected. If a host is not connected when + * the function is called, the string is discarded. Bytes will be queued for transmission to the host until either + * the endpoint bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to + * the host. This allows for multiple bytes to be packed into a single endpoint packet, increasing data throughput. * * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. - * \param[in] Buffer Pointer to a buffer containing the data to send to the device. - * \param[in] Length Length of the data to send to the host. + * \param[in] String Pointer to the null terminated string to send to the host. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ - uint8_t CDC_Device_SendData(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, - const void* const Buffer, - const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, + const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); - /** Sends a given data buffer from PROGMEM space to the attached USB host, if connected. If a host is not connected when the - * function is called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint - * bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows + /** Sends a given data buffer to the attached USB host, if connected. If a host is not connected when the function is + * called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank + * becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows * for multiple bytes to be packed into a single endpoint packet, increasing data throughput. * * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or @@ -214,41 +212,51 @@ * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ - uint8_t CDC_Device_SendData_P(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, + uint8_t CDC_Device_SendData(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const void* const Buffer, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); - /** Sends a given null terminated string to the attached USB host, if connected. If a host is not connected when - * the function is called, the string is discarded. Bytes will be queued for transmission to the host until either + /** Sends a given null terminated string from PROGMEM space to the attached USB host, if connected. If a host is not connected + * when the function is called, the string is discarded. Bytes will be queued for transmission to the host until either * the endpoint bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to * the host. This allows for multiple bytes to be packed into a single endpoint packet, increasing data throughput. * * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * + * \note This function does not exist on architectures that do not have a separate flash memory space. + * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. * \param[in] String Pointer to the null terminated string to send to the host. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ - uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, - const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE) + uint8_t CDC_Device_SendString_P(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, + const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + #endif - /** Sends a given null terminated string from PROGMEM space to the attached USB host, if connected. If a host is not connected - * when the function is called, the string is discarded. Bytes will be queued for transmission to the host until either - * the endpoint bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to - * the host. This allows for multiple bytes to be packed into a single endpoint packet, increasing data throughput. + /** Sends a given data buffer from PROGMEM space to the attached USB host, if connected. If a host is not connected when the + * function is called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint + * bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows + * for multiple bytes to be packed into a single endpoint packet, increasing data throughput. * * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or * the call will fail. * + * \note This function does not exist on architectures that do not have a separate flash memory space. + * * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. - * \param[in] String Pointer to the null terminated string to send to the host. + * \param[in] Buffer Pointer to a buffer containing the data to send to the device. + * \param[in] Length Length of the data to send to the host. * * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. */ - uint8_t CDC_Device_SendString_P(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, - const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE) + uint8_t CDC_Device_SendData_P(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, + const void* const Buffer, + const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + #endif /** Sends a given byte to the attached USB host, if connected. If a host is not connected when the function is called, the * byte is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the -- cgit v1.2.3 From d8e0d67caefa312970787645180ec5db2eff92cb Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 17 Jun 2018 15:44:28 +1000 Subject: Remove unneccesary ATTR_CONST from stub functions (thanks to NicoHood). --- LUFA/Drivers/USB/Class/Device/CDCClassDevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LUFA/Drivers/USB/Class/Device/CDCClassDevice.h') diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h index 6fea69176..318920f55 100644 --- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h +++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h @@ -370,7 +370,7 @@ static int CDC_Device_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1); #endif - void CDC_Device_Event_Stub(void) ATTR_CONST; + void CDC_Device_Event_Stub(void); void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub); -- cgit v1.2.3 From a08a02481ba9e68933ad0b89483f5328767df9f3 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 17 Jun 2018 16:06:07 +1000 Subject: Fix mismatched aliased event and event stub function prototypes. --- LUFA/Drivers/USB/Class/Device/CDCClassDevice.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Device/CDCClassDevice.h') diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h index 318920f55..2e327ef22 100644 --- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h +++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h @@ -370,7 +370,8 @@ static int CDC_Device_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1); #endif - void CDC_Device_Event_Stub(void); + void CDC_Device_Event_Stub(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); + void CDC_Device_Event_Stub_2(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t _1); void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub); @@ -378,7 +379,7 @@ ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub); void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Duration) ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) - ATTR_ALIAS(CDC_Device_Event_Stub); + ATTR_ALIAS(CDC_Device_Event_Stub_2); #endif #endif -- cgit v1.2.3 From 39fa8337db0e63e959368bc384adb3abb9e9a4e8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Fri, 7 Dec 2018 22:54:53 +1100 Subject: Fix Doxygen documentation for conditionally enabled functions. --- LUFA/Drivers/USB/Class/Device/CDCClassDevice.h | 62 +++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Device/CDCClassDevice.h') diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h index 2e327ef22..69dcff3d6 100644 --- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h +++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h @@ -216,43 +216,43 @@ const void* const Buffer, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); - /** Sends a given null terminated string from PROGMEM space to the attached USB host, if connected. If a host is not connected - * when the function is called, the string is discarded. Bytes will be queued for transmission to the host until either - * the endpoint bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to - * the host. This allows for multiple bytes to be packed into a single endpoint packet, increasing data throughput. - * - * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or - * the call will fail. - * - * \note This function does not exist on architectures that do not have a separate flash memory space. - * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. - * \param[in] String Pointer to the null terminated string to send to the host. - * - * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. - */ #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE) + /** Sends a given null terminated string from PROGMEM space to the attached USB host, if connected. If a host is not connected + * when the function is called, the string is discarded. Bytes will be queued for transmission to the host until either + * the endpoint bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to + * the host. This allows for multiple bytes to be packed into a single endpoint packet, increasing data throughput. + * + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or + * the call will fail. + * + * \note This function does not exist on architectures that do not have a separate flash memory space. + * + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in] String Pointer to the null terminated string to send to the host. + * + * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. + */ uint8_t CDC_Device_SendString_P(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); #endif - /** Sends a given data buffer from PROGMEM space to the attached USB host, if connected. If a host is not connected when the - * function is called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint - * bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows - * for multiple bytes to be packed into a single endpoint packet, increasing data throughput. - * - * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or - * the call will fail. - * - * \note This function does not exist on architectures that do not have a separate flash memory space. - * - * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. - * \param[in] Buffer Pointer to a buffer containing the data to send to the device. - * \param[in] Length Length of the data to send to the host. - * - * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. - */ #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE) + /** Sends a given data buffer from PROGMEM space to the attached USB host, if connected. If a host is not connected when the + * function is called, the string is discarded. Bytes will be queued for transmission to the host until either the endpoint + * bank becomes full, or the \ref CDC_Device_Flush() function is called to flush the pending data to the host. This allows + * for multiple bytes to be packed into a single endpoint packet, increasing data throughput. + * + * \pre This function must only be called when the Device state machine is in the \ref DEVICE_STATE_Configured state or + * the call will fail. + * + * \note This function does not exist on architectures that do not have a separate flash memory space. + * + * \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state. + * \param[in] Buffer Pointer to a buffer containing the data to send to the device. + * \param[in] Length Length of the data to send to the host. + * + * \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum. + */ uint8_t CDC_Device_SendData_P(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const void* const Buffer, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); -- cgit v1.2.3 From 101ed6b74e0d6549e53a7c8216147af37ffc70df Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 8 Jan 2019 19:59:41 +1100 Subject: Documentation: Update copyrights to 2019. --- LUFA/Drivers/USB/Class/Device/CDCClassDevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Device/CDCClassDevice.h') diff --git a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h index 69dcff3d6..1a9b211d9 100644 --- a/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h +++ b/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2018. + Copyright (C) Dean Camera, 2019. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2019 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted -- cgit v1.2.3