Skip to content

Commit 92beddf

Browse files
authored
Merge pull request #4737 from mysterywolf/3,1,xformat
[lts 3.1.x] format codes
2 parents b18a99b + 03f4d40 commit 92beddf

File tree

1,584 files changed

+45209
-45209
lines changed

Some content is hidden

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

1,584 files changed

+45209
-45209
lines changed

bsp/CME_M7/applications/application.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ int rt_application_init()
2828

2929
tid = rt_thread_create("init",
3030
rt_init_thread_entry,
31-
RT_NULL,
31+
RT_NULL,
3232
2048,
33-
RT_THREAD_PRIORITY_MAX/3,
34-
20);
33+
RT_THREAD_PRIORITY_MAX/3,
34+
20);
3535

3636
if (tid != RT_NULL)
3737
rt_thread_startup(tid);

bsp/CME_M7/applications/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* File : startup.c
33
* This file is part of RT-Thread RTOS
4-
* COPYRIGHT (C) 2006-2014, RT-Thread Develop Team
4+
* COPYRIGHT (C) 2006-2021, RT-Thread Develop Team
55
*
66
* The license and distribution terms for this file may be
77
* found in the file LICENSE in this distribution or at

bsp/CME_M7/drivers/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "cmem7_includes.h"
1515
//#include "cmem7_retarget.h"
1616

17-
#define SRAM_SIZE 64 // KB
17+
#define SRAM_SIZE 64 // KB
1818
#define SRAM_END (0x20000000 + SRAM_SIZE * 1024)
1919

2020
//#define RT_USING_UART0

bsp/CME_M7/drivers/emac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* File : emac.c
33
* This file is part of RT-Thread RTOS
4-
* COPYRIGHT (C) 2006-2014, RT-Thread Develop Team
4+
* COPYRIGHT (C) 2006-2021, RT-Thread Develop Team
55
*
66
* The license and distribution terms for this file may be
77
* found in the file LICENSE in this distribution or at
@@ -38,7 +38,7 @@ struct rt_cme_eth
3838
struct eth_device parent;
3939

4040
/* interface address info. */
41-
rt_uint8_t dev_addr[MAX_ADDR_LEN]; /* hw address */
41+
rt_uint8_t dev_addr[MAX_ADDR_LEN]; /* hw address */
4242

4343
uint32_t ETH_Speed;
4444
uint32_t ETH_Mode;
@@ -95,8 +95,8 @@ uint32_t txTotalMemory = 0x2000;
9595
BOOL isRxNoBuf = FALSE;
9696

9797
#define ETH_MAX_PACKET_SIZE 1520 /* ETH_HEADER + ETH_EXTRA + MAX_ETH_PAYLOAD + ETH_CRC */
98-
#define ETH_RXBUFNB 4
99-
#define ETH_TXBUFNB 2
98+
#define ETH_RXBUFNB 4
99+
#define ETH_TXBUFNB 2
100100

101101
struct eth_rx_buffer
102102
{

bsp/CME_M7/rtconfig.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
#define __RTTHREAD_CFG_H__
44

55
/* RT_NAME_MAX*/
6-
#define RT_NAME_MAX 8
6+
#define RT_NAME_MAX 8
77

88
/* RT_ALIGN_SIZE*/
9-
#define RT_ALIGN_SIZE 4
9+
#define RT_ALIGN_SIZE 4
1010

1111
/* PRIORITY_MAX */
12-
#define RT_THREAD_PRIORITY_MAX 32
12+
#define RT_THREAD_PRIORITY_MAX 32
1313

1414
/* Tick per Second */
15-
#define RT_TICK_PER_SECOND 100
15+
#define RT_TICK_PER_SECOND 100
1616

1717
/* SECTION: RT_DEBUG */
1818
/* Thread Debug */
@@ -61,8 +61,8 @@
6161
/* SECTION: Console options */
6262
#define RT_USING_CONSOLE
6363
/* the buffer size of console*/
64-
#define RT_CONSOLEBUF_SIZE 128
65-
#define RT_CONSOLE_DEVICE_NAME "uart2"
64+
#define RT_CONSOLEBUF_SIZE 128
65+
#define RT_CONSOLE_DEVICE_NAME "uart2"
6666

6767
/* SECTION: finsh, a C-Express shell */
6868
#define RT_USING_FINSH
@@ -79,15 +79,15 @@
7979
#define RT_USING_DFS_ELMFAT
8080
#define RT_DFS_ELM_REENTRANT
8181
#define RT_DFS_ELM_WORD_ACCESS
82-
#define RT_DFS_ELM_DRIVES 1
83-
#define RT_DFS_ELM_USE_LFN 2
84-
#define RT_DFS_ELM_MAX_LFN 255
82+
#define RT_DFS_ELM_DRIVES 1
83+
#define RT_DFS_ELM_USE_LFN 2
84+
#define RT_DFS_ELM_MAX_LFN 255
8585
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
8686

8787
/* the max number of mounted filesystem */
88-
#define DFS_FILESYSTEMS_MAX 2
89-
/* the max number of opened files */
90-
#define DFS_FD_MAX 4
88+
#define DFS_FILESYSTEMS_MAX 2
89+
/* the max number of opened files */
90+
#define DFS_FD_MAX 4
9191

9292
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
9393
#define RT_USING_LWIP
@@ -121,13 +121,13 @@
121121
#define RT_LWIP_MSKADDR "255.255.255.0"
122122

123123
/* tcp thread options */
124-
#define RT_LWIP_TCPTHREAD_PRIORITY 12
125-
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
126-
#define RT_LWIP_TCPTHREAD_STACKSIZE 1024
124+
#define RT_LWIP_TCPTHREAD_PRIORITY 12
125+
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
126+
#define RT_LWIP_TCPTHREAD_STACKSIZE 1024
127127

128-
#define RT_LWIP_ETHTHREAD_PRIORITY 15
129-
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
130-
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
128+
#define RT_LWIP_ETHTHREAD_PRIORITY 15
129+
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
130+
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
131131

132132
// <bool name="RT_USING_CMSIS_OS" description="Using CMSIS OS API" default="true" />
133133
// #define RT_USING_CMSIS_OS

bsp/allwinner_tina/drivers/drv_clock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz)
527527
*mmc_clk &= ~(0x1 << 31);
528528
return RT_EOK;
529529
}
530-
530+
531531
if (hz <= 24000000)
532532
{
533533
pll = (0x0 << 24);
@@ -579,7 +579,7 @@ rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz)
579579
oclk_dly = 1;
580580
sclk_dly = 4;
581581
}
582-
582+
583583
*mmc_clk = (0x1 << 31) | pll | (sclk_dly << 20) | \
584584
(n << 16) | (oclk_dly << 8) | (div - 1);
585585

bsp/allwinner_tina/drivers/drv_clock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,4 @@ rt_err_t dram_gate_clk_enable(enum dram_gate dram_gate);
238238
rt_err_t dram_gate_clk_disable(enum dram_gate dram_gate);
239239

240240
rt_err_t mmc_set_clk(enum mmc_clk_id clk_id, int hz);
241-
#endif
241+
#endif

bsp/allwinner_tina/drivers/drv_gpio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,4 @@ void gpio_set_debounce(enum gpio_port port, rt_uint8_t prescaler);
227227
void gpio_set_irq_callback(enum gpio_port port, enum gpio_pin pin, void (*irq_cb)(void *), void *irq_arg);
228228
int rt_hw_gpio_init(void);
229229

230-
#endif /* __DRV_GPIO_H__ */
230+
#endif /* __DRV_GPIO_H__ */

bsp/allwinner_tina/drivers/drv_sdio.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121

2222
#define DBG_TAG "MMC"
23-
// #define DBG_LVL DBG_LOG
24-
// #define DBG_LVL DBG_INFO
23+
// #define DBG_LVL DBG_LOG
24+
// #define DBG_LVL DBG_INFO
2525
#define DBG_LVL DBG_WARNING
26-
// #define DBG_LVL DBG_ERROR
26+
// #define DBG_LVL DBG_ERROR
2727
#include <rtdbg.h>
2828

2929
#ifdef RT_USING_SDIO
@@ -33,12 +33,12 @@
3333
struct mmc_xfe_des
3434
{
3535
rt_uint32_t size; /* block size */
36-
rt_uint32_t num; /* block num */
37-
rt_uint8_t *buff; /* buff addr */
38-
rt_uint32_t flag; /* write or read or stream */
39-
#define MMC_DATA_WRITE (1 << 0)
40-
#define MMC_DATA_READ (1 << 1)
41-
#define MMC_DATA_STREAM (1 << 2)
36+
rt_uint32_t num; /* block num */
37+
rt_uint8_t *buff; /* buff addr */
38+
rt_uint32_t flag; /* write or read or stream */
39+
#define MMC_DATA_WRITE (1 << 0)
40+
#define MMC_DATA_READ (1 << 1)
41+
#define MMC_DATA_STREAM (1 << 2)
4242
};
4343

4444
struct mmc_flag
@@ -57,7 +57,7 @@ struct sdio_drv
5757
tina_mmc_t mmc_des;
5858
rt_uint8_t *mmc_buf;
5959
rt_uint8_t usedma;
60-
60+
6161
};
6262

6363
#ifdef CONFIG_MMC_USE_DMA
@@ -122,7 +122,7 @@ static int mmc_update_clk(tina_mmc_t mmc)
122122
mmc->risr_reg = mmc->risr_reg;
123123
return RT_EOK;
124124
}
125-
125+
126126
static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
127127
{
128128
ALIGN(32) static struct mmc_des_v4p1 pdes[128]; // mast ALIGN(32)
@@ -131,7 +131,7 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
131131
unsigned length = xfe->size * xfe->num;
132132
unsigned buff_frag_num = length >> SDXC_DES_NUM_SHIFT;
133133
unsigned remain = length & (SDXC_DES_BUFFER_MAX_LEN - 1);
134-
134+
135135
if (remain)
136136
{
137137
buff_frag_num ++;
@@ -142,7 +142,7 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
142142
}
143143
memset(pdes, 0, sizeof(pdes));
144144
mmu_clean_dcache((rt_uint32_t)(xfe->buff), length);
145-
for (i = 0, des_idx = 0; i < buff_frag_num; i++, des_idx++)
145+
for (i = 0, des_idx = 0; i < buff_frag_num; i++, des_idx++)
146146
{
147147
// memset((void*)&pdes[des_idx], 0, sizeof(struct mmc_v4p1));
148148
pdes[des_idx].des_chain = 1;
@@ -168,8 +168,8 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
168168
pdes[des_idx].last_des = 1;
169169
pdes[des_idx].end_of_ring = 1;
170170
pdes[des_idx].buf_addr_ptr2 = 0;
171-
}
172-
else
171+
}
172+
else
173173
{
174174
pdes[des_idx].buf_addr_ptr2 = (unsigned long)&pdes[des_idx+1];
175175
}
@@ -203,7 +203,7 @@ static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
203203
mmc->dmac_reg = (1 << 1) | (1 << 7); /* idma on */
204204
rval = mmc->idie_reg & (~3);
205205
if (xfe->flag == MMC_DATA_WRITE)
206-
rval |= (1 << 0);
206+
rval |= (1 << 0);
207207
else
208208
rval |= (1 << 1);
209209
mmc->idie_reg = rval;
@@ -222,7 +222,7 @@ static rt_err_t mmc_trans_data_by_cpu(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
222222

223223
if (xfe->flag == MMC_DATA_WRITE)
224224
{
225-
for (i = 0; i < (byte_cnt >> 2); i++)
225+
for (i = 0; i < (byte_cnt >> 2); i++)
226226
{
227227
while(--timeout && (mmc->star_reg & (1 << 3)));
228228

@@ -237,7 +237,7 @@ static rt_err_t mmc_trans_data_by_cpu(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
237237
}
238238
else
239239
{
240-
for (i = 0; i < (byte_cnt >> 2); i++)
240+
for (i = 0; i < (byte_cnt >> 2); i++)
241241
{
242242
while(--timeout && (mmc->star_reg & (1 << 2)));
243243

@@ -276,7 +276,7 @@ static rt_err_t mmc_config_clock(tina_mmc_t mmc, int clk)
276276
{
277277
mmc_set_clk(SDMMC1, clk);
278278
}
279-
279+
280280
/* Re-enable card clock */
281281
rval = mmc->ckcr_reg;
282282
rval |= (0x1 << 16); //(3 << 16);
@@ -369,7 +369,7 @@ static int mmc_send_cmd(struct rt_mmcsd_host *host, struct rt_mmcsd_cmd *cmd)
369369
cmdval |= (1 << 7);
370370
if ((resp_type(cmd) != RESP_R3) && (resp_type(cmd) != RESP_R4))
371371
cmdval |= (1 << 8);
372-
372+
373373
if (data)
374374
{
375375
cmdval |= (1 << 9) | (1 << 13);
@@ -592,7 +592,7 @@ static void sdio_request_send(struct rt_mmcsd_host *host, struct rt_mmcsd_req *r
592592

593593
memset(&sdio->flag, 0, sizeof(struct mmc_flag));
594594
mmc_send_cmd(host, req->cmd);
595-
595+
596596
return;
597597
}
598598

bsp/allwinner_tina/drivers/drv_sdio.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ REG[31] : Load cmd
119119
#define SDXC_UPDATE_CLOCK_CMD BIT(21)
120120
#define SDXC_LOAD_CMD BIT(31)
121121

122-
/*
123-
SD status reg
122+
/*
123+
SD status reg
124124
REG[0] : FIFO_RX_LEVEL
125125
REG[1] : FIFO_TX_LEVEL
126126
REG[2] : FIFO_EMPTY
@@ -129,7 +129,7 @@ REG[4-7] : FSM_STA
129129
REG[8] : CARD_PRESENT
130130
REG[9] : CARD_BUSY
131131
REG[10] : FSM_BUSY
132-
REG[11-16]: RESP_IDX
132+
REG[11-16]: RESP_IDX
133133
REG[17-21]: FIFO_LEVEL
134134
REG[31] : DMA_REQ
135135
*/

0 commit comments

Comments
 (0)