Skip to content

Commit de8dab9

Browse files
committed
ci(example): update BareMinimun.ino
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 1ae6110 commit de8dab9

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

CI/build/examples/BareMinimum/BareMinimum.ino

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,37 @@
1919
/* ----------------------------------------------------------------------
2020
Defines each of the tests performed
2121
------------------------------------------------------------------- */
22-
#define MAX_BLOCKSIZE 2
23-
#define DELTA (0.0001f)
22+
#define MAX_BLOCKSIZE 2
23+
#define DELTA (0.0001f)
2424
/* ----------------------------------------------------------------------
2525
Test input data for Floating point sin_cos example for 32-blockSize
2626
Generated by the MATLAB randn() function
2727
------------------------------------------------------------------- */
28-
const float32_t testInput_f32[MAX_BLOCKSIZE] =
29-
{
30-
-1.244916875853235400, -4.793533929171324800
28+
const float32_t testInput_f32[MAX_BLOCKSIZE] = {
29+
-1.244916875853235400, -4.793533929171324800
3130
};
3231
const float32_t testRefOutput_f32 = 1.000000000;
3332
/* ----------------------------------------------------------------------
3433
Declare Global variables
3534
------------------------------------------------------------------- */
3635
uint32_t blockSize = 2;
37-
float32_t testOutput;
38-
float32_t cosOutput;
39-
float32_t sinOutput;
40-
float32_t cosSquareOutput;
41-
float32_t sinSquareOutput;
36+
float32_t testOutput;
37+
float32_t cosOutput;
38+
float32_t sinOutput;
39+
float32_t cosSquareOutput;
40+
float32_t sinSquareOutput;
4241
/* ----------------------------------------------------------------------
4342
Max magnitude FFT Bin test
4443
------------------------------------------------------------------- */
4544
arm_status status;
4645
/* CMSIS_DSP */
4746

4847
#ifndef USER_BTN
49-
#define USER_BTN 2
48+
#define USER_BTN 2
5049
#endif
5150

5251
#ifndef LED_BUILTIN
53-
#define LED_BUILTIN 13
52+
#define LED_BUILTIN 13
5453
#endif
5554

5655
#ifndef PIN_SERIAL_RX
@@ -72,8 +71,7 @@ SoftwareSerial swSerial(10, 11);
7271

7372
void setup() {
7473
// Serial HW & SW
75-
#if (!defined(USBD_USE_CDC) && !defined(DISABLE_GENERIC_SERIALUSB)) &&\
76-
(!defined(VIRTIOCON) && !defined(DISABLE_GENERIC_SERIALVIRTIO))
74+
#if (!defined(USBD_USE_CDC) && !defined(DISABLE_GENERIC_SERIALUSB)) && (!defined(VIRTIOCON) && !defined(DISABLE_GENERIC_SERIALVIRTIO))
7775
Serial.setRx(PIN_SERIAL_RX);
7876
Serial.setTx(digitalPinToPinName(PIN_SERIAL_TX));
7977
#endif
@@ -92,7 +90,7 @@ void setup() {
9290

9391
// EEPROM
9492
byte value = EEPROM.read(0x01);
95-
EEPROM.write(EEPROM.length()-1, value);
93+
EEPROM.write(EEPROM.length() - 1, value);
9694

9795
#ifndef STM32MP1xx
9896
// IWDG
@@ -111,13 +109,13 @@ void setup() {
111109
#endif
112110

113111
// SPI
114-
SPISettings settings(SPI_SPEED_CLOCK_DEFAULT, MSBFIRST, SPI_MODE_0);
112+
SPISettings settings(SPI_SPEED_CLOCK_DEFAULT, MSBFIRST, SPI_MODE0);
115113
SPI.setMISO(PIN_SPI_MISO);
116114
SPI.setMOSI(PIN_SPI_MOSI);
117115
SPI.setSCLK(PIN_SPI_SCK);
118116
SPI.setSSEL(digitalPinToPinName(PIN_SPI_SS));
119-
SPI.begin(PIN_SPI_SS);
120-
SPI.beginTransaction(1, settings);
117+
SPI.begin();
118+
SPI.beginTransaction(settings);
121119
SPI.endTransaction();
122120
SPI.transfer(1);
123121
SPI.end();
@@ -146,7 +144,7 @@ void setup() {
146144
diff = fabsf(testRefOutput_f32 - testOutput);
147145
/* Comparison of sin_cos value with reference */
148146
status = (diff > DELTA) ? ARM_MATH_TEST_FAILURE : ARM_MATH_SUCCESS;
149-
if ( status == ARM_MATH_TEST_FAILURE) {
147+
if (status == ARM_MATH_TEST_FAILURE) {
150148
break;
151149
}
152150
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy