diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_0.h b/.ci/USB/Host/RTE/USB/USBH_Config_0.h index 6681bd1a..d6f3cdd0 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_0.h +++ b/.ci/USB/Host/RTE/USB/USBH_Config_0.h @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH0_HC_NUM 0 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH0_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH0_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH0_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH0_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH0_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH0_HC_MEM_POOL_SECTION_NAME ".driver.usbh0" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH0_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_0.h.base@8.0.0 b/.ci/USB/Host/RTE/USB/USBH_Config_0.h.base@8.0.0 index 6681bd1a..d6f3cdd0 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_0.h.base@8.0.0 +++ b/.ci/USB/Host/RTE/USB/USBH_Config_0.h.base@8.0.0 @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH0_HC_NUM 0 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH0_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH0_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH0_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH0_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH0_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH0_HC_MEM_POOL_SECTION_NAME ".driver.usbh0" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH0_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_1.h b/.ci/USB/Host/RTE/USB/USBH_Config_1.h index f1a82f7b..be394d85 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_1.h +++ b/.ci/USB/Host/RTE/USB/USBH_Config_1.h @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH1_HC_NUM 1 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH1_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH1_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH1_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH1_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH1_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH1_HC_MEM_POOL_SECTION_NAME ".driver.usbh1" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH1_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_1.h.base@8.0.0 b/.ci/USB/Host/RTE/USB/USBH_Config_1.h.base@8.0.0 index f1a82f7b..be394d85 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_1.h.base@8.0.0 +++ b/.ci/USB/Host/RTE/USB/USBH_Config_1.h.base@8.0.0 @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH1_HC_NUM 1 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH1_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH1_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH1_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH1_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH1_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH1_HC_MEM_POOL_SECTION_NAME ".driver.usbh1" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH1_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_2.h b/.ci/USB/Host/RTE/USB/USBH_Config_2.h index 200a23c6..56eeafc6 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_2.h +++ b/.ci/USB/Host/RTE/USB/USBH_Config_2.h @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH2_HC_NUM 2 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH2_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH2_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH2_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH2_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH2_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH2_HC_MEM_POOL_SECTION_NAME ".driver.usbh2" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH2_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_2.h.base@8.0.0 b/.ci/USB/Host/RTE/USB/USBH_Config_2.h.base@8.0.0 index 200a23c6..56eeafc6 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_2.h.base@8.0.0 +++ b/.ci/USB/Host/RTE/USB/USBH_Config_2.h.base@8.0.0 @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH2_HC_NUM 2 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH2_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH2_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH2_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH2_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH2_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH2_HC_MEM_POOL_SECTION_NAME ".driver.usbh2" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH2_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_3.h b/.ci/USB/Host/RTE/USB/USBH_Config_3.h index 5a3bd30f..e07468a9 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_3.h +++ b/.ci/USB/Host/RTE/USB/USBH_Config_3.h @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH3_HC_NUM 3 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH3_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH3_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH3_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH3_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH3_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH3_HC_MEM_POOL_SECTION_NAME ".driver.usbh3" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH3_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/.ci/USB/Host/RTE/USB/USBH_Config_3.h.base@8.0.0 b/.ci/USB/Host/RTE/USB/USBH_Config_3.h.base@8.0.0 index 5a3bd30f..e07468a9 100644 --- a/.ci/USB/Host/RTE/USB/USBH_Config_3.h.base@8.0.0 +++ b/.ci/USB/Host/RTE/USB/USBH_Config_3.h.base@8.0.0 @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH3_HC_NUM 3 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH3_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH3_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH3_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH3_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH3_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH3_HC_MEM_POOL_SECTION_NAME ".driver.usbh3" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH3_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/Components/USB/Config/USBH_Config.h b/Components/USB/Config/USBH_Config.h index 23fd2bbf..501d9964 100644 --- a/Components/USB/Config/USBH_Config.h +++ b/Components/USB/Config/USBH_Config.h @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH%Instance%_HC_NUM %Instance% -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH%Instance%_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH%Instance%_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH%Instance%_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH%Instance%_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH%Instance%_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH%Instance%_HC_MEM_POOL_SECTION_NAME ".driver.usbh%Instance%" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH%Instance%_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/Components/USB/Source/usbh_config.c b/Components/USB/Source/usbh_config.c index 880d5329..0d652961 100644 --- a/Components/USB/Source/usbh_config.c +++ b/Components/USB/Source/usbh_config.c @@ -57,7 +57,7 @@ extern void USBH_SignalPipeEvent (uint8_t ctrl, ARM_USBH_EP_HANDLE ep_hndl, uin static const uint8_t usbh0_power = (uint8_t)(USBH0_HC_POWER / 2); static const uint32_t usbh0_pipe_num = USBH0_HC_PIPE_NUM; static const uint32_t usbh0_mem_pool_size = USBH0_HC_MEM_POOL_SIZE; -static const uint8_t usbh0_mem_pool_reloc = USBH0_HC_MEM_POOL_RELOC; +static const uint8_t usbh0_mem_pool_locate = USBH0_HC_MEM_POOL_LOCATE; USBH_PIPE usbh0_pipe [USBH0_HC_PIPE_NUM]; static uint32_t usbh0_mem_pool [USBH0_HC_MEM_POOL_SIZE / 4] USBH0_HC_MEM_POOL_SECTION; static ARM_DRIVER_USBH *usbh0_hcd_ptr = &USBHn_DRIVER(USBH0_HC_NUM); @@ -99,7 +99,7 @@ static const osThreadAttr_t usbh0_core_thread_attr = { static const uint8_t usbh1_power = (uint8_t)(USBH1_HC_POWER / 2); static const uint32_t usbh1_pipe_num = USBH1_HC_PIPE_NUM; static const uint32_t usbh1_mem_pool_size = USBH1_HC_MEM_POOL_SIZE; -static const uint8_t usbh1_mem_pool_reloc = USBH1_HC_MEM_POOL_RELOC; +static const uint8_t usbh1_mem_pool_locate = USBH1_HC_MEM_POOL_LOCATE; USBH_PIPE usbh1_pipe [USBH1_HC_PIPE_NUM]; static uint32_t usbh1_mem_pool [USBH1_HC_MEM_POOL_SIZE / 4] USBH1_HC_MEM_POOL_SECTION; static ARM_DRIVER_USBH *usbh1_hcd_ptr = &USBHn_DRIVER(USBH1_HC_NUM); @@ -141,7 +141,7 @@ static const osThreadAttr_t usbh1_core_thread_attr = { static const uint8_t usbh2_power = (uint8_t)(USBH2_HC_POWER / 2); static const uint32_t usbh2_pipe_num = USBH2_HC_PIPE_NUM; static const uint32_t usbh2_mem_pool_size = USBH2_HC_MEM_POOL_SIZE; -static const uint8_t usbh2_mem_pool_reloc = USBH2_HC_MEM_POOL_RELOC; +static const uint8_t usbh2_mem_pool_locate = USBH2_HC_MEM_POOL_LOCATE; USBH_PIPE usbh2_pipe [USBH2_HC_PIPE_NUM]; static uint32_t usbh2_mem_pool [USBH2_HC_MEM_POOL_SIZE / 4] USBH2_HC_MEM_POOL_SECTION; static ARM_DRIVER_USBH *usbh2_hcd_ptr = &USBHn_DRIVER(USBH2_HC_NUM); @@ -183,7 +183,7 @@ static const osThreadAttr_t usbh2_core_thread_attr = { static const uint8_t usbh3_power = (uint8_t)(USBH3_HC_POWER / 2); static const uint32_t usbh3_pipe_num = USBH3_HC_PIPE_NUM; static const uint32_t usbh3_mem_pool_size = USBH3_HC_MEM_POOL_SIZE; -static const uint8_t usbh3_mem_pool_reloc = USBH3_HC_MEM_POOL_RELOC; +static const uint8_t usbh3_mem_pool_locate = USBH3_HC_MEM_POOL_LOCATE; USBH_PIPE usbh3_pipe [USBH3_HC_PIPE_NUM]; static uint32_t usbh3_mem_pool [USBH3_HC_MEM_POOL_SIZE / 4] USBH3_HC_MEM_POOL_SECTION; static ARM_DRIVER_USBH *usbh3_hcd_ptr = &USBHn_DRIVER(USBH3_HC_NUM); @@ -254,18 +254,18 @@ const uint8_t * const usbh_power_ptr [USBH_HC_NUM] = { #endif }; -const uint8_t * const usbh_mem_pool_reloc_ptr [USBH_HC_NUM] = { +const uint8_t * const usbh_mem_pool_locate_ptr [USBH_HC_NUM] = { #ifdef RTE_USB_Host_0 - &usbh0_mem_pool_reloc + &usbh0_mem_pool_locate #endif #ifdef RTE_USB_Host_1 - , &usbh1_mem_pool_reloc + , &usbh1_mem_pool_locate #endif #ifdef RTE_USB_Host_2 - , &usbh2_mem_pool_reloc + , &usbh2_mem_pool_locate #endif #ifdef RTE_USB_Host_3 - , &usbh3_mem_pool_reloc + , &usbh3_mem_pool_locate #endif }; diff --git a/Components/USB/Source/usbh_config.h b/Components/USB/Source/usbh_config.h index 7d824b2f..3bd425e5 100644 --- a/Components/USB/Source/usbh_config.h +++ b/Components/USB/Source/usbh_config.h @@ -119,7 +119,7 @@ extern USBH_PIPE usbh3_pipe[]; #endif extern const uint8_t * const usbh_power_ptr []; -extern const uint8_t * const usbh_mem_pool_reloc_ptr []; +extern const uint8_t * const usbh_mem_pool_locate_ptr[]; extern uint32_t * const usbh_mem_pool_ptr []; extern const uint32_t * const usbh_mem_pool_size_ptr []; extern USBH_PIPE * const usbh_pipe_ptr []; diff --git a/Components/USB/Source/usbh_lib_core.c b/Components/USB/Source/usbh_lib_core.c index f21ac139..0e5415bb 100644 --- a/Components/USB/Source/usbh_lib_core.c +++ b/Components/USB/Source/usbh_lib_core.c @@ -833,7 +833,7 @@ usbStatus USBH_PipeReceive (USBH_PIPE_HANDLE pipe_hndl, uint8_t *buf, uint32_t l remain_len = len; max_data_len = len; - if (*usbh_mem_pool_reloc_ptr[ctrl] != 0U) { // If memory relocation is enabled + if (*usbh_mem_pool_locate_ptr[ctrl] != 0U) { // If memory pool location is enabled if (remain_len == 0U) { // If ZLP is requested alloc_mem = false; } else { @@ -1106,7 +1106,7 @@ usbStatus USBH_PipeSend (USBH_PIPE_HANDLE pipe_hndl, const uint8_t *buf, uint32_ remain_len = len; max_data_len = len; - if (*usbh_mem_pool_reloc_ptr[ctrl] != 0U) { // If memory relocation is enabled + if (*usbh_mem_pool_locate_ptr[ctrl] != 0U) { // If memory pool location is enabled if (len == 0U) { // If ZLP is requested alloc_mem = false; } else { @@ -2552,7 +2552,7 @@ static usbStatus USBH_PipeSendSetup (USBH_PIPE_HANDLE pipe_hndl, const USB_SETUP ptr_pipe->locked = 1U; - if (*usbh_mem_pool_reloc_ptr[ctrl] != 0U) { // If memory relocation is enabled + if (*usbh_mem_pool_locate_ptr[ctrl] != 0U) { // If memory pool location is enabled alloc_mem = !USBH_MemoryIsInPool (ctrl, (const uint8_t *)setup_packet); if (alloc_mem) { // If memory for USB must be relocated, allocate 8 bytes for SETUP packet diff --git a/Components/USB/Source/usbh_section.h b/Components/USB/Source/usbh_section.h index a572b6f8..90ece03e 100644 --- a/Components/USB/Source/usbh_section.h +++ b/Components/USB/Source/usbh_section.h @@ -16,7 +16,7 @@ #define USBHn_HC_MEM_POOL_SECTION_(str) __attribute__((section(str))) #ifdef USBH0_HC_NUM -#if (USBH0_HC_MEM_POOL_RELOC == 1) +#if (USBH0_HC_MEM_POOL_LOCATE == 1) #define USBH0_HC_MEM_POOL_SECTION USBHn_HC_MEM_POOL_SECTION_(USBH0_HC_MEM_POOL_SECTION_NAME) #else #define USBH0_HC_MEM_POOL_SECTION @@ -24,7 +24,7 @@ #endif #ifdef USBH1_HC_NUM -#if (USBH1_HC_MEM_POOL_RELOC == 1) +#if (USBH1_HC_MEM_POOL_LOCATE == 1) #define USBH1_HC_MEM_POOL_SECTION USBHn_HC_MEM_POOL_SECTION_(USBH1_HC_MEM_POOL_SECTION_NAME) #else #define USBH1_HC_MEM_POOL_SECTION @@ -32,7 +32,7 @@ #endif #ifdef USBH2_HC_NUM -#if (USBH2_HC_MEM_POOL_RELOC == 1) +#if (USBH2_HC_MEM_POOL_LOCATE == 1) #define USBH2_HC_MEM_POOL_SECTION USBHn_HC_MEM_POOL_SECTION_(USBH2_HC_MEM_POOL_SECTION_NAME) #else #define USBH2_HC_MEM_POOL_SECTION @@ -40,7 +40,7 @@ #endif #ifdef USBH3_HC_NUM -#if (USBH3_HC_MEM_POOL_RELOC == 1) +#if (USBH3_HC_MEM_POOL_LOCATE == 1) #define USBH3_HC_MEM_POOL_SECTION USBHn_HC_MEM_POOL_SECTION_(USBH3_HC_MEM_POOL_SECTION_NAME) #else #define USBH3_HC_MEM_POOL_SECTION diff --git a/Documentation/Doxygen/USB/src/images/usbh_config_0_h.png b/Documentation/Doxygen/USB/src/images/usbh_config_0_h.png index 7354635d..504fbc23 100644 Binary files a/Documentation/Doxygen/USB/src/images/usbh_config_0_h.png and b/Documentation/Doxygen/USB/src/images/usbh_config_0_h.png differ diff --git a/Documentation/Doxygen/USB/src/rl_usb.txt b/Documentation/Doxygen/USB/src/rl_usb.txt index 3b9d8068..8fa74998 100644 --- a/Documentation/Doxygen/USB/src/rl_usb.txt +++ b/Documentation/Doxygen/USB/src/rl_usb.txt @@ -4867,14 +4867,14 @@ The USB Host configuration file USBH_Config_n.h contains the follo - Maximum Port Power Consumption specifies maximum current that a port can source (in mA). USB Devices exceeding this requirement will not be usable by the USB Host. - Maximum Pipes in system specifies the maximum number of active pipes (pipe is a communication channel to an USB Device endpoint). -- Memory Pool Size specifies the size of the memory pool used by the USB Host Component. - It has to be larger than maximum packet size on any endpoint for typically 128 bytes, making this a default size of 640 bytes to - cover 512 bytes bulk endpoint maximum packet size. -- Relocate Memory Pool specifies if the memory pool is relocated to a specific memory address (via the linker script). - This is usually necessary in case that USB Controller has some specific requirements regarding memory for transfers. - For example if USB Controller can only access specific memory, or if this memory needs to be non-cacheable. -- Memory Pool section name specifies the section name for the memory pool that is used by the linker script to position it in memory. - Default section name is .driver.usbh, for example for USB Controller 0 the default section name is .driver.usbh0. +- Memory Pool specifies the size of the USB memory pool and is also used for locating the USB memory pool in specific memory. + - Size specifies the size of the USB memory pool (in bytes) that the USB Host controller will use for the USB communication data. + This size should be at least equal to the size of the maximum expected packet + 128 bytes. + - Locate specifies if the USB memory pool is located in a specific memory (via the linker script). + This is usually necessary in case that USB Controller has some specific requirements regarding memory for USB transfers. + For example if USB Controller can only access specific memory, or if this memory needs to be non-cacheable. + - Section Name specifies the section name for the USB memory pool that is used by the linker script to position it in memory. + Default section name is .driver.usbh, for example for USB Controller 0 the default section name is .driver.usbh0. - Use the OS Resources Settings to optimize the usage of OS resources. - The default Core Thread Stack Size is \a 2048 bytes. - The default Core Thread priority is osPriorityAboveNormal. diff --git a/Documentation/Doxygen/USB/src/usb.txt b/Documentation/Doxygen/USB/src/usb.txt index ff65f899..0ae65616 100644 --- a/Documentation/Doxygen/USB/src/usb.txt +++ b/Documentation/Doxygen/USB/src/usb.txt @@ -923,7 +923,7 @@ The USBH_Config_n.h file contains additional settings for the spec - Power Consumption can be configured according to hardware capability of the USB Host Controller. - Maximum Pipes can be specified according to expected USB Device classes that are expected to be used by the USB Host. - Memory Pool parameters can be configured that are necessary for USB Host operation. - This memory pool can also be relocated to specific memory via the linker script. + This memory pool can also be located to specific memory via the linker script. Refer to \ref usbh_coreFunctions_conf for a detailed list of all available settings. diff --git a/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h b/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h index 35b2903a..ccff9576 100644 --- a/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h +++ b/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h @@ -20,31 +20,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH0_HC_NUM CMSIS_DRIVER_USBH -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH0_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH0_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH0_HC_MEM_POOL_SIZE 4224 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH0_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH0_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH0_HC_MEM_POOL_SECTION_NAME ".driver.usbh0" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -53,5 +57,6 @@ // Core Thread Priority #define USBH0_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h.base@8.0.0 b/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h.base@8.0.0 index 6681bd1a..d6f3cdd0 100644 --- a/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h.base@8.0.0 +++ b/Examples/USB/Host/Keyboard/RTE/USB/USBH_Config_0.h.base@8.0.0 @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH0_HC_NUM 0 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH0_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH0_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH0_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH0_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH0_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH0_HC_MEM_POOL_SECTION_NAME ".driver.usbh0" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH0_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h b/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h index 35b2903a..ccff9576 100644 --- a/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h +++ b/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h @@ -20,31 +20,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH0_HC_NUM CMSIS_DRIVER_USBH -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH0_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH0_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH0_HC_MEM_POOL_SIZE 4224 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH0_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH0_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH0_HC_MEM_POOL_SECTION_NAME ".driver.usbh0" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -53,5 +57,6 @@ // Core Thread Priority #define USBH0_CORE_THREAD_PRIORITY osPriorityAboveNormal + // // diff --git a/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h.base@8.0.0 b/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h.base@8.0.0 index 6681bd1a..d6f3cdd0 100644 --- a/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h.base@8.0.0 +++ b/Examples/USB/Host/MassStorage/RTE/USB/USBH_Config_0.h.base@8.0.0 @@ -14,31 +14,35 @@ // Specifies instance of the Host Controller hardware interface. #define USBH0_HC_NUM 0 -// Maximum Port Power Consumption<2-500:2> -// Specifies the maximum power consumption per port (in mA) +// Maximum Port Power Delivery (in mA) <2-500:2> +// Specifies the maximum power delivery per port. #define USBH0_HC_POWER 500 -// Maximum Pipes in system +// Maximum Pipes in System // Specifies the maximum number of Pipes that will be used by // the USB Host controller in the system simultaneously. #define USBH0_HC_PIPE_NUM 3 -// Memory Pool Size <640-1048576:4> -// Specifies the size of the memory pool (in bytes) that -// the USB Host controller will use for the USB communication data. -// This size should be at least equal to -// size of maximum expected packet + 128 bytes. +// Memory Pool +// Size <640-1048576:4> +// Specifies the size of the USB memory pool (in bytes) that +// the USB Host controller will use for the USB communication data. +// This size should be at least equal to the size +// of the maximum expected packet + 128 bytes. #define USBH0_HC_MEM_POOL_SIZE 640 -// Relocate Memory Pool -// Specifies if the memory pool is located at a specific address -// (via linker script). -#define USBH0_HC_MEM_POOL_RELOC 0 +// Locate +// Specifies if the USB memory pool is located in a specific memory +// (via the linker script). +#define USBH0_HC_MEM_POOL_LOCATE 0 -// Memory Pool section name -// Specifies the section name of the Memory Pool +// Section Name +// Specifies the section name for the USB memory pool +// (for positioning via the linker script). #define USBH0_HC_MEM_POOL_SECTION_NAME ".driver.usbh0" -// + +// +// // OS Resources Settings // These settings are used to optimize usage of OS resources. @@ -47,5 +51,6 @@ // Core Thread Priority #define USBH0_CORE_THREAD_PRIORITY osPriorityAboveNormal + // //