Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
b76dd4a9
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
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,发现更多精彩内容 >>
提交
b76dd4a9
编写于
12月 10, 2018
作者:
流
流光
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][lpc54114] 移除PCT2075温度传感器驱动, 考虑在package中实现.
上级
0ac963ac
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
107 addition
and
224 deletion
+107
-224
bsp/lpc54114-lite/.config
bsp/lpc54114-lite/.config
+0
-5
bsp/lpc54114-lite/drivers/Kconfig
bsp/lpc54114-lite/drivers/Kconfig
+1
-6
bsp/lpc54114-lite/drivers/SConscript
bsp/lpc54114-lite/drivers/SConscript
+0
-3
bsp/lpc54114-lite/drivers/drv_pct2075.c
bsp/lpc54114-lite/drivers/drv_pct2075.c
+0
-67
bsp/lpc54114-lite/drivers/drv_pct2075.h
bsp/lpc54114-lite/drivers/drv_pct2075.h
+0
-16
bsp/lpc54114-lite/project.uvoptx
bsp/lpc54114-lite/project.uvoptx
+106
-118
bsp/lpc54114-lite/project.uvprojx
bsp/lpc54114-lite/project.uvprojx
+0
-5
bsp/lpc54114-lite/rtconfig.h
bsp/lpc54114-lite/rtconfig.h
+0
-4
未找到文件。
bsp/lpc54114-lite/.config
浏览文件 @
b76dd4a9
...
...
@@ -418,10 +418,5 @@ CONFIG_BSP_USING_SPI2=y
# Select i2c bus drivers
#
CONFIG_BSP_USING_I2C4
=
y
#
# Select spi bus drivers
#
CONFIG_BSP_USING_SDCARD
=
y
CONFIG_BSP_USING_SPIFLASH
=
y
CONFIG_BSP_USING_PCT2075
=
y
bsp/lpc54114-lite/drivers/Kconfig
浏览文件 @
b76dd4a9
#
RT1050 bsp Config!
#
LPC54110 bsp Config
menu "LPC54110 Bsp Config"
menu "Select uart drivers"
...
...
@@ -29,9 +29,4 @@ menu "LPC54110 Bsp Config"
select BSP_USING_SPI2
default y
config BSP_USING_PCT2075
bool "Enable PCT2075"
select BSP_USING_I2C4
default y
endmenu
bsp/lpc54114-lite/drivers/SConscript
浏览文件 @
b76dd4a9
...
...
@@ -25,9 +25,6 @@ if GetDepend('BSP_USING_SDCARD'):
if
GetDepend
(
'BSP_USING_SPIFLASH'
):
src
=
src
+
[
'drv_spi_flash.c'
]
if
GetDepend
(
'BSP_USING_PCT2075'
):
src
=
src
+
[
'drv_pct2075.c'
]
group
=
DefineGroup
(
'Drivers'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
bsp/lpc54114-lite/drivers/drv_pct2075.c
已删除
100644 → 0
浏览文件 @
0ac963ac
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "drv_pct2075.h"
#define PCT2075_I2C_NAME "i2c4"
#define PCT2075_I2C_ADDR (0x4C)
static
struct
rt_i2c_bus_device
*
i2c_bus
=
RT_NULL
;
float
pct2075_read
(
void
)
{
struct
rt_i2c_msg
msg
=
{
0
};
rt_uint8_t
buf
[
2
]
=
{
0
};
float
data
=
-
0
.
666666
f
;
if
(
i2c_bus
==
RT_NULL
)
{
return
-
0
.
666666
f
;
}
msg
.
addr
=
PCT2075_I2C_ADDR
;
msg
.
flags
=
RT_I2C_RD
;
msg
.
len
=
2
;
msg
.
buf
=
buf
;
if
(
rt_i2c_transfer
(
i2c_bus
,
&
msg
,
1
)
!=
1
)
{
rt_kprintf
(
"I2C write data failed.
\n
"
);
return
data
;
}
if
((
buf
[
0
]
&
0x80
)
==
0x00
)
{
data
=
((
float
)(((
buf
[
0
]
<<
8
)
+
buf
[
1
])
>>
5
)
*
0
.
125
f
);
}
else
{
data
=
0x800
-
((
buf
[
0
]
<<
8
)
+
buf
[
1
]
>>
5
);
data
=
-
(((
float
)(
data
))
*
0
.
125
f
);
}
return
data
;
}
MSH_CMD_EXPORT
(
pct2075_read
,
read
pct2075
oC
);
int
rt_hw_pct2075_init
(
void
)
{
rt_err_t
ret
=
RT_EOK
;
i2c_bus
=
rt_i2c_bus_device_find
(
PCT2075_I2C_NAME
);
if
(
i2c_bus
==
RT_NULL
)
{
rt_kprintf
(
"I2c bus not find.
\n
"
);
ret
=
(
-
RT_EIO
);
goto
__fail
;
}
return
RT_EOK
;
__fail:
return
ret
;
}
INIT_DEVICE_EXPORT
(
rt_hw_pct2075_init
);
bsp/lpc54114-lite/drivers/drv_pct2075.h
已删除
100644 → 0
浏览文件 @
0ac963ac
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __DRV_PCT2075_H__
#define __DRV_PCT2075_H__
#include <rtthread.h>
#include <rtdevice.h>
int
rt_hw_pct2075_init
(
void
);
float
pct2075_read
(
void
);
#endif
bsp/lpc54114-lite/project.uvoptx
浏览文件 @
b76dd4a9
此差异已折叠。
点击以展开。
bsp/lpc54114-lite/project.uvprojx
浏览文件 @
b76dd4a9
...
...
@@ -432,11 +432,6 @@
<FileType>
1
</FileType>
<FilePath>
drivers\drv_spi_flash.c
</FilePath>
</File>
<File>
<FileName>
drv_pct2075.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_pct2075.c
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
bsp/lpc54114-lite/rtconfig.h
浏览文件 @
b76dd4a9
...
...
@@ -205,11 +205,7 @@
/* Select i2c bus drivers */
#define BSP_USING_I2C4
/* Select spi bus drivers */
#define BSP_USING_SDCARD
#define BSP_USING_SPIFLASH
#define BSP_USING_PCT2075
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录