Skip to content

Commit 1b7e3cc

Browse files
committed
Fix yield problem and remove compiler warnings
1 parent ebdfc64 commit 1b7e3cc

File tree

9 files changed

+27
-57
lines changed

9 files changed

+27
-57
lines changed

digistump-avr-1.6.8.zip

-5.92 KB
Binary file not shown.

digistump-avr/libraries/DigisparkCDC/usbdrv.h

+5-11
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq);
223223
*/
224224
#if USB_CFG_HAVE_INTRIN_ENDPOINT
225225
USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
226-
#ifdef __cplusplus
227-
} // extern "C"
228-
#endif
229226
/* This function sets the message which will be sent during the next interrupt
230227
* IN transfer. The message is copied to an internal buffer and must not exceed
231228
* a length of 8 bytes. The message may be 0 bytes long just to indicate the
@@ -237,11 +234,11 @@ USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
237234
* sent. If you set a new interrupt message before the old was sent, the
238235
* message already buffered will be lost.
239236
*/
240-
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
237+
# if USB_CFG_HAVE_INTRIN_ENDPOINT3
241238
USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
242239
#define usbInterruptIsReady3() (usbTxLen3 & 0x10)
243240
/* Same as above for endpoint 3 */
244-
#endif
241+
# endif
245242
#endif /* USB_CFG_HAVE_INTRIN_ENDPOINT */
246243
#if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* simplified interface for backward compatibility */
247244
#define usbHidReportDescriptor usbDescriptorHidReport
@@ -254,9 +251,6 @@ USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
254251
*/
255252
#endif /* USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH */
256253
#if USB_CFG_IMPLEMENT_FN_WRITE
257-
#ifdef __cplusplus
258-
extern "C"{
259-
#endif
260254
USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
261255
/* This function is called by the driver to provide a control transfer's
262256
* payload data (control-out). It is called in chunks of up to 8 bytes. The
@@ -276,9 +270,6 @@ USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
276270
#endif /* USB_CFG_IMPLEMENT_FN_WRITE */
277271
#if USB_CFG_IMPLEMENT_FN_READ
278272
USB_PUBLIC uchar usbFunctionRead(uchar *data, uchar len);
279-
#ifdef __cplusplus
280-
} // extern "C"
281-
#endif
282273
/* This function is called by the driver to ask the application for a control
283274
* transfer's payload data (control-in). It is called in chunks of up to 8
284275
* bytes each. You should copy the data to the location given by 'data' and
@@ -299,6 +290,9 @@ USB_PUBLIC void usbFunctionWriteOut(uchar *data, uchar len);
299290
* usbconfig.h to get this function called.
300291
*/
301292
#endif /* USB_CFG_IMPLEMENT_FN_WRITEOUT */
293+
#ifdef __cplusplus
294+
} // extern "C"
295+
#endif
302296
#ifdef USB_CFG_PULLUP_IOPORTNAME
303297
#define usbDeviceConnect() ((USB_PULLUP_DDR |= (1<<USB_CFG_PULLUP_BIT)), \
304298
(USB_PULLUP_OUT |= (1<<USB_CFG_PULLUP_BIT)))

digistump-avr/libraries/DigisparkJoystick/usbdrv.h

+5-11
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq);
223223
*/
224224
#if USB_CFG_HAVE_INTRIN_ENDPOINT
225225
USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
226-
#ifdef __cplusplus
227-
} // extern "C"
228-
#endif
229226
/* This function sets the message which will be sent during the next interrupt
230227
* IN transfer. The message is copied to an internal buffer and must not exceed
231228
* a length of 8 bytes. The message may be 0 bytes long just to indicate the
@@ -237,11 +234,11 @@ USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
237234
* sent. If you set a new interrupt message before the old was sent, the
238235
* message already buffered will be lost.
239236
*/
240-
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
237+
# if USB_CFG_HAVE_INTRIN_ENDPOINT3
241238
USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
242239
#define usbInterruptIsReady3() (usbTxLen3 & 0x10)
243240
/* Same as above for endpoint 3 */
244-
#endif
241+
# endif
245242
#endif /* USB_CFG_HAVE_INTRIN_ENDPOINT */
246243
#if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* simplified interface for backward compatibility */
247244
#define usbHidReportDescriptor usbDescriptorHidReport
@@ -254,9 +251,6 @@ USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
254251
*/
255252
#endif /* USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH */
256253
#if USB_CFG_IMPLEMENT_FN_WRITE
257-
#ifdef __cplusplus
258-
extern "C"{
259-
#endif
260254
USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
261255
/* This function is called by the driver to provide a control transfer's
262256
* payload data (control-out). It is called in chunks of up to 8 bytes. The
@@ -276,9 +270,6 @@ USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
276270
#endif /* USB_CFG_IMPLEMENT_FN_WRITE */
277271
#if USB_CFG_IMPLEMENT_FN_READ
278272
USB_PUBLIC uchar usbFunctionRead(uchar *data, uchar len);
279-
#ifdef __cplusplus
280-
} // extern "C"
281-
#endif
282273
/* This function is called by the driver to ask the application for a control
283274
* transfer's payload data (control-in). It is called in chunks of up to 8
284275
* bytes each. You should copy the data to the location given by 'data' and
@@ -299,6 +290,9 @@ USB_PUBLIC void usbFunctionWriteOut(uchar *data, uchar len);
299290
* usbconfig.h to get this function called.
300291
*/
301292
#endif /* USB_CFG_IMPLEMENT_FN_WRITEOUT */
293+
#ifdef __cplusplus
294+
} // extern "C"
295+
#endif
302296
#ifdef USB_CFG_PULLUP_IOPORTNAME
303297
#define usbDeviceConnect() ((USB_PULLUP_DDR |= (1<<USB_CFG_PULLUP_BIT)), \
304298
(USB_PULLUP_OUT |= (1<<USB_CFG_PULLUP_BIT)))

digistump-avr/libraries/DigisparkKeyboard/usbdrv.h

+5-11
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq);
223223
*/
224224
#if USB_CFG_HAVE_INTRIN_ENDPOINT
225225
USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
226-
#ifdef __cplusplus
227-
} // extern "C"
228-
#endif
229226
/* This function sets the message which will be sent during the next interrupt
230227
* IN transfer. The message is copied to an internal buffer and must not exceed
231228
* a length of 8 bytes. The message may be 0 bytes long just to indicate the
@@ -237,11 +234,11 @@ USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
237234
* sent. If you set a new interrupt message before the old was sent, the
238235
* message already buffered will be lost.
239236
*/
240-
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
237+
# if USB_CFG_HAVE_INTRIN_ENDPOINT3
241238
USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
242239
#define usbInterruptIsReady3() (usbTxLen3 & 0x10)
243240
/* Same as above for endpoint 3 */
244-
#endif
241+
# endif
245242
#endif /* USB_CFG_HAVE_INTRIN_ENDPOINT */
246243
#if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* simplified interface for backward compatibility */
247244
#define usbHidReportDescriptor usbDescriptorHidReport
@@ -254,9 +251,6 @@ USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
254251
*/
255252
#endif /* USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH */
256253
#if USB_CFG_IMPLEMENT_FN_WRITE
257-
#ifdef __cplusplus
258-
extern "C"{
259-
#endif
260254
USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
261255
/* This function is called by the driver to provide a control transfer's
262256
* payload data (control-out). It is called in chunks of up to 8 bytes. The
@@ -276,9 +270,6 @@ USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
276270
#endif /* USB_CFG_IMPLEMENT_FN_WRITE */
277271
#if USB_CFG_IMPLEMENT_FN_READ
278272
USB_PUBLIC uchar usbFunctionRead(uchar *data, uchar len);
279-
#ifdef __cplusplus
280-
} // extern "C"
281-
#endif
282273
/* This function is called by the driver to ask the application for a control
283274
* transfer's payload data (control-in). It is called in chunks of up to 8
284275
* bytes each. You should copy the data to the location given by 'data' and
@@ -299,6 +290,9 @@ USB_PUBLIC void usbFunctionWriteOut(uchar *data, uchar len);
299290
* usbconfig.h to get this function called.
300291
*/
301292
#endif /* USB_CFG_IMPLEMENT_FN_WRITEOUT */
293+
#ifdef __cplusplus
294+
} // extern "C"
295+
#endif
302296
#ifdef USB_CFG_PULLUP_IOPORTNAME
303297
#define usbDeviceConnect() ((USB_PULLUP_DDR |= (1<<USB_CFG_PULLUP_BIT)), \
304298
(USB_PULLUP_OUT |= (1<<USB_CFG_PULLUP_BIT)))

digistump-avr/libraries/DigisparkMouse/usbdrv.h

+5-11
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq);
223223
*/
224224
#if USB_CFG_HAVE_INTRIN_ENDPOINT
225225
USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
226-
#ifdef __cplusplus
227-
} // extern "C"
228-
#endif
229226
/* This function sets the message which will be sent during the next interrupt
230227
* IN transfer. The message is copied to an internal buffer and must not exceed
231228
* a length of 8 bytes. The message may be 0 bytes long just to indicate the
@@ -237,11 +234,11 @@ USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
237234
* sent. If you set a new interrupt message before the old was sent, the
238235
* message already buffered will be lost.
239236
*/
240-
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
237+
# if USB_CFG_HAVE_INTRIN_ENDPOINT3
241238
USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
242239
#define usbInterruptIsReady3() (usbTxLen3 & 0x10)
243240
/* Same as above for endpoint 3 */
244-
#endif
241+
# endif
245242
#endif /* USB_CFG_HAVE_INTRIN_ENDPOINT */
246243
#if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* simplified interface for backward compatibility */
247244
#define usbHidReportDescriptor usbDescriptorHidReport
@@ -254,9 +251,6 @@ USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
254251
*/
255252
#endif /* USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH */
256253
#if USB_CFG_IMPLEMENT_FN_WRITE
257-
#ifdef __cplusplus
258-
extern "C"{
259-
#endif
260254
USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
261255
/* This function is called by the driver to provide a control transfer's
262256
* payload data (control-out). It is called in chunks of up to 8 bytes. The
@@ -276,9 +270,6 @@ USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
276270
#endif /* USB_CFG_IMPLEMENT_FN_WRITE */
277271
#if USB_CFG_IMPLEMENT_FN_READ
278272
USB_PUBLIC uchar usbFunctionRead(uchar *data, uchar len);
279-
#ifdef __cplusplus
280-
} // extern "C"
281-
#endif
282273
/* This function is called by the driver to ask the application for a control
283274
* transfer's payload data (control-in). It is called in chunks of up to 8
284275
* bytes each. You should copy the data to the location given by 'data' and
@@ -299,6 +290,9 @@ USB_PUBLIC void usbFunctionWriteOut(uchar *data, uchar len);
299290
* usbconfig.h to get this function called.
300291
*/
301292
#endif /* USB_CFG_IMPLEMENT_FN_WRITEOUT */
293+
#ifdef __cplusplus
294+
} // extern "C"
295+
#endif
302296
#ifdef USB_CFG_PULLUP_IOPORTNAME
303297
#define usbDeviceConnect() ((USB_PULLUP_DDR |= (1<<USB_CFG_PULLUP_BIT)), \
304298
(USB_PULLUP_OUT |= (1<<USB_CFG_PULLUP_BIT)))

digistump-avr/libraries/DigisparkUSB/usbdrv.h

+5-11
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq);
223223
*/
224224
#if USB_CFG_HAVE_INTRIN_ENDPOINT
225225
USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
226-
#ifdef __cplusplus
227-
} // extern "C"
228-
#endif
229226
/* This function sets the message which will be sent during the next interrupt
230227
* IN transfer. The message is copied to an internal buffer and must not exceed
231228
* a length of 8 bytes. The message may be 0 bytes long just to indicate the
@@ -237,11 +234,11 @@ USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len);
237234
* sent. If you set a new interrupt message before the old was sent, the
238235
* message already buffered will be lost.
239236
*/
240-
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
237+
# if USB_CFG_HAVE_INTRIN_ENDPOINT3
241238
USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
242239
#define usbInterruptIsReady3() (usbTxLen3 & 0x10)
243240
/* Same as above for endpoint 3 */
244-
#endif
241+
# endif
245242
#endif /* USB_CFG_HAVE_INTRIN_ENDPOINT */
246243
#if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* simplified interface for backward compatibility */
247244
#define usbHidReportDescriptor usbDescriptorHidReport
@@ -254,9 +251,6 @@ USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len);
254251
*/
255252
#endif /* USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH */
256253
#if USB_CFG_IMPLEMENT_FN_WRITE
257-
#ifdef __cplusplus
258-
extern "C"{
259-
#endif
260254
USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
261255
/* This function is called by the driver to provide a control transfer's
262256
* payload data (control-out). It is called in chunks of up to 8 bytes. The
@@ -276,9 +270,6 @@ USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len);
276270
#endif /* USB_CFG_IMPLEMENT_FN_WRITE */
277271
#if USB_CFG_IMPLEMENT_FN_READ
278272
USB_PUBLIC uchar usbFunctionRead(uchar *data, uchar len);
279-
#ifdef __cplusplus
280-
} // extern "C"
281-
#endif
282273
/* This function is called by the driver to ask the application for a control
283274
* transfer's payload data (control-in). It is called in chunks of up to 8
284275
* bytes each. You should copy the data to the location given by 'data' and
@@ -299,6 +290,9 @@ USB_PUBLIC void usbFunctionWriteOut(uchar *data, uchar len);
299290
* usbconfig.h to get this function called.
300291
*/
301292
#endif /* USB_CFG_IMPLEMENT_FN_WRITEOUT */
293+
#ifdef __cplusplus
294+
} // extern "C"
295+
#endif
302296
#ifdef USB_CFG_PULLUP_IOPORTNAME
303297
#define usbDeviceConnect() ((USB_PULLUP_DDR |= (1<<USB_CFG_PULLUP_BIT)), \
304298
(USB_PULLUP_OUT |= (1<<USB_CFG_PULLUP_BIT)))
-6.14 KB
Binary file not shown.

package_digistump_index.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"category": "Digistump",
1717
"url": "https://github.com/ArminJo/DigistumpArduino/raw/master/digistump-avr-1.6.8.zip",
1818
"archiveFileName": "digistump-avr-1.6.8.zip",
19-
"checksum": "SHA-256:959a75c48f02815e5bd47574e1045f8a7fbed65ac16216bb78d17c1f8881b608",
20-
"size": "2200397",
19+
"checksum": "SHA-256:b718c57352a255f045a2c9c6a6a338e8a89e948db4b91b03cf274fcba15e9ca2",
20+
"size": "2194333",
2121
"help": {
2222
"online": "https://github.com/digistump/DigistumpArduino/issues"
2323
},

0 commit comments

Comments
 (0)