Skip to content

Commit 0546b4b

Browse files
committed
Merge remote-tracking branch 'remotes/gitee/gitee_master'
2 parents 20e39f0 + 71f88fb commit 0546b4b

File tree

7 files changed

+25
-20
lines changed

7 files changed

+25
-20
lines changed

bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_fmc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,11 @@ FMC_STATUS_T FMC_ProgramOptionByteData(uint32_t address, uint8_t data)
347347
*
348348
* @param page:the address of the pages to be write protection
349349
* This parameter can be any combination of the following values:
350-
* for APM32F10X_LD £º
350+
* for APM32F10X_LD
351351
* @arg FLASH_WRP_PAGE_0_3 to FLASH_WRP_PAGE_28_31
352-
* for APM32F10X_MD £º
352+
* for APM32F10X_MD
353353
* @arg FLASH_WRP_PAGE_0_3 to FLASH_WRP_PAGE_124_127
354-
* for APM32F10X_HD £º
354+
* for APM32F10X_HD
355355
* @arg FLASH_WRP_PAGE_0_1 to FLASH_WRP_PAGE_60_61 or FLASH_WRP_PAGE_62_127
356356
* @arg FMC_WRP_PAGE_ALL
357357
*

bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ void GPIO_ConfigPinRemap(GPIO_REMAP_T remap)
466466
{
467467
regVal |= 0x0F000000;
468468
}
469-
469+
470470
mask <<= bitOffset;
471471
regVal &= (uint32_t)~mask;
472472
val <<= bitOffset;

bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_pmu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void PMU_DisablePVD(void)
8888
/*!
8989
* @brief Configure a voltage threshold detected by a power supply voltage detector (PVD).
9090
*
91-
* @param level£ºspecifies the PVD detection level
91+
* @param level : specifies the PVD detection level
9292
* This parameter can be one of the following values:
9393
* @arg PMU_PVD_LEVEL_2V2 : Config PVD detection level to 2.2V
9494
* @arg PMU_PVD_LEVEL_2V3 : Config PVD detection level to 2.3V
@@ -198,7 +198,7 @@ void PMU_EnterSTANDBYMode(void)
198198
/*!
199199
* @brief Read the specified PWR flag is set or not.
200200
*
201-
* @param flag£ºReads the status of specifies the flag.
201+
* @param flag : Reads the status of specifies the flag.
202202
* This parameter can be one of the following values:
203203
* @arg PMU_FLAG_WUE : Wake Up flag
204204
* @arg PMU_FLAG_SB : StandBy flag
@@ -226,7 +226,7 @@ uint8_t PMU_ReadStatusFlag(PMU_FLAG_T flag)
226226
/*!
227227
* @brief Clears the PWR's pending flags.
228228
*
229-
* @param flag£ºClears the status of specifies the flag.
229+
* @param flag : Clears the status of specifies the flag.
230230
* This parameter can be one of the following values:
231231
* @arg PMU_FLAG_WUE : Wake Up flag
232232
* @arg PMU_FLAG_SB : StandBy flag

bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_rcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ void RCM_ClearStatusFlag(void)
10321032
/*!
10331033
* @brief Reads the specified RCM interrupt Flag
10341034
*
1035-
* @param flag £ºReads specifies RCM interrupt flag.
1035+
* @param flag : Reads specifies RCM interrupt flag.
10361036
* This parameter can be one of the following values:
10371037
* @arg RCM_INT_LSIRDY : LSI ready interrupt flag
10381038
* @arg RCM_INT_LSERDY : LSE ready interrupt flag

bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ uint32_t SDIO_ReadDataCounter(void)
289289
/*!
290290
* @brief Write the SDIO Data
291291
*
292-
* @param Data£ºWrite 32-bit data
292+
* @param Data : Write 32-bit data
293293
*
294294
* @retval None
295295
*/

bsp/ls2kdev/drivers/drv_spi.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
/*@{*/
1616

1717
#include <stdlib.h>
18-
#include <stdint.h>
1918
#include <ctype.h>
2019
#include <stdint.h>
2120
#include <rtthread.h>
2221
#include <drivers/spi.h>
2322
#include "drv_spi.h"
2423

2524
#ifdef RT_USING_SPI
25+
#ifdef RT_USING_SPI_GPIOCS
26+
#include <drivers/pin.h>
27+
#endif
28+
2629
static void spi_init(uint8_t spre_spr, uint8_t copl, uint8_t cpha)
2730
{
2831
SET_SPI(SPSR, 0xc0);
@@ -33,21 +36,18 @@ static void spi_init(uint8_t spre_spr, uint8_t copl, uint8_t cpha)
3336
SET_SPI(SOFTCS, 0xff);
3437
}
3538

36-
static void spi_set_csn(uint8_t val)
39+
rt_inline void spi_set_csn(uint8_t val)
3740
{
3841
SET_SPI(SOFTCS, val);
3942
}
4043

41-
#ifdef RT_USING_SPI_GPIOCS
42-
#include <drivers/pin.h>
43-
#endif
4444
static void spi_set_cs(unsigned char cs, int new_status)
4545
{
4646
if (cs < 4)
4747
{
4848
unsigned char val = 0;
4949
val = GET_SPI(SOFTCS);
50-
val |= 0x01 << cs ; // csen=1
50+
val |= 0x01 << cs ; // csen=1
5151
if (new_status) // cs = 1
5252
{
5353
val |= (0x10 << cs); // csn=1
@@ -67,6 +67,7 @@ static void spi_set_cs(unsigned char cs, int new_status)
6767
}
6868
#endif
6969
}
70+
7071
static uint8_t spi_write_for_response(uint8_t data)
7172
{
7273
uint8_t val;
@@ -97,6 +98,7 @@ static int cmd_spi_init(int argc, char *argv[])
9798
}
9899
}
99100
MSH_CMD_EXPORT(cmd_spi_init, cmd_spi_init);
101+
100102
static int cmd_spi_set_csn(int argc, char *argv[])
101103
{
102104
uint8_t val, csn;
@@ -113,6 +115,7 @@ static int cmd_spi_set_csn(int argc, char *argv[])
113115
}
114116
}
115117
MSH_CMD_EXPORT(cmd_spi_set_csn, cmd_spi_set_csn);
118+
116119
static int cmd_spi_write(int argc, char *argv[])
117120
{
118121
uint8_t data, resp;
@@ -132,6 +135,7 @@ MSH_CMD_EXPORT(cmd_spi_write, cmd_spi_write);
132135

133136
static rt_err_t configure(struct rt_spi_device *device, struct rt_spi_configuration *configuration);
134137
static rt_uint32_t xfer(struct rt_spi_device *device, struct rt_spi_message *message);
138+
135139
const static unsigned char SPI_DIV_TABLE[] = {0b0000, 0b0001, 0b0100, 0b0010, 0b0011, 0b0101, 0b0110, 0b0111, 0b1000, 0b1001, 0b1010, 0b1011};
136140
// 2 4 8 16 32 64 128 256 512 1024 2048 4096
137141
static rt_err_t configure(struct rt_spi_device *device,
@@ -174,8 +178,8 @@ static rt_err_t configure(struct rt_spi_device *device,
174178

175179
return RT_EOK;
176180
}
177-
static rt_uint32_t xfer(struct rt_spi_device *device,
178-
struct rt_spi_message *message)
181+
182+
static rt_uint32_t xfer(struct rt_spi_device *device, struct rt_spi_message *message)
179183
{
180184

181185
unsigned char cs = 0;
@@ -217,18 +221,19 @@ static rt_uint32_t xfer(struct rt_spi_device *device,
217221
}
218222
return message->length;
219223
}
224+
220225
static struct rt_spi_ops loongson_spi_ops =
221226
{
222227
.configure = configure,
223228
.xfer = xfer
224229
};
225230
static struct rt_spi_bus loongson_spi;
231+
226232
static int loongson_spi_init()
227233
{
228234
//rt_kprintf("spi_init\n");
229235
return rt_spi_bus_register(&loongson_spi, "spi", &loongson_spi_ops);
230236
}
231237
INIT_BOARD_EXPORT(loongson_spi_init);
232-
233238
#endif
234239
/*@}*/

src/kservice.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ void rt_show_version(void)
582582
{
583583
rt_kprintf("\n \\ | /\n");
584584
rt_kprintf("- RT - Thread Operating System\n");
585-
rt_kprintf(" / | \\ %d.%d.%d build %s\n",
586-
RT_VERSION, RT_SUBVERSION, RT_REVISION, __DATE__);
585+
rt_kprintf(" / | \\ %d.%d.%d build %s %s\n",
586+
RT_VERSION, RT_SUBVERSION, RT_REVISION, __DATE__, __TIME__);
587587
rt_kprintf(" 2006 - 2021 Copyright by rt-thread team\n");
588588
}
589589
RTM_EXPORT(rt_show_version);

0 commit comments

Comments
 (0)