Skip to content

Commit 9981a4f

Browse files
makarenyafpistm
authored andcommitted
[USB Middleware] New style format with astyle (#453)
Signed-off-by: makarenya <[email protected]>
1 parent 54478a1 commit 9981a4f

Some content is hidden

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

77 files changed

+6993
-8412
lines changed

CI/astyle/.astyleignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.git
22
BUILD
33
CI
4-
system
4+
system/Drivers
5+
system/STM32*

system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc/usbd_audio.h

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define __USB_AUDIO_H
2323

2424
#ifdef __cplusplus
25-
extern "C" {
25+
extern "C" {
2626
#endif
2727

2828
/* Includes ------------------------------------------------------------------*/
@@ -101,17 +101,15 @@
101101
/* Total size of the audio transfer buffer */
102102
#define AUDIO_TOTAL_BUF_SIZE ((uint16_t)(AUDIO_OUT_PACKET * AUDIO_OUT_PACKET_NUM))
103103

104-
/* Audio Commands enumeration */
105-
typedef enum
106-
{
104+
/* Audio Commands enumeration */
105+
typedef enum {
107106
AUDIO_CMD_START = 1,
108107
AUDIO_CMD_PLAY,
109108
AUDIO_CMD_STOP,
110-
}AUDIO_CMD_TypeDef;
109+
} AUDIO_CMD_TypeDef;
111110

112111

113-
typedef enum
114-
{
112+
typedef enum {
115113
AUDIO_OFFSET_NONE = 0,
116114
AUDIO_OFFSET_HALF,
117115
AUDIO_OFFSET_FULL,
@@ -126,19 +124,17 @@ AUDIO_OffsetTypeDef;
126124
/** @defgroup USBD_CORE_Exported_TypesDefinitions
127125
* @{
128126
*/
129-
typedef struct
130-
{
131-
uint8_t cmd;
132-
uint8_t data[USB_MAX_EP0_SIZE];
133-
uint8_t len;
134-
uint8_t unit;
127+
typedef struct {
128+
uint8_t cmd;
129+
uint8_t data[USB_MAX_EP0_SIZE];
130+
uint8_t len;
131+
uint8_t unit;
135132
}
136133
USBD_AUDIO_ControlTypeDef;
137134

138135

139136

140-
typedef struct
141-
{
137+
typedef struct {
142138
uint32_t alt_setting;
143139
uint8_t buffer[AUDIO_TOTAL_BUF_SIZE];
144140
AUDIO_OffsetTypeDef offset;
@@ -150,16 +146,15 @@ typedef struct
150146
USBD_AUDIO_HandleTypeDef;
151147

152148

153-
typedef struct
154-
{
155-
int8_t (*Init) (uint32_t AudioFreq, uint32_t Volume, uint32_t options);
156-
int8_t (*DeInit) (uint32_t options);
157-
int8_t (*AudioCmd) (uint8_t* pbuf, uint32_t size, uint8_t cmd);
158-
int8_t (*VolumeCtl) (uint8_t vol);
159-
int8_t (*MuteCtl) (uint8_t cmd);
160-
int8_t (*PeriodicTC) (uint8_t cmd);
161-
int8_t (*GetState) (void);
162-
}USBD_AUDIO_ItfTypeDef;
149+
typedef struct {
150+
int8_t (*Init)(uint32_t AudioFreq, uint32_t Volume, uint32_t options);
151+
int8_t (*DeInit)(uint32_t options);
152+
int8_t (*AudioCmd)(uint8_t *pbuf, uint32_t size, uint8_t cmd);
153+
int8_t (*VolumeCtl)(uint8_t vol);
154+
int8_t (*MuteCtl)(uint8_t cmd);
155+
int8_t (*PeriodicTC)(uint8_t cmd);
156+
int8_t (*GetState)(void);
157+
} USBD_AUDIO_ItfTypeDef;
163158
/**
164159
* @}
165160
*/
@@ -187,10 +182,10 @@ extern USBD_ClassTypeDef USBD_AUDIO;
187182
/** @defgroup USB_CORE_Exported_Functions
188183
* @{
189184
*/
190-
uint8_t USBD_AUDIO_RegisterInterface (USBD_HandleTypeDef *pdev,
191-
USBD_AUDIO_ItfTypeDef *fops);
185+
uint8_t USBD_AUDIO_RegisterInterface(USBD_HandleTypeDef *pdev,
186+
USBD_AUDIO_ItfTypeDef *fops);
192187

193-
void USBD_AUDIO_Sync (USBD_HandleTypeDef *pdev, AUDIO_OffsetTypeDef offset);
188+
void USBD_AUDIO_Sync(USBD_HandleTypeDef *pdev, AUDIO_OffsetTypeDef offset);
194189
/**
195190
* @}
196191
*/

system/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc/usbd_audio_if_template.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define __USBD_AUDIO_IF_TEMPLATE_H
2323

2424
#ifdef __cplusplus
25-
extern "C" {
25+
extern "C" {
2626
#endif
2727

2828
/* Includes ------------------------------------------------------------------*/

0 commit comments

Comments
 (0)