-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bsp][ESP32C3] support soft i2c and rt_hw_us_delay #9751
Changes from 6 commits
fd52f4b
8e2e2d9
61fb6a9
5e91067
f7505ad
9e2ebb0
53c8bd1
7b20b84
1c48ba0
8fb3d1b
28dc1a6
5a77fd7
e1a86ba
0e64700
38deb07
dcc32bc
5b3af6c
697c247
e328a87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ if GetDepend('BSP_USING_ADC'): | |
|
||
if GetDepend('BSP_USING_I2C'): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里BSP USING I2C有kconfig对应吗?我看到上面BSP_USING_I2C0 已经删掉了。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
有的 menuconfig BSP_USING_I2C
bool "Enable I2C"
default n
select RT_USING_I2C
if BSP_USING_I2C
config BSP_USING_HW_I2C
bool "Enable HardWare I2C"
default n There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 那选择BSP_USING_I2C 默认添加drv_hw_i2c.c ? |
||
src += ['drv_hw_i2c.c'] | ||
|
||
if GetDepend('BSP_USING_SW_I2C'): | ||
src += ['drv_sw_i2c.c'] | ||
|
||
if GetDepend('BSP_USING_PWM'): | ||
src += ['drv_pwm.c'] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
/* | ||
* Copyright (c) 2021-2022, RT-Thread Development Team | ||
* Copyright (c) 2021-2024 RT-Thread Development Team | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Change Logs: | ||
* Date Author Notes | ||
* 2022-06-02 supperthomas first version | ||
* 2024-12-08 wumingzi support rt_hw_us_delay | ||
*/ | ||
|
||
#ifndef __BOARD_H__ | ||
#define __BOARD_H__ | ||
|
||
#include <rtconfig.h> | ||
#include "rttypes.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
void rt_hw_board_init(void); | ||
void rt_hw_us_delay(rt_uint32_t us); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么这里选HWI2c?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前在 #9643 (comment) 问过模块冲突是否分别写ci,但是一起写是允许的,既然这样那就把软件硬件i2c都测一遍吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
分开写比较合理一些。检查一下ci是否测试到该swi2c.c和hw_i2c文件
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果确实应用中需要组合场景,可以再加个配置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里缺个CONFIG_BSP_USING_I2C配置。