diff --git a/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c b/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c index 0c1c82008564f887661bf019936b9bc6427b56e1..8d66ebc041d520a925235d6c938a021e6abcab6c 100644 --- a/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c +++ b/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c @@ -37,7 +37,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlErrorDuringConfigRead; /* Ensure that the Configuration Descriptor isn't too large */ @@ -48,7 +48,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c index baf02a2162b8db2507b283d813ce447c71b93da9..57d7ec051042364258bdf29c5522417606ab44a2 100644 --- a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c @@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -63,7 +63,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c b/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c index 29fa60ba38a790e36fcb9bf9b9d9e408fe949177..2a6e1525694a5ec24e913450b9afa51bd204ca85 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c @@ -53,7 +53,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -64,7 +64,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c b/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c index e586ea5d35946f3ab4e5ea58a732f58d4f7d948d..a22420d00e451b787436a4bddd77e57186b4ed2c 100644 --- a/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c @@ -51,7 +51,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint16_t ConfigDescriptorSize; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -62,7 +62,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h index 4aa09e1b7aa7a2d1854c073d47e5a6e836b229eb..98a9e37a7fafca2253c4cfa68b296c00ed7387fa 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h @@ -82,6 +82,7 @@ /* Function Prototypes: */ void Keyboard_HID_Task(void); + void SetupHardware(void); void EVENT_USB_HostError(const uint8_t ErrorCode); void EVENT_USB_DeviceAttached(void); diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c index 4ee3b998f9cb7fa9b74b7412e5d068b3c95ed38f..d48026d743d8579f45368b85a3cf65bd7608837f 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c @@ -51,7 +51,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint16_t ConfigDescriptorSize; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -62,7 +62,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c b/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c index c951c797e6ccf9569f1cbd29ceacf5ff354ab7ff..d15a453cf37bcef0df769d77b2ffa6e89c94dc2c 100644 --- a/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c @@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -63,7 +63,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c b/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c index 0f6ab59ae12ae3627b2ef2e30c76128cbae5271b..f594eb819259a64d05a0bb5b032d347065c1ec87 100644 --- a/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c @@ -51,7 +51,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint16_t ConfigDescriptorSize; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -62,7 +62,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c b/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c index 5d9d3f04e0890f675a47e77cef795d7bfe0cf0df..04247efab584dd2172100cd5f1e39b2788e0a35a 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c @@ -51,7 +51,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint16_t ConfigDescriptorSize; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -62,7 +62,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c b/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c index 10849696431bf377863c4ac99aad6fcc143d7840..86a96b31afffe56929ba7a15753b53a686d6985f 100644 --- a/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c @@ -52,7 +52,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -63,7 +63,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c index 3a572f18ff45142d096e194e480a219e716b1339..aef5b3539d66cae2111cb0a7e5e97b894164c68e 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.c +++ b/LUFA/Drivers/USB/Class/Host/CDC.c @@ -40,7 +40,7 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt uint16_t ConfigDescriptorSize; uint8_t FoundEndpoints = 0; - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return CDC_ENUMERROR_ControlError; if (ConfigDescriptorSize > 512) @@ -48,7 +48,7 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt ConfigDescriptorData = alloca(ConfigDescriptorSize); - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) return CDC_ENUMERROR_InvalidConfigDataReturned; diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c index bbe258b3abe62888d265c0b3b53a01941b1f40f7..47982b806c948fe85b427bfad5e441568c0008f9 100644 --- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c +++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c @@ -31,7 +31,7 @@ #include "ConfigDescriptor.h" #if defined(USB_CAN_BE_HOST) -uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr) +uint8_t USB_GetDeviceConfigDescriptor(uint8_t ConfigNumber, uint16_t* const ConfigSizePtr, void* BufferPtr) { uint8_t ErrorCode; @@ -39,7 +39,7 @@ uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* Buffe { .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE), .bRequest = REQ_GetDescriptor, - .wValue = (DTYPE_Configuration << 8), + .wValue = ((DTYPE_Configuration << 8) | (ConfigNumber - 1)), .wIndex = 0, .wLength = sizeof(USB_Descriptor_Configuration_Header_t), }; diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h index 5c2b6e2de7e1c10236b0cf1e7ac69049c4f16a21..17b6378e93fa76f91f8ceb168fb45e625dace286 100644 --- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h +++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h @@ -182,6 +182,9 @@ /* Function Prototypes: */ /** Retrieves the configuration descriptor data or size from an attached device via a standard request. + * + * \param ConfigNumber Device configuration descriptor number to fetch from the device (usually set to 1 for + * single configuration devices) * * \param ConfigSizePtr Pointer to a uint16_t for either storing or retrieving the configuration * descriptor size @@ -192,8 +195,8 @@ * of bytes indicated by ConfigSizePtr of the configuration descriptor will be loaded * into the buffer */ - uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr) - ATTR_NON_NULL_PTR_ARG(1); + uint8_t USB_GetDeviceConfigDescriptor(uint8_t ConfigNumber, uint16_t* const ConfigSizePtr, void* BufferPtr) + ATTR_NON_NULL_PTR_ARG(2); /** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value. * The bytes remaining value is automatically decremented. diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 3ef3a6e83f510b8beeb5d382104912da23d7c5b1..464418140f934491bf07fd2da112a97d34a3d89e 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -27,7 +27,7 @@ * - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is * cleared to prevent endpoint type corruption * - Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken() - * + * - Extend USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch * * \section Sec_ChangeLog090605 Version 090605 * diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt index ecd4e9e80e48be24422d94545bd925aa14f7dc13..d46ddd02bc9aaa14fa8221397f04101e38f0c4f9 100644 --- a/LUFA/ManPages/MigrationInformation.txt +++ b/LUFA/ManPages/MigrationInformation.txt @@ -13,13 +13,18 @@ * \section Sec_MigrationXXXXXX Migrating from 090605 to XXXXXX * * <b>All</b> - * - The "Simple Scheduler" has been deprecated, as it was little more than an abtracted loop and caused much confusion. User + * - The "Simple Scheduler" has been <i>deprecated</i>, as it was little more than an abtracted loop and caused much confusion. User * applications using the scheduler should switch to regular loops instead. The scheduler code will be removed in a future * release. * - The "Dynamic Memory Block Allocator" has been removed, as it was unused in (and unrelated to) the LUFA library and never * used in user applications. The library is available from the author's website for those wishing to still use it in their * applications. * + * <b>Host Mode</b> + * - The USB_GetDeviceConfigDescriptor() function now requires the desired configuration index within the device as its first + * parameter, to add support for multi-configuration devices. Existing code should use a configuration index of 1 to indicate the + * first configuration descriptor within the device. + * * \section Sec_Migration090605 Migrating from 090510 to 090605 * * <b>Device Mode</b> diff --git a/Projects/MissileLauncher/ConfigDescriptor.c b/Projects/MissileLauncher/ConfigDescriptor.c index 29fa60ba38a790e36fcb9bf9b9d9e408fe949177..2a6e1525694a5ec24e913450b9afa51bd204ca85 100644 --- a/Projects/MissileLauncher/ConfigDescriptor.c +++ b/Projects/MissileLauncher/ConfigDescriptor.c @@ -53,7 +53,7 @@ uint8_t ProcessConfigurationDescriptor(void) uint8_t FoundEndpoints = 0; /* Get Configuration Descriptor size from the device */ - if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) + if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) return ControlError; /* Ensure that the Configuration Descriptor isn't too large */ @@ -64,7 +64,7 @@ uint8_t ProcessConfigurationDescriptor(void) ConfigDescriptorData = alloca(ConfigDescriptorSize); /* Retrieve the entire configuration descriptor into the allocated buffer */ - USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData); + USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData); /* Validate returned data - ensure first entry is a configuration header descriptor */ if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration) diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c index 2782b695f480dfa45bf4968a96c99351d4f556cb..bd542ee45002f1422c799beb3ecabd351b64454a 100644 --- a/Projects/MissileLauncher/MissileLauncher.c +++ b/Projects/MissileLauncher/MissileLauncher.c @@ -54,40 +54,40 @@ #include "MissileLauncher.h" /** Launcher first init command report data sequence */ -static const uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 }; +uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 }; /** Launcher second init command report data sequence */ -static const uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 }; +uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 }; /** Launcher command report data sequence to stop all movement */ -static const uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 }; +uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 }; /** Launcher command report data sequence to move left */ -static const uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 }; +uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 }; /** Launcher command report data sequence to move right */ -static const uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 }; +uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 }; /** Launcher command report data sequence to move up */ -static const uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 }; +uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 }; /** Launcher command report data sequence to move down */ -static const uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 }; +uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 }; /** Launcher command report data sequence to move left and up */ -static const uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 }; +uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 }; /** Launcher command report data sequence to move right and up */ -static const uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 }; +uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 }; /** Launcher command report data sequence to move left and down */ -static const uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 }; +uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 }; /** Launcher command report data sequence to move right and down */ -static const uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 }; +uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 }; /** Launcher command report data sequence to fire a missile */ -static const uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 }; +uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 }; /** Last command sent to the launcher, to determine what new command (if any) must be sent */ uint8_t* CmdState;