Skip to content

Commit d92b810

Browse files
committed
fix Identifiers that start with '__' or '_[A-Z]' are reserved.
fix compiling with nuc family
1 parent 417f44a commit d92b810

File tree

120 files changed

+404
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+404
-405
lines changed

.github/actions/setup_toolchain/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
env:
3434
TOOLCHAIN: ${{ inputs.toolchain }}
3535
run: |
36-
TOOLCHAIN_URL=$(jq -r '."$TOOLCHAIN"' .github/actions/setup_toolchain/toolchain.json)
36+
TOOLCHAIN_URL=$(jq -r --arg tc "$TOOLCHAIN" '.[$tc]' .github/actions/setup_toolchain/toolchain.json)
3737
echo "toolchain_url=$TOOLCHAIN_URL"
3838
echo "toolchain_url=$TOOLCHAIN_URL" >> $GITHUB_OUTPUT
3939
shell: bash

examples/device/audio_4_channel_mic/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*
2424
*/
2525

26-
#ifndef _TUSB_CONFIG_H_
27-
#define _TUSB_CONFIG_H_
26+
#ifndef TUSB_CONFIG_H_
27+
#define TUSB_CONFIG_H_
2828

2929
#ifdef __cplusplus
3030
extern "C" {
@@ -123,4 +123,4 @@ extern "C" {
123123
}
124124
#endif
125125

126-
#endif /* _TUSB_CONFIG_H_ */
126+
#endif /* TUSB_CONFIG_H_ */

examples/device/audio_4_channel_mic/src/usb_descriptors.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
* Auto ProductID layout's Bitmap:
3333
* [MSB] AUDIO | MIDI | HID | MSC | CDC [LSB]
3434
*/
35-
#define _PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36-
#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
37-
_PID_MAP(MIDI, 3) | _PID_MAP(AUDIO, 4) | _PID_MAP(VENDOR, 5) )
35+
#define PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36+
#define USB_PID (0x4000 | PID_MAP(CDC, 0) | PID_MAP(MSC, 1) | PID_MAP(HID, 2) | \
37+
PID_MAP(MIDI, 3) | PID_MAP(AUDIO, 4) | PID_MAP(VENDOR, 5) )
3838

3939
//--------------------------------------------------------------------+
4040
// Device Descriptors

examples/device/audio_4_channel_mic_freertos/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*
2424
*/
2525

26-
#ifndef _TUSB_CONFIG_H_
27-
#define _TUSB_CONFIG_H_
26+
#ifndef TUSB_CONFIG_H_
27+
#define TUSB_CONFIG_H_
2828

2929
#ifdef __cplusplus
3030
extern "C" {
@@ -129,4 +129,4 @@ extern "C" {
129129
}
130130
#endif
131131

132-
#endif /* _TUSB_CONFIG_H_ */
132+
#endif /* TUSB_CONFIG_H_ */

examples/device/audio_4_channel_mic_freertos/src/usb_descriptors.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
* Auto ProductID layout's Bitmap:
3333
* [MSB] AUDIO | MIDI | HID | MSC | CDC [LSB]
3434
*/
35-
#define _PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36-
#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
37-
_PID_MAP(MIDI, 3) | _PID_MAP(AUDIO, 4) | _PID_MAP(VENDOR, 5) )
35+
#define PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36+
#define USB_PID (0x4000 | PID_MAP(CDC, 0) | PID_MAP(MSC, 1) | PID_MAP(HID, 2) | \
37+
PID_MAP(MIDI, 3) | PID_MAP(AUDIO, 4) | PID_MAP(VENDOR, 5) )
3838

3939
//--------------------------------------------------------------------+
4040
// Device Descriptors

examples/device/audio_test/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*
2424
*/
2525

26-
#ifndef _TUSB_CONFIG_H_
27-
#define _TUSB_CONFIG_H_
26+
#ifndef TUSB_CONFIG_H_
27+
#define TUSB_CONFIG_H_
2828

2929
#ifdef __cplusplus
3030
extern "C" {
@@ -122,4 +122,4 @@ extern "C" {
122122
}
123123
#endif
124124

125-
#endif /* _TUSB_CONFIG_H_ */
125+
#endif /* TUSB_CONFIG_H_ */

examples/device/audio_test/src/usb_descriptors.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
* Auto ProductID layout's Bitmap:
3333
* [MSB] AUDIO | MIDI | HID | MSC | CDC [LSB]
3434
*/
35-
#define _PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36-
#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
37-
_PID_MAP(MIDI, 3) | _PID_MAP(AUDIO, 4) | _PID_MAP(VENDOR, 5) )
35+
#define PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36+
#define USB_PID (0x4000 | PID_MAP(CDC, 0) | PID_MAP(MSC, 1) | PID_MAP(HID, 2) | \
37+
PID_MAP(MIDI, 3) | PID_MAP(AUDIO, 4) | PID_MAP(VENDOR, 5) )
3838

3939
//--------------------------------------------------------------------+
4040
// Device Descriptors

examples/device/audio_test_freertos/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*
2424
*/
2525

26-
#ifndef _TUSB_CONFIG_H_
27-
#define _TUSB_CONFIG_H_
26+
#ifndef TUSB_CONFIG_H_
27+
#define TUSB_CONFIG_H_
2828

2929
#ifdef __cplusplus
3030
extern "C" {
@@ -128,4 +128,4 @@ extern "C" {
128128
}
129129
#endif
130130

131-
#endif /* _TUSB_CONFIG_H_ */
131+
#endif /* TUSB_CONFIG_H_ */

examples/device/audio_test_freertos/src/usb_descriptors.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
* Auto ProductID layout's Bitmap:
3333
* [MSB] AUDIO | MIDI | HID | MSC | CDC [LSB]
3434
*/
35-
#define _PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36-
#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
37-
_PID_MAP(MIDI, 3) | _PID_MAP(AUDIO, 4) | _PID_MAP(VENDOR, 5) )
35+
#define PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0)
36+
#define USB_PID (0x4000 | PID_MAP(CDC, 0) | PID_MAP(MSC, 1) | PID_MAP(HID, 2) | \
37+
PID_MAP(MIDI, 3) | PID_MAP(AUDIO, 4) | PID_MAP(VENDOR, 5) )
3838

3939
//--------------------------------------------------------------------+
4040
// Device Descriptors

examples/device/audio_test_multi_rate/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*
2424
*/
2525

26-
#ifndef _TUSB_CONFIG_H_
27-
#define _TUSB_CONFIG_H_
26+
#ifndef TUSB_CONFIG_H_
27+
#define TUSB_CONFIG_H_
2828

2929
#ifdef __cplusplus
3030
extern "C" {
@@ -138,4 +138,4 @@ extern "C" {
138138
}
139139
#endif
140140

141-
#endif /* _TUSB_CONFIG_H_ */
141+
#endif /* TUSB_CONFIG_H_ */

0 commit comments

Comments
 (0)