Browse Source

Fix DUE incompatible enum type specification (#10017)

Bob-the-Kuhn 6 years ago
parent
commit
67a17446f2

+ 11
- 0
.travis.yml View File

429
   - pins_set RAMPS X_MAX_PIN -1
429
   - pins_set RAMPS X_MAX_PIN -1
430
   - opt_add_adv Z2_MAX_PIN 2
430
   - opt_add_adv Z2_MAX_PIN 2
431
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
431
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
432
+  
433
+  #############################
434
+  # DUE default config test
435
+  #############################
436
+  
437
+  - export TEST_PLATFORM="-e DUE"
438
+  - restore_configs
439
+  - opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB
440
+  - cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
441
+  - cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
442
+  - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
432
 
443
 
433
   #############################
444
   #############################
434
   # LPC1768 default config test
445
   # LPC1768 default config test

+ 2
- 2
Marlin/src/HAL/HAL_DUE/usb/genclk.h View File

73
 //! \name Programmable Clock Sources (PCK)
73
 //! \name Programmable Clock Sources (PCK)
74
 //@{
74
 //@{
75
 
75
 
76
-enum genclk_source : char {
76
+enum genclk_source {
77
 	GENCLK_PCK_SRC_SLCK_RC       = 0, //!< Internal 32kHz RC oscillator as PCK source clock
77
 	GENCLK_PCK_SRC_SLCK_RC       = 0, //!< Internal 32kHz RC oscillator as PCK source clock
78
 	GENCLK_PCK_SRC_SLCK_XTAL     = 1, //!< External 32kHz crystal oscillator as PCK source clock
78
 	GENCLK_PCK_SRC_SLCK_XTAL     = 1, //!< External 32kHz crystal oscillator as PCK source clock
79
 	GENCLK_PCK_SRC_SLCK_BYPASS   = 2, //!< External 32kHz bypass oscillator as PCK source clock
79
 	GENCLK_PCK_SRC_SLCK_BYPASS   = 2, //!< External 32kHz bypass oscillator as PCK source clock
92
 //! \name Programmable Clock Prescalers (PCK)
92
 //! \name Programmable Clock Prescalers (PCK)
93
 //@{
93
 //@{
94
 
94
 
95
-enum genclk_divider : char {
95
+enum genclk_divider {
96
 	GENCLK_PCK_PRES_1  = PMC_PCK_PRES_CLK_1, //!< Set PCK clock prescaler to 1
96
 	GENCLK_PCK_PRES_1  = PMC_PCK_PRES_CLK_1, //!< Set PCK clock prescaler to 1
97
 	GENCLK_PCK_PRES_2  = PMC_PCK_PRES_CLK_2, //!< Set PCK clock prescaler to 2
97
 	GENCLK_PCK_PRES_2  = PMC_PCK_PRES_CLK_2, //!< Set PCK clock prescaler to 2
98
 	GENCLK_PCK_PRES_4  = PMC_PCK_PRES_CLK_4, //!< Set PCK clock prescaler to 4
98
 	GENCLK_PCK_PRES_4  = PMC_PCK_PRES_CLK_4, //!< Set PCK clock prescaler to 4

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/pll.h View File

76
 
76
 
77
 #define PLL_COUNT           0x3fU
77
 #define PLL_COUNT           0x3fU
78
 
78
 
79
-enum pll_source : char {
79
+enum pll_source {
80
 	PLL_SRC_MAINCK_4M_RC        = OSC_MAINCK_4M_RC,     //!< Internal 4MHz RC oscillator.
80
 	PLL_SRC_MAINCK_4M_RC        = OSC_MAINCK_4M_RC,     //!< Internal 4MHz RC oscillator.
81
 	PLL_SRC_MAINCK_8M_RC        = OSC_MAINCK_8M_RC,     //!< Internal 8MHz RC oscillator.
81
 	PLL_SRC_MAINCK_8M_RC        = OSC_MAINCK_8M_RC,     //!< Internal 8MHz RC oscillator.
82
 	PLL_SRC_MAINCK_12M_RC       = OSC_MAINCK_12M_RC,    //!< Internal 12MHz RC oscillator.
82
 	PLL_SRC_MAINCK_12M_RC       = OSC_MAINCK_12M_RC,    //!< Internal 12MHz RC oscillator.

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/sbc_protocol.h View File

80
 //! \name SBC-2 Mode page definitions
80
 //! \name SBC-2 Mode page definitions
81
 //@{
81
 //@{
82
 
82
 
83
-enum scsi_sbc_mode : char {
83
+enum scsi_sbc_mode {
84
 	SCSI_MS_MODE_RW_ERR_RECOV = 0x01,	//!< Read-Write Error Recovery mode page
84
 	SCSI_MS_MODE_RW_ERR_RECOV = 0x01,	//!< Read-Write Error Recovery mode page
85
 	SCSI_MS_MODE_FORMAT_DEVICE = 0x03,	//!< Format Device mode page
85
 	SCSI_MS_MODE_FORMAT_DEVICE = 0x03,	//!< Format Device mode page
86
 	SCSI_MS_MODE_FLEXIBLE_DISK = 0x05,	//!< Flexible Disk mode page
86
 	SCSI_MS_MODE_FLEXIBLE_DISK = 0x05,	//!< Flexible Disk mode page

+ 5
- 5
Marlin/src/HAL/HAL_DUE/usb/spc_protocol.h View File

184
 COMPILER_PACK_RESET()
184
 COMPILER_PACK_RESET()
185
 
185
 
186
 /* Vital Product Data page codes */
186
 /* Vital Product Data page codes */
187
-enum scsi_vpd_page_code : char {
187
+enum scsi_vpd_page_code {
188
 	SCSI_VPD_SUPPORTED_PAGES = 0x00,
188
 	SCSI_VPD_SUPPORTED_PAGES = 0x00,
189
 	SCSI_VPD_UNIT_SERIAL_NUMBER = 0x80,
189
 	SCSI_VPD_UNIT_SERIAL_NUMBER = 0x80,
190
 	SCSI_VPD_DEVICE_IDENTIFICATION = 0x83,
190
 	SCSI_VPD_DEVICE_IDENTIFICATION = 0x83,
202
 
202
 
203
 
203
 
204
 /* Sense keys */
204
 /* Sense keys */
205
-enum scsi_sense_key : char {
205
+enum scsi_sense_key {
206
 	SCSI_SK_NO_SENSE = 0x0,
206
 	SCSI_SK_NO_SENSE = 0x0,
207
 	SCSI_SK_RECOVERED_ERROR = 0x1,
207
 	SCSI_SK_RECOVERED_ERROR = 0x1,
208
 	SCSI_SK_NOT_READY = 0x2,
208
 	SCSI_SK_NOT_READY = 0x2,
220
 };
220
 };
221
 
221
 
222
 /* Additional Sense Code / Additional Sense Code Qualifier pairs */
222
 /* Additional Sense Code / Additional Sense Code Qualifier pairs */
223
-enum scsi_asc_ascq : char {
223
+enum scsi_asc_ascq {
224
 	SCSI_ASC_NO_ADDITIONAL_SENSE_INFO = 0x0000,
224
 	SCSI_ASC_NO_ADDITIONAL_SENSE_INFO = 0x0000,
225
 	SCSI_ASC_LU_NOT_READY_REBUILD_IN_PROGRESS = 0x0405,
225
 	SCSI_ASC_LU_NOT_READY_REBUILD_IN_PROGRESS = 0x0405,
226
 	SCSI_ASC_WRITE_ERROR = 0x0c00,
226
 	SCSI_ASC_WRITE_ERROR = 0x0c00,
239
  * used with MODE SELECT and MODE SENSE commands
239
  * used with MODE SELECT and MODE SENSE commands
240
  * that are applicable to all SCSI devices.
240
  * that are applicable to all SCSI devices.
241
  */
241
  */
242
-enum scsi_spc_mode : char {
242
+enum scsi_spc_mode {
243
 	SCSI_MS_MODE_VENDOR_SPEC = 0x00,
243
 	SCSI_MS_MODE_VENDOR_SPEC = 0x00,
244
 	SCSI_MS_MODE_INFEXP = 0x1C,    // Informational exceptions control page
244
 	SCSI_MS_MODE_INFEXP = 0x1C,    // Informational exceptions control page
245
 	SCSI_MS_MODE_ALL = 0x3f,
245
 	SCSI_MS_MODE_ALL = 0x3f,
273
 };
273
 };
274
 
274
 
275
 
275
 
276
-enum scsi_spc_mode_sense_pc : char {
276
+enum scsi_spc_mode_sense_pc {
277
 	SCSI_MS_SENSE_PC_CURRENT = 0,
277
 	SCSI_MS_SENSE_PC_CURRENT = 0,
278
 	SCSI_MS_SENSE_PC_CHANGEABLE = 1,
278
 	SCSI_MS_SENSE_PC_CHANGEABLE = 1,
279
 	SCSI_MS_SENSE_PC_DEFAULT = 2,
279
 	SCSI_MS_SENSE_PC_DEFAULT = 2,

+ 13
- 13
Marlin/src/HAL/HAL_DUE/usb/usb_protocol.h View File

107
 /**
107
 /**
108
  * \brief Standard USB requests (bRequest)
108
  * \brief Standard USB requests (bRequest)
109
  */
109
  */
110
-enum usb_reqid : char {
110
+enum usb_reqid {
111
 	USB_REQ_GET_STATUS = 0,
111
 	USB_REQ_GET_STATUS = 0,
112
 	USB_REQ_CLEAR_FEATURE = 1,
112
 	USB_REQ_CLEAR_FEATURE = 1,
113
 	USB_REQ_SET_FEATURE = 3,
113
 	USB_REQ_SET_FEATURE = 3,
125
  * \brief Standard USB device status flags
125
  * \brief Standard USB device status flags
126
  *
126
  *
127
  */
127
  */
128
-enum usb_device_status : char {
128
+enum usb_device_status {
129
 	USB_DEV_STATUS_BUS_POWERED = 0,
129
 	USB_DEV_STATUS_BUS_POWERED = 0,
130
 	USB_DEV_STATUS_SELF_POWERED = 1,
130
 	USB_DEV_STATUS_SELF_POWERED = 1,
131
 	USB_DEV_STATUS_REMOTEWAKEUP = 2
131
 	USB_DEV_STATUS_REMOTEWAKEUP = 2
135
  * \brief Standard USB Interface status flags
135
  * \brief Standard USB Interface status flags
136
  *
136
  *
137
  */
137
  */
138
-enum usb_interface_status : char {
138
+enum usb_interface_status {
139
 	USB_IFACE_STATUS_RESERVED = 0
139
 	USB_IFACE_STATUS_RESERVED = 0
140
 };
140
 };
141
 
141
 
143
  * \brief Standard USB endpoint status flags
143
  * \brief Standard USB endpoint status flags
144
  *
144
  *
145
  */
145
  */
146
-enum usb_endpoint_status : char {
146
+enum usb_endpoint_status {
147
 	USB_EP_STATUS_HALTED = 1,
147
 	USB_EP_STATUS_HALTED = 1,
148
 };
148
 };
149
 
149
 
152
  *
152
  *
153
  * \note valid for SetFeature request.
153
  * \note valid for SetFeature request.
154
  */
154
  */
155
-enum usb_device_feature : char {
155
+enum usb_device_feature {
156
 	USB_DEV_FEATURE_REMOTE_WAKEUP = 1, //!< Remote wakeup enabled
156
 	USB_DEV_FEATURE_REMOTE_WAKEUP = 1, //!< Remote wakeup enabled
157
 	USB_DEV_FEATURE_TEST_MODE = 2,     //!< USB test mode
157
 	USB_DEV_FEATURE_TEST_MODE = 2,     //!< USB test mode
158
 	USB_DEV_FEATURE_OTG_B_HNP_ENABLE = 3,
158
 	USB_DEV_FEATURE_OTG_B_HNP_ENABLE = 3,
165
  *
165
  *
166
  * \note valid for USB_DEV_FEATURE_TEST_MODE request.
166
  * \note valid for USB_DEV_FEATURE_TEST_MODE request.
167
  */
167
  */
168
-enum usb_device_hs_test_mode : char {
168
+enum usb_device_hs_test_mode {
169
 	USB_DEV_TEST_MODE_J = 1,
169
 	USB_DEV_TEST_MODE_J = 1,
170
 	USB_DEV_TEST_MODE_K = 2,
170
 	USB_DEV_TEST_MODE_K = 2,
171
 	USB_DEV_TEST_MODE_SE0_NAK = 3,
171
 	USB_DEV_TEST_MODE_SE0_NAK = 3,
176
 /**
176
 /**
177
  * \brief Standard USB endpoint feature/status flags
177
  * \brief Standard USB endpoint feature/status flags
178
  */
178
  */
179
-enum usb_endpoint_feature : char {
179
+enum usb_endpoint_feature {
180
 	USB_EP_FEATURE_HALT = 0,
180
 	USB_EP_FEATURE_HALT = 0,
181
 };
181
 };
182
 
182
 
183
 /**
183
 /**
184
  * \brief Standard USB Test Mode Selectors
184
  * \brief Standard USB Test Mode Selectors
185
  */
185
  */
186
-enum usb_test_mode_selector : char {
186
+enum usb_test_mode_selector {
187
 	USB_TEST_J = 0x01,
187
 	USB_TEST_J = 0x01,
188
 	USB_TEST_K = 0x02,
188
 	USB_TEST_K = 0x02,
189
 	USB_TEST_SE0_NAK = 0x03,
189
 	USB_TEST_SE0_NAK = 0x03,
194
 /**
194
 /**
195
  * \brief Standard USB descriptor types
195
  * \brief Standard USB descriptor types
196
  */
196
  */
197
-enum usb_descriptor_type : char {
197
+enum usb_descriptor_type {
198
 	USB_DT_DEVICE = 1,
198
 	USB_DT_DEVICE = 1,
199
 	USB_DT_CONFIGURATION = 2,
199
 	USB_DT_CONFIGURATION = 2,
200
 	USB_DT_STRING = 3,
200
 	USB_DT_STRING = 3,
212
 /**
212
 /**
213
  * \brief USB Device Capability types
213
  * \brief USB Device Capability types
214
  */
214
  */
215
-enum usb_capability_type : char {
215
+enum usb_capability_type {
216
 	USB_DC_USB20_EXTENSION = 0x02,
216
 	USB_DC_USB20_EXTENSION = 0x02,
217
 };
217
 };
218
 
218
 
220
  * \brief USB Device Capability - USB 2.0 Extension
220
  * \brief USB Device Capability - USB 2.0 Extension
221
  * To fill bmAttributes field of usb_capa_ext_desc_t structure.
221
  * To fill bmAttributes field of usb_capa_ext_desc_t structure.
222
  */
222
  */
223
-enum usb_capability_extension_attr : char {
223
+enum usb_capability_extension_attr {
224
 	USB_DC_EXT_LPM  = 0x00000002,
224
 	USB_DC_EXT_LPM  = 0x00000002,
225
 };
225
 };
226
 
226
 
253
 /**
253
 /**
254
  * \brief Standard USB endpoint transfer types
254
  * \brief Standard USB endpoint transfer types
255
  */
255
  */
256
-enum usb_ep_type : char {
256
+enum usb_ep_type {
257
 	USB_EP_TYPE_CONTROL = 0x00,
257
 	USB_EP_TYPE_CONTROL = 0x00,
258
 	USB_EP_TYPE_ISOCHRONOUS = 0x01,
258
 	USB_EP_TYPE_ISOCHRONOUS = 0x01,
259
 	USB_EP_TYPE_BULK = 0x02,
259
 	USB_EP_TYPE_BULK = 0x02,
264
 /**
264
 /**
265
  * \brief Standard USB language IDs for string descriptors
265
  * \brief Standard USB language IDs for string descriptors
266
  */
266
  */
267
-enum usb_langid : char {
267
+enum usb_langid {
268
 	USB_LANGID_EN_US = 0x0409, //!< English (United States)
268
 	USB_LANGID_EN_US = 0x0409, //!< English (United States)
269
 };
269
 };
270
 
270
 

+ 2
- 2
Marlin/src/HAL/HAL_DUE/usb/usb_protocol_cdc.h View File

239
 	uint8_t bDataBits;
239
 	uint8_t bDataBits;
240
 } usb_cdc_line_coding_t;
240
 } usb_cdc_line_coding_t;
241
 //! Possible values of bCharFormat
241
 //! Possible values of bCharFormat
242
-enum cdc_char_format : char {
242
+enum cdc_char_format {
243
 	CDC_STOP_BITS_1 = 0,	//!< 1 stop bit
243
 	CDC_STOP_BITS_1 = 0,	//!< 1 stop bit
244
 	CDC_STOP_BITS_1_5 = 1,	//!< 1.5 stop bits
244
 	CDC_STOP_BITS_1_5 = 1,	//!< 1.5 stop bits
245
 	CDC_STOP_BITS_2 = 2,	//!< 2 stop bits
245
 	CDC_STOP_BITS_2 = 2,	//!< 2 stop bits
246
 };
246
 };
247
 //! Possible values of bParityType
247
 //! Possible values of bParityType
248
-enum cdc_parity : char {
248
+enum cdc_parity {
249
 	CDC_PAR_NONE = 0,	//!< No parity
249
 	CDC_PAR_NONE = 0,	//!< No parity
250
 	CDC_PAR_ODD = 1,	//!< Odd parity
250
 	CDC_PAR_ODD = 1,	//!< Odd parity
251
 	CDC_PAR_EVEN = 2,	//!< Even parity
251
 	CDC_PAR_EVEN = 2,	//!< Even parity

+ 1
- 1
Marlin/src/HAL/HAL_DUE/usb/usb_protocol_msc.h View File

93
 /**
93
 /**
94
  * \brief MSC USB requests (bRequest)
94
  * \brief MSC USB requests (bRequest)
95
  */
95
  */
96
-enum usb_reqid_msc : unsigned char {
96
+enum usb_reqid_msc {
97
 	USB_REQ_MSC_BULK_RESET = 0xFF,	//!< Mass Storage Reset
97
 	USB_REQ_MSC_BULK_RESET = 0xFF,	//!< Mass Storage Reset
98
 	USB_REQ_MSC_GET_MAX_LUN = 0xFE 	//!< Get Max LUN
98
 	USB_REQ_MSC_GET_MAX_LUN = 0xFE 	//!< Get Max LUN
99
 };
99
 };

Loading…
Cancel
Save