Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
py_free-物联智能
rt-thread
提交
ce0803fe
R
rt-thread
项目概览
py_free-物联智能
/
rt-thread
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ce0803fe
编写于
10月 14, 2021
作者:
G
guo
提交者:
GitHub
10月 14, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5177 from Guozhanxin/gitee_master
同步 Gitee master
上级
20e39f0b
0546b4b5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
25 addition
and
20 deletion
+25
-20
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_fmc.c
...10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_fmc.c
+3
-3
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_gpio.c
...0x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_gpio.c
+1
-1
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_pmu.c
...10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_pmu.c
+3
-3
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_rcm.c
...10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_rcm.c
+1
-1
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_sdio.c
...0x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_sdio.c
+1
-1
bsp/ls2kdev/drivers/drv_spi.c
bsp/ls2kdev/drivers/drv_spi.c
+14
-9
src/kservice.c
src/kservice.c
+2
-2
未找到文件。
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_fmc.c
浏览文件 @
ce0803fe
...
...
@@ -347,11 +347,11 @@ FMC_STATUS_T FMC_ProgramOptionByteData(uint32_t address, uint8_t data)
*
* @param page:the address of the pages to be write protection
* This parameter can be any combination of the following values:
* for APM32F10X_LD
* for APM32F10X_LD
* @arg FLASH_WRP_PAGE_0_3 to FLASH_WRP_PAGE_28_31
* for APM32F10X_MD
* for APM32F10X_MD
* @arg FLASH_WRP_PAGE_0_3 to FLASH_WRP_PAGE_124_127
* for APM32F10X_HD
* for APM32F10X_HD
* @arg FLASH_WRP_PAGE_0_1 to FLASH_WRP_PAGE_60_61 or FLASH_WRP_PAGE_62_127
* @arg FMC_WRP_PAGE_ALL
*
...
...
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_gpio.c
浏览文件 @
ce0803fe
...
...
@@ -466,7 +466,7 @@ void GPIO_ConfigPinRemap(GPIO_REMAP_T remap)
{
regVal
|=
0x0F000000
;
}
mask
<<=
bitOffset
;
regVal
&=
(
uint32_t
)
~
mask
;
val
<<=
bitOffset
;
...
...
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_pmu.c
浏览文件 @
ce0803fe
...
...
@@ -88,7 +88,7 @@ void PMU_DisablePVD(void)
/*!
* @brief Configure a voltage threshold detected by a power supply voltage detector (PVD).
*
* @param level
sp
ecifies the PVD detection level
* @param level
:
specifies the PVD detection level
* This parameter can be one of the following values:
* @arg PMU_PVD_LEVEL_2V2 : Config PVD detection level to 2.2V
* @arg PMU_PVD_LEVEL_2V3 : Config PVD detection level to 2.3V
...
...
@@ -198,7 +198,7 @@ void PMU_EnterSTANDBYMode(void)
/*!
* @brief Read the specified PWR flag is set or not.
*
* @param flag
Re
ads the status of specifies the flag.
* @param flag
:
Reads the status of specifies the flag.
* This parameter can be one of the following values:
* @arg PMU_FLAG_WUE : Wake Up flag
* @arg PMU_FLAG_SB : StandBy flag
...
...
@@ -226,7 +226,7 @@ uint8_t PMU_ReadStatusFlag(PMU_FLAG_T flag)
/*!
* @brief Clears the PWR's pending flags.
*
* @param flag
Cl
ears the status of specifies the flag.
* @param flag
:
Clears the status of specifies the flag.
* This parameter can be one of the following values:
* @arg PMU_FLAG_WUE : Wake Up flag
* @arg PMU_FLAG_SB : StandBy flag
...
...
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_rcm.c
浏览文件 @
ce0803fe
...
...
@@ -1032,7 +1032,7 @@ void RCM_ClearStatusFlag(void)
/*!
* @brief Reads the specified RCM interrupt Flag
*
* @param flag Reads specifies RCM interrupt flag.
* @param flag
:
Reads specifies RCM interrupt flag.
* This parameter can be one of the following values:
* @arg RCM_INT_LSIRDY : LSI ready interrupt flag
* @arg RCM_INT_LSERDY : LSE ready interrupt flag
...
...
bsp/apm32/libraries/APM32F10x_Library/APM32F10x_StdPeriphDriver/src/apm32f10x_sdio.c
浏览文件 @
ce0803fe
...
...
@@ -289,7 +289,7 @@ uint32_t SDIO_ReadDataCounter(void)
/*!
* @brief Write the SDIO Data
*
* @param Data
Wr
ite 32-bit data
* @param Data
:
Write 32-bit data
*
* @retval None
*/
...
...
bsp/ls2kdev/drivers/drv_spi.c
浏览文件 @
ce0803fe
...
...
@@ -15,7 +15,6 @@
/*@{*/
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
#include <stdint.h>
#include <rtthread.h>
...
...
@@ -23,6 +22,10 @@
#include "drv_spi.h"
#ifdef RT_USING_SPI
#ifdef RT_USING_SPI_GPIOCS
#include <drivers/pin.h>
#endif
static
void
spi_init
(
uint8_t
spre_spr
,
uint8_t
copl
,
uint8_t
cpha
)
{
SET_SPI
(
SPSR
,
0xc0
);
...
...
@@ -33,21 +36,18 @@ static void spi_init(uint8_t spre_spr, uint8_t copl, uint8_t cpha)
SET_SPI
(
SOFTCS
,
0xff
);
}
static
void
spi_set_csn
(
uint8_t
val
)
rt_inline
void
spi_set_csn
(
uint8_t
val
)
{
SET_SPI
(
SOFTCS
,
val
);
}
#ifdef RT_USING_SPI_GPIOCS
#include <drivers/pin.h>
#endif
static
void
spi_set_cs
(
unsigned
char
cs
,
int
new_status
)
{
if
(
cs
<
4
)
{
unsigned
char
val
=
0
;
val
=
GET_SPI
(
SOFTCS
);
val
|=
0x01
<<
cs
;
// csen=1
val
|=
0x01
<<
cs
;
// csen=1
if
(
new_status
)
// cs = 1
{
val
|=
(
0x10
<<
cs
);
// csn=1
...
...
@@ -67,6 +67,7 @@ static void spi_set_cs(unsigned char cs, int new_status)
}
#endif
}
static
uint8_t
spi_write_for_response
(
uint8_t
data
)
{
uint8_t
val
;
...
...
@@ -97,6 +98,7 @@ static int cmd_spi_init(int argc, char *argv[])
}
}
MSH_CMD_EXPORT
(
cmd_spi_init
,
cmd_spi_init
);
static
int
cmd_spi_set_csn
(
int
argc
,
char
*
argv
[])
{
uint8_t
val
,
csn
;
...
...
@@ -113,6 +115,7 @@ static int cmd_spi_set_csn(int argc, char *argv[])
}
}
MSH_CMD_EXPORT
(
cmd_spi_set_csn
,
cmd_spi_set_csn
);
static
int
cmd_spi_write
(
int
argc
,
char
*
argv
[])
{
uint8_t
data
,
resp
;
...
...
@@ -132,6 +135,7 @@ MSH_CMD_EXPORT(cmd_spi_write, cmd_spi_write);
static
rt_err_t
configure
(
struct
rt_spi_device
*
device
,
struct
rt_spi_configuration
*
configuration
);
static
rt_uint32_t
xfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
);
const
static
unsigned
char
SPI_DIV_TABLE
[]
=
{
0
b0000
,
0
b0001
,
0
b0100
,
0
b0010
,
0
b0011
,
0
b0101
,
0
b0110
,
0
b0111
,
0
b1000
,
0
b1001
,
0
b1010
,
0
b1011
};
// 2 4 8 16 32 64 128 256 512 1024 2048 4096
static
rt_err_t
configure
(
struct
rt_spi_device
*
device
,
...
...
@@ -174,8 +178,8 @@ static rt_err_t configure(struct rt_spi_device *device,
return
RT_EOK
;
}
static
rt_uint32_t
xfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
static
rt_uint32_t
xfer
(
struct
rt_spi_device
*
device
,
struct
rt_spi_message
*
message
)
{
unsigned
char
cs
=
0
;
...
...
@@ -217,18 +221,19 @@ static rt_uint32_t xfer(struct rt_spi_device *device,
}
return
message
->
length
;
}
static
struct
rt_spi_ops
loongson_spi_ops
=
{
.
configure
=
configure
,
.
xfer
=
xfer
};
static
struct
rt_spi_bus
loongson_spi
;
static
int
loongson_spi_init
()
{
//rt_kprintf("spi_init\n");
return
rt_spi_bus_register
(
&
loongson_spi
,
"spi"
,
&
loongson_spi_ops
);
}
INIT_BOARD_EXPORT
(
loongson_spi_init
);
#endif
/*@}*/
src/kservice.c
浏览文件 @
ce0803fe
...
...
@@ -582,8 +582,8 @@ void rt_show_version(void)
{
rt_kprintf
(
"
\n
\\
| /
\n
"
);
rt_kprintf
(
"- RT - Thread Operating System
\n
"
);
rt_kprintf
(
" / |
\\
%d.%d.%d build %s
\n
"
,
RT_VERSION
,
RT_SUBVERSION
,
RT_REVISION
,
__DATE__
);
rt_kprintf
(
" / |
\\
%d.%d.%d build %s
%s
\n
"
,
RT_VERSION
,
RT_SUBVERSION
,
RT_REVISION
,
__DATE__
,
__TIME__
);
rt_kprintf
(
" 2006 - 2021 Copyright by rt-thread team
\n
"
);
}
RTM_EXPORT
(
rt_show_version
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录