Skip to content

Commit 53a4074

Browse files
committed
i# This is a combination of 3 commits.
【修改】format
1 parent 19d4c68 commit 53a4074

File tree

107 files changed

+47434
-47434
lines changed

Some content is hidden

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

107 files changed

+47434
-47434
lines changed

bsp/stm32/libraries/HAL_Drivers/drv_can.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,13 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
325325
* STD ID | STID[10:3] | STDID[2:0] |<- 21bit ->|
326326
* EXT ID | EXTID[28:21] | EXTID[20:13] | EXTID[12:5] | EXTID[4:0] IDE RTR 0|
327327
* @note the 32bit STD ID must << 21 to fill CAN_FxR1[31:21] and EXT ID must << 3,
328-
* -> but the id bit of struct rt_can_filter_item is 29,
328+
* -> but the id bit of struct rt_can_filter_item is 29,
329329
* -> so STD id << 18 and EXT id Don't need << 3, when get the high 16bit.
330330
* -> FilterIdHigh : (((STDid << 18) or (EXT id)) >> 13) & 0xFFFF,
331-
* -> FilterIdLow: ((STDid << 18) or (EXT id << 3)) & 0xFFFF.
332-
* @note the mask bit of struct rt_can_filter_item is 32,
333-
* -> FilterMaskIdHigh: (((STD mask << 21) or (EXT mask <<3)) >> 16) & 0xFFFF
334-
* -> FilterMaskIdLow: ((STD mask << 21) or (EXT mask <<3)) & 0xFFFF
331+
* -> FilterIdLow: ((STDid << 18) or (EXT id << 3)) & 0xFFFF.
332+
* @note the mask bit of struct rt_can_filter_item is 32,
333+
* -> FilterMaskIdHigh: (((STD mask << 21) or (EXT mask <<3)) >> 16) & 0xFFFF
334+
* -> FilterMaskIdLow: ((STD mask << 21) or (EXT mask <<3)) & 0xFFFF
335335
*/
336336
if (filter_cfg->items[i].mode == CAN_FILTERMODE_IDMASK)
337337
{
@@ -341,23 +341,23 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
341341
else if (filter_cfg->items[i].mode == CAN_FILTERMODE_IDLIST)
342342
{
343343
/* same as CAN_FxR1 */
344-
mask_l_tail = (filter_cfg->items[i].ide << 2) |
344+
mask_l_tail = (filter_cfg->items[i].ide << 2) |
345345
(filter_cfg->items[i].rtr << 1);
346346
}
347347
if (filter_cfg->items[i].ide == RT_CAN_STDID)
348348
{
349349
id_h = ((filter_cfg->items[i].id << 18) >> 13) & 0xFFFF;
350-
id_l = ((filter_cfg->items[i].id << 18) |
351-
(filter_cfg->items[i].ide << 2) |
350+
id_l = ((filter_cfg->items[i].id << 18) |
351+
(filter_cfg->items[i].ide << 2) |
352352
(filter_cfg->items[i].rtr << 1)) & 0xFFFF;
353353
mask_h = ((filter_cfg->items[i].mask << 21) >> 16) & 0xFFFF;
354354
mask_l = ((filter_cfg->items[i].mask << 21) | mask_l_tail) & 0xFFFF;
355355
}
356356
else if (filter_cfg->items[i].ide == RT_CAN_EXTID)
357357
{
358358
id_h = (filter_cfg->items[i].id >> 13) & 0xFFFF;
359-
id_l = ((filter_cfg->items[i].id << 3) |
360-
(filter_cfg->items[i].ide << 2) |
359+
id_l = ((filter_cfg->items[i].id << 3) |
360+
(filter_cfg->items[i].ide << 2) |
361361
(filter_cfg->items[i].rtr << 1)) & 0xFFFF;
362362
mask_h = ((filter_cfg->items[i].mask << 3) >> 16) & 0xFFFF;
363363
mask_l = ((filter_cfg->items[i].mask << 3) | mask_l_tail) & 0xFFFF;

bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_h7.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int stm32_flash_write(rt_uint32_t addr, const rt_uint8_t *buf, size_t size)
7878
LOG_E("write outrange flash size! addr is (0x%p)", (void *)(addr + size));
7979
return -RT_EINVAL;
8080
}
81-
81+
8282
if(addr % 32 != 0)
8383
{
8484
LOG_E("write addr must be 32-byte alignment");
@@ -171,7 +171,7 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size)
171171
{
172172
size_bank1 = 0;
173173
addr_bank2 = addr;
174-
size_bank2 = size;
174+
size_bank2 = size;
175175
}
176176
else
177177
{
@@ -188,7 +188,7 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size)
188188
EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS;
189189
EraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_3;
190190
SCB_DisableDCache();
191-
191+
192192
if(size_bank1)
193193
{
194194
EraseInitStruct.Sector = (addr_bank1 - FLASH_BANK1_BASE) / FLASH_SECTOR_SIZE;

bsp/stm32/libraries/HAL_Drivers/drv_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static const struct pin_irq_map pin_irq_map[] =
117117
{GPIO_PIN_12, EXTI15_10_IRQn},
118118
{GPIO_PIN_13, EXTI15_10_IRQn},
119119
{GPIO_PIN_14, EXTI15_10_IRQn},
120-
{GPIO_PIN_15, EXTI15_10_IRQn},
120+
{GPIO_PIN_15, EXTI15_10_IRQn},
121121
#else
122122
{GPIO_PIN_0, EXTI0_IRQn},
123123
{GPIO_PIN_1, EXTI1_IRQn},

bsp/stm32/libraries/HAL_Drivers/drv_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static rt_err_t stm32_spi_init(struct stm32_spi *spi_drv, struct rt_spi_configur
263263
HAL_NVIC_SetPriority(spi_drv->config->dma_tx->dma_irq, 0, 1);
264264
HAL_NVIC_EnableIRQ(spi_drv->config->dma_tx->dma_irq);
265265
}
266-
266+
267267
if(spi_drv->spi_dma_flag & SPI_USING_TX_DMA_FLAG || spi_drv->spi_dma_flag & SPI_USING_RX_DMA_FLAG)
268268
{
269269
HAL_NVIC_SetPriority(spi_drv->config->irq_type, 2, 0);

bsp/stm32/libraries/HAL_Drivers/drv_usart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static void uart_isr(struct rt_serial_device *serial)
369369
if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_PE) != RESET)
370370
{
371371
__HAL_UART_CLEAR_PEFLAG(&uart->handle);
372-
}
372+
}
373373
#if !defined(SOC_SERIES_STM32L4) && !defined(SOC_SERIES_STM32WL) && !defined(SOC_SERIES_STM32F7) && !defined(SOC_SERIES_STM32F0) \
374374
&& !defined(SOC_SERIES_STM32L0) && !defined(SOC_SERIES_STM32G0) && !defined(SOC_SERIES_STM32H7) \
375375
&& !defined(SOC_SERIES_STM32G4) && !defined(SOC_SERIES_STM32MP1) && !defined(SOC_SERIES_STM32WB)
@@ -378,13 +378,13 @@ static void uart_isr(struct rt_serial_device *serial)
378378
{
379379
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_LBDF);
380380
}
381-
#else
381+
#else
382382
if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_LBD) != RESET)
383383
{
384384
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_LBD);
385-
}
385+
}
386+
#endif
386387
#endif
387-
#endif
388388
if (__HAL_UART_GET_FLAG(&(uart->handle), UART_FLAG_CTS) != RESET)
389389
{
390390
UART_INSTANCE_CLEAR_FUNCTION(&(uart->handle), UART_FLAG_CTS);

bsp/stm32/libraries/HAL_Drivers/drv_usart_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2020, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

bsp/stm32/libraries/HAL_Drivers/drv_usart_v2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

0 commit comments

Comments
 (0)