From 1f43fa076db5ce6731aee08b3bb06022cc0b1a8f Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Sat, 4 May 2024 20:20:47 +0200 Subject: [PATCH] Optimize LUFA config for size --- lib/Descriptors.h | 10 +++++----- lib/lufa_config.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Descriptors.h b/lib/Descriptors.h index b6789d6..8fd409d 100644 --- a/lib/Descriptors.h +++ b/lib/Descriptors.h @@ -42,14 +42,14 @@ #include "lufa/LUFA/Drivers/USB/USB.h" /* Macros: */ -/** Endpoint address of the CDC device-to-host notification IN endpoint. */ -#define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2) - /** Endpoint address of the CDC device-to-host data IN endpoint. */ -#define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3) +#define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1) /** Endpoint address of the CDC host-to-device data OUT endpoint. */ -#define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4) +#define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2) + +/** Endpoint address of the CDC device-to-host notification IN endpoint. */ +#define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 3) /** Size in bytes of the CDC device-to-host notification IN endpoint. */ #define CDC_NOTIFICATION_EPSIZE 8 diff --git a/lib/lufa_config.h b/lib/lufa_config.h index 53eac10..d9e25c7 100644 --- a/lib/lufa_config.h +++ b/lib/lufa_config.h @@ -2,7 +2,7 @@ #define USB_DEVICE_ONLY #define DEVICE_STATE_AS_GPIOR 0 -// #define ORDERED_EP_CONFIG +#define ORDERED_EP_CONFIG #define FIXED_CONTROL_ENDPOINT_SIZE 8 #define FIXED_NUM_CONFIGURATIONS 1 #define INTERRUPT_CONTROL_ENDPOINT @@ -11,7 +11,7 @@ #define NO_INTERNAL_SERIAL #define NO_DEVICE_SELF_POWER #define NO_DEVICE_REMOTE_WAKEUP -// #define NO_SOF_EVENTS +#define NO_SOF_EVENTS #define F_USB F_CPU #define DEVICE_VID 0x2C99 #define DEVICE_PID 0x0004