Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
luozhenger
rt-thread
提交
dfad5270
R
rt-thread
项目概览
luozhenger
/
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,体验更适合开发者的 AI 搜索 >>
提交
dfad5270
编写于
2月 25, 2023
作者:
褚
褚仕成
提交者:
guo
2月 27, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[arduino][lpc55s69] : update PWM
上级
f5798d99
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
9 deletion
+9
-9
bsp/lpc55sxx/Libraries/drivers/drv_hwtimer.c
bsp/lpc55sxx/Libraries/drivers/drv_hwtimer.c
+5
-5
bsp/lpc55sxx/Libraries/drivers/drv_pwm.c
bsp/lpc55sxx/Libraries/drivers/drv_pwm.c
+3
-3
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_pinout/pins_arduino.c
...c55s69_nxp_evk/applications/arduino_pinout/pins_arduino.c
+1
-1
未找到文件。
bsp/lpc55sxx/Libraries/drivers/drv_hwtimer.c
浏览文件 @
dfad5270
...
...
@@ -59,11 +59,11 @@ static rt_err_t lpc_ctimer_control(rt_hwtimer_t *timer, rt_uint32_t cmd, void *a
{
uint32_t
clk
;
uint32_t
pre
;
if
(
hwtimer_dev
==
CTIMER0
)
clk
=
CLOCK_GetFreq
(
kCLOCK_
C
Timer0
);
if
(
hwtimer_dev
==
CTIMER1
)
clk
=
CLOCK_GetFreq
(
kCLOCK_
C
Timer1
);
if
(
hwtimer_dev
==
CTIMER2
)
clk
=
CLOCK_GetFreq
(
kCLOCK_
C
Timer2
);
if
(
hwtimer_dev
==
CTIMER3
)
clk
=
CLOCK_GetFreq
(
kCLOCK_
C
Timer3
);
if
(
hwtimer_dev
==
CTIMER4
)
clk
=
CLOCK_GetFreq
(
kCLOCK_
C
Timer4
);
if
(
hwtimer_dev
==
CTIMER0
)
clk
=
CLOCK_GetFreq
(
kCLOCK_Timer0
);
if
(
hwtimer_dev
==
CTIMER1
)
clk
=
CLOCK_GetFreq
(
kCLOCK_Timer1
);
if
(
hwtimer_dev
==
CTIMER2
)
clk
=
CLOCK_GetFreq
(
kCLOCK_Timer2
);
if
(
hwtimer_dev
==
CTIMER3
)
clk
=
CLOCK_GetFreq
(
kCLOCK_Timer3
);
if
(
hwtimer_dev
==
CTIMER4
)
clk
=
CLOCK_GetFreq
(
kCLOCK_Timer4
);
pre
=
clk
/
*
((
uint32_t
*
)
args
)
-
1
;
...
...
bsp/lpc55sxx/Libraries/drivers/drv_pwm.c
浏览文件 @
dfad5270
...
...
@@ -153,7 +153,7 @@ int rt_hw_pwm_init(void)
#ifdef BSP_USING_CTIMER2
static
struct
rt_device_pwm
pwm
1
_device
;
static
struct
rt_device_pwm
pwm
2
_device
;
ctimer_config_t
config
;
uint32_t
pwmPeriod
,
pulsePeriod
;
...
...
@@ -186,11 +186,11 @@ int rt_hw_pwm_init(void)
CTIMER_SetupPwmPeriod
(
CTIMER2
,
kCTIMER_Match_3
,
kCTIMER_Match_1
,
pwmPeriod
,
pulsePeriod
,
false
);
#endif
ret
=
rt_device_pwm_register
(
&
pwm
1_device
,
"pwm1
"
,
&
lpc_drv_ops
,
CTIMER2
);
ret
=
rt_device_pwm_register
(
&
pwm
2_device
,
"pwm2
"
,
&
lpc_drv_ops
,
CTIMER2
);
if
(
ret
!=
RT_EOK
)
{
LOG_E
(
"%s register failed"
,
"pwm
1
"
);
LOG_E
(
"%s register failed"
,
"pwm
2
"
);
}
#endif
/* BSP_USING_CTIMER2 */
...
...
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_pinout/pins_arduino.c
浏览文件 @
dfad5270
...
...
@@ -35,7 +35,7 @@ const pin_map_t pin_map_table[]=
{
D9
,
GET_PINS
(
1
,
5
)},
{
D10
,
GET_PINS
(
1
,
1
)},
{
D11
,
GET_PINS
(
0
,
26
)},
{
D12
,
GET_PINS
(
1
,
3
)
,
"pwm0"
,
3
},
/* PWM */
{
D12
,
GET_PINS
(
1
,
3
)
},
{
D13
,
GET_PINS
(
1
,
2
)},
{
D14
,
GET_PINS
(
1
,
21
),
"i2c4"
},
/* I2C-SDA (Wire) */
{
D15
,
GET_PINS
(
1
,
20
),
"i2c4"
},
/* I2C-SCL (Wire) */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录