Skip to content

Commit 3885c7e

Browse files
committed
Revert "Merge branch 'stm32duino:main' into hal-irqhandler-flagdisabling"
This reverts commit 67866e9, reversing changes made to 2a84e95.
1 parent 67866e9 commit 3885c7e

File tree

8 files changed

+2033
-2038
lines changed

8 files changed

+2033
-2038
lines changed

.github/actions/pio-build/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This action build thanks PIO.
44

5+
## Inputs
6+
7+
### `cmsis-version`
8+
9+
The CMSIS version to use. Default `"5.9.0"`.
10+
511
## Example usage
612

713
```yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# action.yml
22
name: 'PlatformIO Build'
33
description: 'Compile using PlatformIO'
4+
inputs:
5+
cmsis-version:
6+
description: 'CMSIS package version to use'
7+
default: '5.9.0'
48
runs:
59
using: 'docker'
610
image: 'Dockerfile'
11+
args:
12+
- ${{ inputs.cmsis-version }}

.github/actions/pio-build/entrypoint.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/sh
22

3+
readonly CMSIS_VERSION="$1"
4+
readonly CMSIS_ARCHIVE="CMSIS-${CMSIS_VERSION}.tar.bz2"
5+
36
# Use python venv
47
python3 -m venv "$HOME/venv"
58
# shellcheck disable=SC1091
@@ -8,18 +11,24 @@ python3 -m venv "$HOME/venv"
811
python3 -m pip install --quiet --upgrade platformio
912

1013
# Install the development version of ststm32 platform
11-
pio pkg install --platform "https://github.com/platformio/platform-ststm32.git" --force --global || {
14+
platformio platform install "https://github.com/platformio/platform-ststm32.git" || {
1215
exit 1
1316
}
1417
# Prepare framework for CI
15-
# Modify platform.json to use local framework-arduinoststm32 package
1618
python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoststm32']['version'] = '*'; del data['packages']['framework-arduinoststm32']['owner']; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
1719
exit 1
1820
}
19-
# Create symbolic link to the framework-arduinoststm32 package pointing to the repository workspace
21+
2022
ln --symbolic "$GITHUB_WORKSPACE" "$HOME/.platformio/packages/framework-arduinoststm32" || {
2123
exit 1
2224
}
25+
# Download and unpack CMSIS package
26+
wget --no-verbose "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/$CMSIS_VERSION/$CMSIS_ARCHIVE" || {
27+
exit 1
28+
}
29+
tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || {
30+
exit 1
31+
}
2332
cd "$GITHUB_WORKSPACE/CI/build/" || {
2433
exit 1
2534
}

boards.txt

Lines changed: 2004 additions & 1996 deletions
Large diffs are not rendered by default.

cores/arduino/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
void serialEventLP2() __attribute__((weak));
115115
#endif
116116
#if defined(HAVE_HWSERIALLP3)
117-
HardwareSerial SerialLP3(LPUART3);
117+
HardwareSerial SerialLP2(LPUART3);
118118
void serialEventLP3() __attribute__((weak));
119119
#endif
120120
#endif // HAVE_HWSERIALx

libraries/USBDevice/inc/usbd_cdc_if.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ void CDC_deInit(void);
5353
bool CDC_connected(void);
5454
void CDC_enableDTR(bool enable);
5555

56-
// getters for CDC line codings. Do not expose struct directly
57-
uint32_t CDC_getBaudrate(void);
58-
uint8_t CDC_getStopBits(void);
59-
uint8_t CDC_getParity(void);
60-
uint8_t CDC_getDataBits(void);
61-
6256
#ifdef __cplusplus
6357
}
6458
#endif

libraries/USBDevice/src/USBSerial.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,26 +158,22 @@ void USBSerial::flush(void)
158158

159159
uint32_t USBSerial::baud()
160160
{
161-
// return (virtual) CDC line setting coding
162-
return CDC_getBaudrate();
161+
return 115200;
163162
}
164163

165164
uint8_t USBSerial::stopbits()
166165
{
167-
// return (virtual) CDC line setting coding
168-
return CDC_getStopBits();
166+
return ONE_STOP_BIT;
169167
}
170168

171169
uint8_t USBSerial::paritytype()
172170
{
173-
// return (virtual) CDC line setting coding
174-
return CDC_getParity();
171+
return NO_PARITY;
175172
}
176173

177174
uint8_t USBSerial::numbits()
178175
{
179-
// return (virtual) CDC line setting coding
180-
return CDC_getDataBits();
176+
return 8;
181177
}
182178

183179
void USBSerial::dtr(bool enable)

libraries/USBDevice/src/cdc/usbd_cdc_if.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -379,30 +379,6 @@ void CDC_enableDTR(bool enable)
379379
CDC_DTR_enabled = enable;
380380
}
381381

382-
// getter for CDC baudrate
383-
uint32_t CDC_getBaudrate()
384-
{
385-
return linecoding.bitrate;
386-
}
387-
388-
// getter for CDC stop bits. Note: CDC definition identical to USBSerial.h
389-
uint8_t CDC_getStopBits(void)
390-
{
391-
return linecoding.format;
392-
}
393-
394-
// getter for CDC parity. Note: CDC definition identical to USBSerial.h
395-
uint8_t CDC_getParity(void)
396-
{
397-
return linecoding.paritytype;
398-
}
399-
400-
// getter for CDC data bits. Note: CDC definition identical to USBSerial.h
401-
uint8_t CDC_getDataBits(void)
402-
{
403-
return linecoding.datatype;
404-
}
405-
406382
#endif /* USBD_USE_CDC */
407383
#endif /* USBCON */
408384
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)