Skip to content

Commit 7c8e6b1

Browse files
committed
fixup! astyle
1 parent aebcddf commit 7c8e6b1

File tree

6 files changed

+24
-27
lines changed

6 files changed

+24
-27
lines changed

Diff for: cores/arduino/stm32/clock.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ void enableClock(sourceClock_t source)
111111
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
112112

113113
#if defined(STM32MP1xx)
114-
/** Clock source selection is done by First Stage Boot Loader on Cortex A
114+
/** Clock source selection is done by First Stage Boot Loader on Cortex A
115115
* See variant.cpp for corresponding boards.
116116
*/
117-
if(!IS_ENGINEERING_BOOT_MODE()) {
117+
if (!IS_ENGINEERING_BOOT_MODE()) {
118118
return;
119119
}
120120
#endif /* STM32MP1xx */

Diff for: cores/arduino/stm32/lock_resource.c

+10-12
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
******************************************************************************
33
* @file lock_resource.c
44
* @author MCD Application Team
5-
* @brief This sample code provides hardware semaphore using HSEM for
6-
* synchronization and mutual exclusion between heterogeneous processors
7-
* and those not operating under a single, shared operating system.
5+
* @brief This sample code provides hardware semaphore using HSEM for
6+
* synchronization and mutual exclusion between heterogeneous processors
7+
* and those not operating under a single, shared operating system.
88
******************************************************************************
99
* @attention
1010
*
@@ -19,7 +19,7 @@
1919
******************************************************************************
2020
*/
2121

22-
/* Includes ------------------------------------------------------------------*/
22+
/* Includes ------------------------------------------------------------------*/
2323
#include "lock_resource.h"
2424

2525
#if defined(HAL_HSEM_MODULE_ENABLED)
@@ -58,7 +58,7 @@
5858
* Timeout: timeout value in msecs
5959
* @retval Return Status
6060
*/
61-
LockResource_Status_t Periph_Lock(void* Peripheral, uint32_t Timeout)
61+
LockResource_Status_t Periph_Lock(void *Peripheral, uint32_t Timeout)
6262
{
6363
uint32_t tickstart = 0U;
6464
LockResource_Status_t ret = LOCK_RESOURCE_STATUS_OK;
@@ -67,13 +67,11 @@ LockResource_Status_t Periph_Lock(void* Peripheral, uint32_t Timeout)
6767
tickstart = HAL_GetTick();
6868

6969
/* Try to Take HSEM assigned to the Peripheral */
70-
while (HAL_HSEM_FastTake(GET_HSEM_SEM_INDEX(Peripheral)) != HAL_OK)
71-
{
70+
while (HAL_HSEM_FastTake(GET_HSEM_SEM_INDEX(Peripheral)) != HAL_OK) {
7271

73-
if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout))
74-
{
75-
ret = LOCK_RESOURCE_STATUS_TIMEOUT;
76-
Error_Handler();
72+
if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) {
73+
ret = LOCK_RESOURCE_STATUS_TIMEOUT;
74+
Error_Handler();
7775
}
7876
}
7977

@@ -85,7 +83,7 @@ LockResource_Status_t Periph_Lock(void* Peripheral, uint32_t Timeout)
8583
* @param Peripheral: used to identify which peripheral and the related semaphore
8684
* @retval None
8785
*/
88-
void Periph_Unlock(void* Peripheral)
86+
void Periph_Unlock(void *Peripheral)
8987
{
9088
/* Release HSEM */
9189
HAL_HSEM_Release(GET_HSEM_SEM_INDEX(Peripheral), 0);

Diff for: cores/arduino/stm32/lock_resource.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
******************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
9+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
1010
* All rights reserved.</center></h2>
1111
*
1212
* This software component is licensed by ST under BSD 3-Clause license,
13-
* the "License"; You may not use this file except in compliance with the
13+
* the "License"; You may not use this file except in compliance with the
1414
* License. You may obtain a copy of the License at:
1515
* opensource.org/licenses/BSD-3-Clause
1616
*
@@ -25,8 +25,7 @@
2525

2626

2727
/* Exported types ------------------------------------------------------------*/
28-
typedef enum
29-
{
28+
typedef enum {
3029
LOCK_RESOURCE_STATUS_OK = 0x00U,
3130
LOCK_RESOURCE_STATUS_ERROR = 0x01U,
3231
LOCK_RESOURCE_STATUS_TIMEOUT = 0x02U
@@ -40,8 +39,8 @@ typedef enum
4039
#define PERIPH_UNLOCK(__Periph__) Periph_Unlock(__Periph__)
4140

4241
/* Exported functions ------------------------------------------------------- */
43-
LockResource_Status_t Periph_Lock(void* Peripheral, uint32_t Timeout);
44-
void Periph_Unlock(void* Peripheral);
42+
LockResource_Status_t Periph_Lock(void *Peripheral, uint32_t Timeout);
43+
void Periph_Unlock(void *Peripheral);
4544

4645

4746

Diff for: cores/arduino/stm32/pinmap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void pin_function(PinName pin, int function)
135135
pin_PullConfig(gpio, ll_pin, STM_PIN_PUPD(function));
136136

137137
pin_DisconnectDebug(pin);
138-
138+
139139
#if defined(STM32MP1xx)
140140
PERIPH_UNLOCK(gpio);
141141
#endif

Diff for: variants/STM32MP157_DK/PeripheralPins.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ const PinMap PinMap_PWM[] = {
290290
//*** SERIAL ***
291291
/**
292292
* stm32mp157c-dk2-m4-examples.dts defines UART7 only.
293-
*
293+
*
294294
* Banned peripherals:
295295
* UART8: Used by U-Boot UART
296296
* UART4: Used by U-Boot debug

Diff for: variants/STM32MP157_DK/variant.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const PinName digitalPin[] = {
106106
// CN17 Left Arduino Analog Pins
107107
PF_14, //A0 - D19, D47 - ADC2_INP6
108108
PF_13, //A1 - D20, D48 - ADC2_INP2
109-
ANA_0, //A2 - D21, D49 - ADC1_INP0
109+
ANA_0, //A2 - D21, D49 - ADC1_INP0
110110
ANA_1, //A3 - D22, D50 - ADC1_INP1
111111
PC_3, //A4 - D23, D51 - ADC1_INP13, or PA_12 (D14) with SB23 ON / SB24 OFF
112112
PF_12 //A5 - D24, D52 - ADC1_INP6, or PA_11 (D15) with SB25 ON / SB26 OFF
@@ -135,16 +135,16 @@ void SystemClock_Config(void)
135135
* NOT a WEAK function, preventing being overriden.
136136
* In STM32MP1 series, SystemClock_Config()) is "done" by running the FSBL
137137
* (First Stage Boot Loader) on Cortex-A. This function call shall NOT be
138-
* executed in production mode. SystemClock_Config() shall be under
138+
* executed in production mode. SystemClock_Config() shall be under
139139
* if(IS_ENGINEERING_BOOT_MODE()).
140-
*
140+
*
141141
* NOTE:
142142
* * Production mode: Both CA7 and CM4 core running, BOOT0 and BOOT2 are ON.
143143
* * Engineering mode: Only CM4 running, BOOT0 = OFF, BOOT2 = ON.
144144
* See:
145145
* https://wiki.st.com/stm32mpu/wiki/STM32CubeMP1_development_guidelines
146146
*/
147-
if(!IS_ENGINEERING_BOOT_MODE()) {
147+
if (!IS_ENGINEERING_BOOT_MODE()) {
148148
return;
149149
}
150150

@@ -159,7 +159,7 @@ void SystemClock_Config(void)
159159
/**Initializes the CPU, AHB and APB busses clocks
160160
*/
161161
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE
162-
| RCC_OSCILLATORTYPE_LSE;
162+
| RCC_OSCILLATORTYPE_LSE;
163163
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
164164
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
165165
RCC_OscInitStruct.HSIState = RCC_HSI_ON;

0 commit comments

Comments
 (0)