diff options
Diffstat (limited to 'Projects')
-rw-r--r-- | Projects/AVRISP-MKII/Descriptors.c | 12 | ||||
-rw-r--r-- | Projects/Benito/Descriptors.c | 10 | ||||
-rw-r--r-- | Projects/Incomplete/StandaloneProgrammer/Descriptors.c | 10 | ||||
-rw-r--r-- | Projects/LEDNotifier/Descriptors.c | 10 | ||||
-rw-r--r-- | Projects/MIDIToneGenerator/Descriptors.c | 10 | ||||
-rw-r--r-- | Projects/Magstripe/Descriptors.c | 12 | ||||
-rw-r--r-- | Projects/RelayBoard/Descriptors.c | 16 | ||||
-rw-r--r-- | Projects/RelayBoard/Descriptors.h | 6 | ||||
-rw-r--r-- | Projects/TempDataLogger/Descriptors.c | 12 | ||||
-rw-r--r-- | Projects/TempDataLogger/Lib/FATFs/diskio.h | 18 | ||||
-rw-r--r-- | Projects/USBtoSerial/Descriptors.c | 10 | ||||
-rw-r--r-- | Projects/Webserver/Descriptors.c | 10 | ||||
-rw-r--r-- | Projects/XPLAINBridge/AVRISPDescriptors.c | 12 | ||||
-rw-r--r-- | Projects/XPLAINBridge/USARTDescriptors.c | 10 |
14 files changed, 88 insertions, 70 deletions
diff --git a/Projects/AVRISP-MKII/Descriptors.c b/Projects/AVRISP-MKII/Descriptors.c index 28db15fc3..a84b75f38 100644 --- a/Projects/AVRISP-MKII/Descriptors.c +++ b/Projects/AVRISP-MKII/Descriptors.c @@ -42,7 +42,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -69,7 +69,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -127,7 +127,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -138,7 +138,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -149,7 +149,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String}, @@ -159,7 +159,7 @@ USB_Descriptor_String_t PROGMEM ProductString = /** Serial number string. This is a Unicode string containing the device's unique serial number, expressed as a * series of uppercase hexadecimal digits. */ -USB_Descriptor_String_t PROGMEM SerialString = +const USB_Descriptor_String_t PROGMEM SerialString = { .Header = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String}, diff --git a/Projects/Benito/Descriptors.c b/Projects/Benito/Descriptors.c index acb11bf36..18a3043da 100644 --- a/Projects/Benito/Descriptors.c +++ b/Projects/Benito/Descriptors.c @@ -42,7 +42,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -69,7 +69,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -178,7 +178,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -189,7 +189,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -200,7 +200,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(25), .Type = DTYPE_String}, diff --git a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c index bc855181b..5fe4e0cbf 100644 --- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c +++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c @@ -56,7 +56,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -83,7 +83,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -141,7 +141,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -152,7 +152,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -163,7 +163,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(26), .Type = DTYPE_String}, diff --git a/Projects/LEDNotifier/Descriptors.c b/Projects/LEDNotifier/Descriptors.c index bd351d0a7..3160374c9 100644 --- a/Projects/LEDNotifier/Descriptors.c +++ b/Projects/LEDNotifier/Descriptors.c @@ -54,7 +54,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -190,7 +190,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -201,7 +201,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -212,7 +212,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(12), .Type = DTYPE_String}, diff --git a/Projects/MIDIToneGenerator/Descriptors.c b/Projects/MIDIToneGenerator/Descriptors.c index 6e50fc8fa..ba50261bf 100644 --- a/Projects/MIDIToneGenerator/Descriptors.c +++ b/Projects/MIDIToneGenerator/Descriptors.c @@ -42,7 +42,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration
* process begins.
*/
-USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
+const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
@@ -69,7 +69,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
* a configuration so that the host may correctly communicate with the USB device.
*/
-USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
+const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Config =
{
@@ -248,7 +248,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
*/
-USB_Descriptor_String_t PROGMEM LanguageString =
+const USB_Descriptor_String_t PROGMEM LanguageString =
{
.Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
@@ -259,7 +259,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
-USB_Descriptor_String_t PROGMEM ManufacturerString =
+const USB_Descriptor_String_t PROGMEM ManufacturerString =
{
.Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
@@ -270,7 +270,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
-USB_Descriptor_String_t PROGMEM ProductString =
+const USB_Descriptor_String_t PROGMEM ProductString =
{
.Header = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String},
diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c index 420fe5e02..10312ab4d 100644 --- a/Projects/Magstripe/Descriptors.c +++ b/Projects/Magstripe/Descriptors.c @@ -44,7 +44,7 @@ * * See the HID class specification for more information on HID report descriptors. */ -USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] = +const USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] = { /* Use the HID class driver's standard Keyboard report. * Max simultaneous keys: 6 @@ -57,7 +57,7 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] = * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -84,7 +84,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -142,7 +142,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = /** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -153,7 +153,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(32), .Type = DTYPE_String}, @@ -164,7 +164,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(20), .Type = DTYPE_String}, diff --git a/Projects/RelayBoard/Descriptors.c b/Projects/RelayBoard/Descriptors.c index bfd3ea4e7..ef98567ef 100644 --- a/Projects/RelayBoard/Descriptors.c +++ b/Projects/RelayBoard/Descriptors.c @@ -43,7 +43,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM RelayBoard_DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM RelayBoard_DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -70,13 +70,13 @@ USB_Descriptor_Device_t PROGMEM RelayBoard_DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -RelayBoard_USB_Descriptor_Configuration_t PROGMEM RelayBoard_ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM RelayBoard_ConfigurationDescriptor = { .Config = { .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, - .TotalConfigurationSize = sizeof(RelayBoard_USB_Descriptor_Configuration_t), + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), .TotalInterfaces = 1, .ConfigurationNumber = 1, @@ -108,7 +108,7 @@ RelayBoard_USB_Descriptor_Configuration_t PROGMEM RelayBoard_ConfigurationDescri * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM RelayBoard_LanguageString = +const USB_Descriptor_String_t PROGMEM RelayBoard_LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -119,7 +119,7 @@ USB_Descriptor_String_t PROGMEM RelayBoard_LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM RelayBoard_ManufacturerString = +const USB_Descriptor_String_t PROGMEM RelayBoard_ManufacturerString = { .Header = {.Size = USB_STRING_LEN(5), .Type = DTYPE_String}, @@ -130,7 +130,7 @@ USB_Descriptor_String_t PROGMEM RelayBoard_ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM RelayBoard_ProductString = +const USB_Descriptor_String_t PROGMEM RelayBoard_ProductString = { .Header = {.Size = USB_STRING_LEN(10), .Type = DTYPE_String}, @@ -140,7 +140,7 @@ USB_Descriptor_String_t PROGMEM RelayBoard_ProductString = /** Serial number string. This is a Unicode string containing the device's unique serial number, expressed as a * series of uppercase hexadecimal digits. */ -USB_Descriptor_String_t PROGMEM RelayBoard_SerialString = +const USB_Descriptor_String_t PROGMEM RelayBoard_SerialString = { .Header = {.Size = USB_STRING_LEN(5), .Type = DTYPE_String}, @@ -171,7 +171,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, break; case DTYPE_Configuration: Address = &RelayBoard_ConfigurationDescriptor; - Size = sizeof(RelayBoard_USB_Descriptor_Configuration_t); + Size = sizeof(USB_Descriptor_Configuration_t); break; case DTYPE_String: switch (DescriptorNumber) diff --git a/Projects/RelayBoard/Descriptors.h b/Projects/RelayBoard/Descriptors.h index 1a68ae3f7..d913eb722 100644 --- a/Projects/RelayBoard/Descriptors.h +++ b/Projects/RelayBoard/Descriptors.h @@ -48,9 +48,9 @@ */ typedef struct { - USB_Descriptor_Configuration_Header_t Config; - USB_Descriptor_Interface_t RelayBoardInterface; - } RelayBoard_USB_Descriptor_Configuration_t; + USB_Descriptor_Configuration_Header_t Config; + USB_Descriptor_Interface_t RelayBoardInterface; + } USB_Descriptor_Configuration_t; /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, diff --git a/Projects/TempDataLogger/Descriptors.c b/Projects/TempDataLogger/Descriptors.c index 44873f1a5..4aae39283 100644 --- a/Projects/TempDataLogger/Descriptors.c +++ b/Projects/TempDataLogger/Descriptors.c @@ -55,7 +55,7 @@ * the device will send, and what it may be sent back from the host. Refer to the HID specification for * more details on HID report descriptors. */ -USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = +const USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = { /* Use the HID class driver's standard Vendor HID report. * Vendor Usage Page: 1 @@ -72,7 +72,7 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -99,7 +99,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -194,7 +194,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -205,7 +205,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -216,7 +216,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String}, diff --git a/Projects/TempDataLogger/Lib/FATFs/diskio.h b/Projects/TempDataLogger/Lib/FATFs/diskio.h index 5df77502c..61d6601de 100644 --- a/Projects/TempDataLogger/Lib/FATFs/diskio.h +++ b/Projects/TempDataLogger/Lib/FATFs/diskio.h @@ -43,6 +43,24 @@ DRESULT disk_ioctl (BYTE, BYTE, void*); #define STA_NODISK 0x02 /* No medium in the drive */ #define STA_PROTECT 0x04 /* Write protected */ +/* Generic command */ +#define CTRL_SYNC 0 /* Mandatory for write functions */ +#define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */ +#define GET_SECTOR_SIZE 2 /* Mandatory for multiple sector size cfg */ +#define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */ +#define CTRL_POWER 4 +#define CTRL_LOCK 5 +#define CTRL_EJECT 6 +/* MMC/SDC command */ +#define MMC_GET_TYPE 10 +#define MMC_GET_CSD 11 +#define MMC_GET_CID 12 +#define MMC_GET_OCR 13 +#define MMC_GET_SDSTAT 14 +/* ATA/CF command */ +#define ATA_GET_REV 20 +#define ATA_GET_MODEL 21 +#define ATA_GET_SN 22 #define _DISKIO #endif diff --git a/Projects/USBtoSerial/Descriptors.c b/Projects/USBtoSerial/Descriptors.c index b117be767..46e608651 100644 --- a/Projects/USBtoSerial/Descriptors.c +++ b/Projects/USBtoSerial/Descriptors.c @@ -54,7 +54,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -190,7 +190,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -201,7 +201,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -212,7 +212,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(23), .Type = DTYPE_String}, diff --git a/Projects/Webserver/Descriptors.c b/Projects/Webserver/Descriptors.c index a9ba0b8ba..ba20f070a 100644 --- a/Projects/Webserver/Descriptors.c +++ b/Projects/Webserver/Descriptors.c @@ -54,7 +54,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Config = { @@ -139,7 +139,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM LanguageString = +const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -150,7 +150,7 @@ USB_Descriptor_String_t PROGMEM LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ManufacturerString = +const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -161,7 +161,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM ProductString = +const USB_Descriptor_String_t PROGMEM ProductString = { .Header = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String}, diff --git a/Projects/XPLAINBridge/AVRISPDescriptors.c b/Projects/XPLAINBridge/AVRISPDescriptors.c index e67b56188..0715224e7 100644 --- a/Projects/XPLAINBridge/AVRISPDescriptors.c +++ b/Projects/XPLAINBridge/AVRISPDescriptors.c @@ -42,7 +42,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM AVRISP_DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM AVRISP_DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -69,7 +69,7 @@ USB_Descriptor_Device_t PROGMEM AVRISP_DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor = +const AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor = { .Config = { @@ -127,7 +127,7 @@ AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM AVRISP_LanguageString = +const USB_Descriptor_String_t PROGMEM AVRISP_LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -138,7 +138,7 @@ USB_Descriptor_String_t PROGMEM AVRISP_LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM AVRISP_ManufacturerString = +const USB_Descriptor_String_t PROGMEM AVRISP_ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -149,7 +149,7 @@ USB_Descriptor_String_t PROGMEM AVRISP_ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM AVRISP_ProductString = +const USB_Descriptor_String_t PROGMEM AVRISP_ProductString = { .Header = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String}, @@ -159,7 +159,7 @@ USB_Descriptor_String_t PROGMEM AVRISP_ProductString = /** Serial number string. This is a Unicode string containing the device's unique serial number, expressed as a * series of uppercase hexadecimal digits. */ -USB_Descriptor_String_t PROGMEM AVRISP_SerialString = +const USB_Descriptor_String_t PROGMEM AVRISP_SerialString = { .Header = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String}, diff --git a/Projects/XPLAINBridge/USARTDescriptors.c b/Projects/XPLAINBridge/USARTDescriptors.c index 7eadd9e7d..4c6a758b5 100644 --- a/Projects/XPLAINBridge/USARTDescriptors.c +++ b/Projects/XPLAINBridge/USARTDescriptors.c @@ -54,7 +54,7 @@ * number of device configurations. The descriptor is read out by the USB host when the enumeration * process begins. */ -USB_Descriptor_Device_t PROGMEM USART_DeviceDescriptor = +const USB_Descriptor_Device_t PROGMEM USART_DeviceDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, @@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM USART_DeviceDescriptor = * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting * a configuration so that the host may correctly communicate with the USB device. */ -USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor = +const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor = { .Config = { @@ -190,7 +190,7 @@ USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor = * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate * via the language ID table available at USB.org what languages the device supports for its string descriptors. */ -USB_Descriptor_String_t PROGMEM USART_LanguageString = +const USB_Descriptor_String_t PROGMEM USART_LanguageString = { .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, @@ -201,7 +201,7 @@ USB_Descriptor_String_t PROGMEM USART_LanguageString = * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM USART_ManufacturerString = +const USB_Descriptor_String_t PROGMEM USART_ManufacturerString = { .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, @@ -212,7 +212,7 @@ USB_Descriptor_String_t PROGMEM USART_ManufacturerString = * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -USB_Descriptor_String_t PROGMEM USART_ProductString = +const USB_Descriptor_String_t PROGMEM USART_ProductString = { .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String}, |