Skip to content

Commit f399124

Browse files
committed
clang-format bot reformatting.
1 parent a424100 commit f399124

File tree

12 files changed

+72
-69
lines changed

12 files changed

+72
-69
lines changed

Libraries/Boards/MAX32572/EvKit_V1/Include/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int MXC_Ext_Write(uint32_t address, uint32_t length, uint8_t *buffer);
109109
* @return #EF_E_SUCCESS If function is successful.
110110
* @note make sure to disable SFCC and interrupts; before running this function
111111
*/
112-
int MXC_Ext_Read(int address, uint8_t* buffer, int len);
112+
int MXC_Ext_Read(int address, uint8_t *buffer, int len);
113113

114114
/**
115115
* @brief Erases the sector of external flash at the specified address.

Libraries/CMSIS/Include/core_rv32.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,16 @@ typedef struct {
309309
#define NVIC_STIR_INTID_Msk (0x1FFUL << NVIC_STIR_INTID_Pos) /*!< STIR: INTLINESNUM Mask */
310310

311311
/*@} end of group CMSIS_NVIC */
312-
312+
313313
/* For MCUs with extra RISCV core (RISCV1) */
314314
#ifdef __riscv1
315-
#define MXC_BASE_INTR ((uint32_t)0xE5170000UL)
316-
#define MXC_BASE_EVENT ((uint32_t)0xE5170020UL)
317-
#define MXC_BASE_SLEEP ((uint32_t)0xE5170040UL)
315+
#define MXC_BASE_INTR ((uint32_t)0xE5170000UL)
316+
#define MXC_BASE_EVENT ((uint32_t)0xE5170020UL)
317+
#define MXC_BASE_SLEEP ((uint32_t)0xE5170040UL)
318318
#else
319-
#define MXC_BASE_INTR ((uint32_t)0xE5070000UL)
320-
#define MXC_BASE_EVENT ((uint32_t)0xE5070020UL)
321-
#define MXC_BASE_SLEEP ((uint32_t)0xE5070040UL)
319+
#define MXC_BASE_INTR ((uint32_t)0xE5070000UL)
320+
#define MXC_BASE_EVENT ((uint32_t)0xE5070020UL)
321+
#define MXC_BASE_SLEEP ((uint32_t)0xE5070040UL)
322322
#endif
323323

324324
#define MXC_INTR ((mxc_intr_regs_t *)MXC_BASE_INTR)

Libraries/MiscDrivers/ExtMemory/Ext_Flash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ extern "C" {
119119
#endif
120120

121121
#ifdef EXT_FLASH_READ_DUMMY
122-
// Deprecated name. Please use EXT_FLASH_READ_DUMMY
123-
#define EXT_FLASH_Read_DUMMY EXT_FLASH_READ_DUMMY
122+
// Deprecated name. Please use EXT_FLASH_READ_DUMMY
123+
#define EXT_FLASH_Read_DUMMY EXT_FLASH_READ_DUMMY
124124
#endif
125125

126126
/**

Libraries/MiscDrivers/ExtMemory/is25.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#define IS25_WEL_MASK 0x02 /**< Status Reg-1: Write Enable Latch mask */
4242
#define IS25_QE_MASK 0x40 /**< Status Reg-2: Quad-SPI enable mask */
4343

44-
4544
#define IS25_DEVICE_SIZE 0x1000000
4645
#define IS25_BLOCK_SIZE 0x10000
4746
#define IS25_PAGE_SIZE 256
@@ -245,7 +244,6 @@ uint32_t Ext_Flash_ID(void)
245244
uint8_t cmd = IS25_CMD_ID;
246245
uint8_t id[IS25_ID_LEN];
247246

248-
249247
// Send the command
250248
if ((err = g_cfg.write(&cmd, 1, 0, Ext_Flash_DataLine_Single)) != EF_E_SUCCESS) {
251249
return err;

Libraries/MiscDrivers/Touchscreen/tsc2007.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,16 @@ int ts_event = false;
7474

7575
uint16_t tsX, tsY, tsZ1;
7676

77-
static uint8_t tsConstructCommand(mxc_ts_cmd_func_t function, mxc_ts_cmd_pdown_t pdown, mxc_ts_cmd_mode_t mode)
77+
static uint8_t tsConstructCommand(mxc_ts_cmd_func_t function, mxc_ts_cmd_pdown_t pdown,
78+
mxc_ts_cmd_mode_t mode)
7879
{
7980
// Bits D7-D4: C3-C0 => converter function select bits
8081
// Bits D3-D2: PD1-PD0 => power-down bits
8182
// Bits D1: M => mode bit
8283
// Bits D0: X => don't care
83-
uint8_t command = (uint8_t) function << 4;
84-
command |= (uint8_t) pdown << 2;
85-
command |= (uint8_t) mode << 1;
84+
uint8_t command = (uint8_t)function << 4;
85+
command |= (uint8_t)pdown << 2;
86+
command |= (uint8_t)mode << 1;
8687
return command;
8788
}
8889

@@ -111,11 +112,12 @@ static int tsGetXY(uint16_t *x, uint16_t *y)
111112

112113
// Wait Release
113114
do {
114-
TS_I2C_Transmit(tsConstructCommand(TSC_MEASURE_Z1, TSC_ADC_ON_IRQ_DIS_0, TSC_12_BIT), &tsZ1);
115+
TS_I2C_Transmit(tsConstructCommand(TSC_MEASURE_Z1, TSC_ADC_ON_IRQ_DIS_0, TSC_12_BIT),
116+
&tsZ1);
115117
} while (tsZ1 & ADC_Z_THRESHOLD);
116118

117-
*x = (((tsX-ADC_X_MIN) * X_RES_T) / (ADC_X_MAX-ADC_X_MIN));
118-
*y = (((tsY-ADC_Y_MIN) * Y_RES_T) / (ADC_Y_MAX-ADC_Y_MIN));
119+
*x = (((tsX - ADC_X_MIN) * X_RES_T) / (ADC_X_MAX - ADC_X_MIN));
120+
*y = (((tsY - ADC_Y_MIN) * Y_RES_T) / (ADC_Y_MAX - ADC_Y_MIN));
119121

120122
#if (FLIP_SCREEN == 1)
121123
*x = X_RES_T - *x;
@@ -159,7 +161,8 @@ static void tsHandler(void)
159161
if (pressed_key == 0) { // wait until prev key process
160162
for (i = 0; i < TS_MAX_BUTTONS; i++) {
161163
if (ts_buttons[i].key_code != TS_INVALID_KEY_CODE) {
162-
if (isInBox(g_x, g_y, ts_buttons[i].x0, ts_buttons[i].y0, ts_buttons[i].x1, ts_buttons[i].y1)) {
164+
if (isInBox(g_x, g_y, ts_buttons[i].x0, ts_buttons[i].y0, ts_buttons[i].x1,
165+
ts_buttons[i].y1)) {
163166
// pressed key
164167
pressed_key = ts_buttons[i].key_code;
165168
break;
@@ -273,7 +276,8 @@ void MXC_TS_RemoveButton(int x0, int y0, int x1, int y1)
273276

274277
for (i = 0; i < TS_MAX_BUTTONS; i++) {
275278
if (ts_buttons[i].key_code != TS_INVALID_KEY_CODE) {
276-
if (isInBox(x0, y0, ts_buttons[i].x0, ts_buttons[i].y0, ts_buttons[i].x1, ts_buttons[i].y1)) {
279+
if (isInBox(x0, y0, ts_buttons[i].x0, ts_buttons[i].y0, ts_buttons[i].x1,
280+
ts_buttons[i].y1)) {
277281
// clear flag
278282
ts_buttons[i].key_code = TS_INVALID_KEY_CODE;
279283
}

Libraries/MiscDrivers/Touchscreen/tsc2007.h

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <i2c.h>
2626
#include <gpio.h>
2727

28-
2928
#ifndef TS_MAX_BUTTONS
3029
#define TS_MAX_BUTTONS 16
3130
#endif
@@ -34,32 +33,27 @@
3433
#define TSC2007_I2C_TARGET_ADDRESS 0x48
3534

3635
typedef enum {
37-
TSC_MEASURE_TEMP0 = 0b0000,
38-
TSC_MEASURE_AUX = 0b0010,
39-
TSC_MEASURE_TEMP1 = 0b0100,
40-
TSC_ACTIVATE_X_NEGATIVE = 0b1000,
41-
TSC_ACTIVATE_Y_NEGATIVE = 0b1001,
42-
TSC_ACTIVATE_Y_POSITIVE_X_NEGATIVE = 0b1010,
43-
TSC_SETUP_COMMAND = 0b1011,
44-
TSC_MEASURE_X = 0b1100,
45-
TSC_MEASURE_Y = 0b1101,
46-
TSC_MEASURE_Z1 = 0b1110,
47-
TSC_MEASURE_Z2 = 0b1111
36+
TSC_MEASURE_TEMP0 = 0b0000,
37+
TSC_MEASURE_AUX = 0b0010,
38+
TSC_MEASURE_TEMP1 = 0b0100,
39+
TSC_ACTIVATE_X_NEGATIVE = 0b1000,
40+
TSC_ACTIVATE_Y_NEGATIVE = 0b1001,
41+
TSC_ACTIVATE_Y_POSITIVE_X_NEGATIVE = 0b1010,
42+
TSC_SETUP_COMMAND = 0b1011,
43+
TSC_MEASURE_X = 0b1100,
44+
TSC_MEASURE_Y = 0b1101,
45+
TSC_MEASURE_Z1 = 0b1110,
46+
TSC_MEASURE_Z2 = 0b1111
4847
} mxc_ts_cmd_func_t;
4948

50-
5149
typedef enum {
52-
TSC_POWER_DOWN_IRQ_EN = 0b00,
53-
TSC_ADC_ON_IRQ_DIS_0 = 0b01,
54-
TSC_ADC_OFF_IRQ_EN = 0b10,
55-
TSC_ADC_ON_IRQ_DIS_1 = 0b11
50+
TSC_POWER_DOWN_IRQ_EN = 0b00,
51+
TSC_ADC_ON_IRQ_DIS_0 = 0b01,
52+
TSC_ADC_OFF_IRQ_EN = 0b10,
53+
TSC_ADC_ON_IRQ_DIS_1 = 0b11
5654
} mxc_ts_cmd_pdown_t;
5755

58-
typedef enum {
59-
TSC_12_BIT = 0b0,
60-
TSC_8_BIT = 0b1
61-
} mxc_ts_cmd_mode_t;
62-
56+
typedef enum { TSC_12_BIT = 0b0, TSC_8_BIT = 0b1 } mxc_ts_cmd_mode_t;
6357

6458
typedef struct {
6559
mxc_i2c_regs_t *regs; // The I2C instance the touchscreen controller is connected to

Libraries/PeriphDrivers/Include/MAX32520/tmr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ typedef enum {
6161
MXC_TMR_PRES_512 = MXC_F_TMR_CN_PRES3 | MXC_S_TMR_CN_PRES_DIV2, ///< Divide input clock by 512
6262
MXC_TMR_PRES_1024 = MXC_F_TMR_CN_PRES3 | MXC_S_TMR_CN_PRES_DIV4, ///< Divide input clock by 1024
6363
MXC_TMR_PRES_2048 = MXC_F_TMR_CN_PRES3 | MXC_S_TMR_CN_PRES_DIV8, ///< Divide input clock by 2048
64-
MXC_TMR_PRES_4096 = MXC_F_TMR_CN_PRES3 | MXC_S_TMR_CN_PRES_DIV16, ///< Divide input clock by 4096
64+
MXC_TMR_PRES_4096 = MXC_F_TMR_CN_PRES3 |
65+
MXC_S_TMR_CN_PRES_DIV16, ///< Divide input clock by 4096
6566

6667
// Legacy names
6768
TMR_PRES_1 = MXC_TMR_PRES_1,

Libraries/PeriphDrivers/Include/MAX32572/sfcc.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,32 @@ extern "C" {
4444
* @brief Enumeration type for the Cache ID Register
4545
*/
4646
typedef enum {
47-
SFCC_INFO_RELNUM, ///< Identifies the Release Number
48-
SFCC_INFO_PARTNUM, ///< Specifies the value of Cache ID Part Number
49-
SFCC_INFO_ID ///< Specifies the value of Cache ID
47+
SFCC_INFO_RELNUM, ///< Identifies the Release Number
48+
SFCC_INFO_PARTNUM, ///< Specifies the value of Cache ID Part Number
49+
SFCC_INFO_ID ///< Specifies the value of Cache ID
5050
} mxc_sfcc_info_t;
5151

5252
/**
5353
* @brief Reads the data from the Cache Id Register.
5454
* @param cid Enumeration type for Cache Id Register.
5555
* @retval Returns the contents of Cache Id Register.
5656
*/
57-
int MXC_SFCC_ID (mxc_sfcc_info_t cid);
57+
int MXC_SFCC_ID(mxc_sfcc_info_t cid);
5858

5959
/**
6060
* @brief Enable the instruction cache controller.
6161
*/
62-
void MXC_SFCC_Enable (void);
62+
void MXC_SFCC_Enable(void);
6363

6464
/**
6565
* @brief Disable the instruction cache controller.
6666
*/
67-
void MXC_SFCC_Disable (void);
67+
void MXC_SFCC_Disable(void);
6868

6969
/**
7070
* @brief Flush the instruction cache controller.
7171
*/
72-
void MXC_SFCC_Flush (void);
72+
void MXC_SFCC_Flush(void);
7373

7474
/**@} end of group sfcc */
7575

Libraries/PeriphDrivers/Source/SFCC/sfcc_me55.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,29 @@
2727

2828
int MXC_SFCC_ID(mxc_sfcc_info_t cid)
2929
{
30-
return MXC_SFCC_RevA_ID ((mxc_sfcc_reva_regs_t*) MXC_SFCC, cid);
30+
return MXC_SFCC_RevA_ID((mxc_sfcc_reva_regs_t *)MXC_SFCC, cid);
3131
}
3232

3333
void MXC_SFCC_Enable(void)
3434
{
35-
MXC_SFCC_RevA_Enable ((mxc_sfcc_reva_regs_t*) MXC_SFCC);
35+
MXC_SFCC_RevA_Enable((mxc_sfcc_reva_regs_t *)MXC_SFCC);
3636
}
3737

3838
void MXC_SFCC_Disable(void)
3939
{
40-
MXC_SFCC_RevA_Disable ((mxc_sfcc_reva_regs_t*) MXC_SFCC);
40+
MXC_SFCC_RevA_Disable((mxc_sfcc_reva_regs_t *)MXC_SFCC);
4141
}
4242

4343
void MXC_SFCC_Flush(void)
44-
{
44+
{
4545
/* NOTE: MEMPROT authentication bytes are not flushed with the SFCC invalidate bits,
4646
* the GCR SFCC flush is required.
4747
*/
4848
/* Flush all instruction caches */
4949
MXC_GCR->sysctrl |= MXC_F_GCR_SYSCTRL_SFCC_FLUSH;
50-
50+
5151
/* Wait for flush to complete */
52-
while (MXC_GCR->sysctrl & MXC_F_GCR_SYSCTRL_SFCC_FLUSH) {
53-
}
52+
while (MXC_GCR->sysctrl & MXC_F_GCR_SYSCTRL_SFCC_FLUSH) {}
5453

5554
MXC_SFCC_Disable();
5655
MXC_SFCC_Enable();

Libraries/PeriphDrivers/Source/SPIXF/spixf_me55.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
* executing from RAM.
4141
*/
4242
// Non-const version of 'gpio_cfg_spixf' pin set.
43-
mxc_gpio_cfg_t gpio_cfg_spixf_ram = { MXC_GPIO1, (MXC_GPIO_PIN_22 | MXC_GPIO_PIN_23 | MXC_GPIO_PIN_24 |
44-
MXC_GPIO_PIN_25 | MXC_GPIO_PIN_26 | MXC_GPIO_PIN_27), MXC_GPIO_FUNC_ALT1,
45-
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
43+
mxc_gpio_cfg_t gpio_cfg_spixf_ram = { MXC_GPIO1,
44+
(MXC_GPIO_PIN_22 | MXC_GPIO_PIN_23 | MXC_GPIO_PIN_24 |
45+
MXC_GPIO_PIN_25 | MXC_GPIO_PIN_26 | MXC_GPIO_PIN_27),
46+
MXC_GPIO_FUNC_ALT1,
47+
MXC_GPIO_PAD_NONE,
48+
MXC_GPIO_VSSEL_VDDIO,
49+
MXC_GPIO_DRVSTR_0 };
4650

4751
#if IAR_PRAGMAS
4852
#pragma section = ".spix_config"
@@ -70,7 +74,6 @@ static int MXC_GPIO_Config_SPIXF(mxc_gpio_cfg_t *cfg)
7074
port->ds1 &= ~(cfg->mask);
7175

7276
return E_NO_ERROR;
73-
7477
}
7578
#endif
7679

Libraries/PeriphDrivers/Source/SPIXF/spixf_reva.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ static void SPIXFC_TransHandler(mxc_spixfc_reva_regs_t *spixfc,
5454
mxc_spixfc_fifo_reva_regs_t *spixfc_fifo, mxc_spixf_req_t *req);
5555

5656
#if defined(SPIXF_RAM)
57-
static int MXC_GetLock_SPIXF(uint32_t *lock, uint32_t value);
58-
static void MXC_FreeLock_SPIXF(uint32_t *lock);
57+
static int MXC_GetLock_SPIXF(uint32_t *lock, uint32_t value);
58+
static void MXC_FreeLock_SPIXF(uint32_t *lock);
5959
#endif
6060

6161
/******* Globals *******/
@@ -125,7 +125,8 @@ void MXC_SPIXF_RevA_Shutdown(mxc_spixfc_reva_regs_t *spixfc)
125125
}
126126

127127
void MXC_SPIXF_RevA_IOCtrl(mxc_spixfm_reva_regs_t *spixfm, mxc_spixf_ds_t sclk_ds,
128-
mxc_spixf_ds_t ss_ds, mxc_spixf_ds_t sdio_ds, mxc_spixf_padctrl_t padctrl)
128+
mxc_spixf_ds_t ss_ds, mxc_spixf_ds_t sdio_ds,
129+
mxc_spixf_padctrl_t padctrl)
129130
{
130131
spixfm->io_ctrl = 0;
131132

@@ -260,7 +261,7 @@ int MXC_SPIXF_RevA_Transaction(mxc_spixfc_reva_regs_t *spixfc,
260261
return E_BUSY;
261262
}
262263
#else
263-
// Lock this SPIXFC
264+
// Lock this SPIXFC
264265
if (MXC_GetLock((uint32_t *)&states.req, 1) != E_NO_ERROR) {
265266
return E_BUSY;
266267
}
@@ -1507,7 +1508,6 @@ int MXC_GetLock_SPIXF(uint32_t *lock, uint32_t value)
15071508
}
15081509
#endif
15091510

1510-
15111511
// MXC_FreeLock
15121512
#if defined(SPIXF_RAM)
15131513
#if IAR_PRAGMAS

Libraries/PeriphDrivers/Source/SPIXF/spixf_reva.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ uint8_t MXC_SPIXF_RevA_GetIoctrlSCLKDrive(mxc_spixfm_reva_regs_t *spixfm);
279279
void MXC_SPIXF_RevA_SetIoctrlSSDriveHigh(mxc_spixfm_reva_regs_t *spixfm);
280280
void MXC_SPIXF_RevA_SetIoctrlSSDriveLow(mxc_spixfm_reva_regs_t *spixfm);
281281
uint8_t MXC_SPIXF_RevA_GetIoctrlSSDrive(mxc_spixfm_reva_regs_t *spixfm);
282-
void MXC_SPIXF_RevA_SetPuPdCtrl(mxc_spixfm_reva_regs_t *spixfm, mxc_spixf_padctrl_t pad); // Legacy Name. Will start using SetPadCtrl going forward. 1-23-2023
283-
uint8_t MXC_SPIXF_RevA_GetPuPdCtrl(mxc_spixfm_reva_regs_t *spixfm); // Legacy Name. Will start using GetPadCtrl going forward. 1-23-2023
282+
void MXC_SPIXF_RevA_SetPuPdCtrl(
283+
mxc_spixfm_reva_regs_t *spixfm,
284+
mxc_spixf_padctrl_t pad); // Legacy Name. Will start using SetPadCtrl going forward. 1-23-2023
285+
uint8_t MXC_SPIXF_RevA_GetPuPdCtrl(
286+
mxc_spixfm_reva_regs_t
287+
*spixfm); // Legacy Name. Will start using GetPadCtrl going forward. 1-23-2023
284288
void MXC_SPIXF_RevA_SetPadCtrl(mxc_spixfm_reva_regs_t *spixfm, mxc_spixf_padctrl_t pad);
285289
uint8_t MXC_SPIXF_RevA_GetPadCtrl(mxc_spixfm_reva_regs_t *spixfm);
286290
void MXC_SPIXF_RevA_SetSCKDriveHigh(mxc_spixfc_reva_regs_t *spixfc);

0 commit comments

Comments
 (0)