We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如果是sensor_v2版本,仿照如下修改
config PKG_PACKAGES_NAME_USING_SENSOR_V2 bool "Enable sensor_v2 divce framework" depends on RT_VER_NUM >= 0x50001 select RT_USING_SENSOR select RT_USING_SENSOR_V2 default n
如果是sensor_v1版本,仿照如下修改
config PKG_PACKAGES_NAME_USING_SENSOR_V1 bool "Enable sensor_v1 divce framework" select RT_USING_SENSOR default n
在packages索引仓库修改完成后,需要同步在具体的软件包仓库中的sconscript文件中修改如下内容
if GetDepend('PKG_PACKAGES_NAME_USING_SENSOR_V2'): src += ['sensor_packages.c']
或者:
if GetDepend('PKG_PACKAGES_NAME_USING_SENSOR_V1'): src += ['sensor_packages.c']
ps:这里的sensor_packages.c文件是已经适配了sensor框架的驱动文件
示范说明:比如说AP3216C使用的是SENSOR_V2:
那么在packages仓库中AP3216目录下修改Kconfig:
config PKG_AP3216C_USING_SENSOR_V2 bool "Enable sensor_v2 divce framework" depends on RT_VER_NUM >= 0x50001 select RT_USING_SENSOR select RT_USING_SENSOR_V2 default n
同时在AP3216C软件包仓库修改sconscript文件:
if GetDepend('PKG_AP3216C_USING_SENSOR_V2'): src += ['sensor_lsc_ap3216c.c']
可参考该PR:
The text was updated successfully, but these errors were encountered:
此外如果该软件包提供了除基础驱动文件之外,还提供了sensor驱动的示例文件,需要做如下修改:
if GetDepend('PKG_USING_PACKAGES_NAME_SENSOR_SAMPLE'): src += ['xxx_sensor_sample.c']
ps:xxx_sensor_sample.c为sensor驱动的示例文件
config PKG_PACKAGES_NAME_USING_SENSOR_V1 bool "Enable sensor_v1 divce framework" select RT_USING_SENSOR default n if PKG_PACKAGES_NAME_USING_SENSOR_V1 config PKG_USING_PACKAGES_NAME_SENSOR_SAMPLE bool "Enable sensor_v1 sample for xxx packages" default n endif
Sorry, something went wrong.
No branches or pull requests
如果是sensor_v2版本,仿照如下修改
如果是sensor_v1版本,仿照如下修改
在packages索引仓库修改完成后,需要同步在具体的软件包仓库中的sconscript文件中修改如下内容
或者:
ps:这里的sensor_packages.c文件是已经适配了sensor框架的驱动文件
示范说明:比如说AP3216C使用的是SENSOR_V2:
那么在packages仓库中AP3216目录下修改Kconfig:
同时在AP3216C软件包仓库修改sconscript文件:
可参考该PR:
The text was updated successfully, but these errors were encountered: