Skip to content

Commit 983bfde

Browse files
committed
bsp:k230:add support for temperature sensor driver
Added a temperature sensor driver and a test file test_ts.c. The test uses temperature sensor to measure the chip temperature, to check if the driver works correctly. Signed-off-by: XU HU [email protected]
1 parent 2bcb33b commit 983bfde

File tree

8 files changed

+655
-3
lines changed

8 files changed

+655
-3
lines changed

bsp/k230/.config

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ CONFIG_RT_USING_VDSO=y
710710
# CONFIG_PKG_USING_LHC_MODBUS is not set
711711
# CONFIG_PKG_USING_QMODBUS is not set
712712
# CONFIG_PKG_USING_PNET is not set
713+
# CONFIG_PKG_USING_OPENER is not set
713714
# end of IoT - internet of things
714715

715716
#
@@ -843,6 +844,7 @@ CONFIG_RT_USING_VDSO=y
843844
# CONFIG_PKG_USING_VOFA_PLUS is not set
844845
# CONFIG_PKG_USING_ZDEBUG is not set
845846
# CONFIG_PKG_USING_RVBACKTRACE is not set
847+
# CONFIG_PKG_USING_HPATCHLITE is not set
846848
# end of tools packages
847849

848850
#
@@ -871,7 +873,6 @@ CONFIG_RT_USING_VDSO=y
871873
#
872874
# CONFIG_PKG_USING_CMSIS_5 is not set
873875
# CONFIG_PKG_USING_CMSIS_CORE is not set
874-
# CONFIG_PKG_USING_CMSIS_DSP is not set
875876
# CONFIG_PKG_USING_CMSIS_NN is not set
876877
# CONFIG_PKG_USING_CMSIS_RTOS1 is not set
877878
# CONFIG_PKG_USING_CMSIS_RTOS2 is not set
@@ -923,7 +924,6 @@ CONFIG_RT_USING_VDSO=y
923924
# CONFIG_PKG_USING_ARM_2D is not set
924925
# CONFIG_PKG_USING_MCUBOOT is not set
925926
# CONFIG_PKG_USING_TINYUSB is not set
926-
# CONFIG_PKG_USING_CHERRYUSB is not set
927927
# CONFIG_PKG_USING_KMULTI_RTIMER is not set
928928
# CONFIG_PKG_USING_TFDB is not set
929929
# CONFIG_PKG_USING_QPC is not set
@@ -935,6 +935,7 @@ CONFIG_RT_USING_VDSO=y
935935
# CONFIG_PKG_USING_SFDB is not set
936936
# CONFIG_PKG_USING_RTP is not set
937937
# CONFIG_PKG_USING_REB is not set
938+
# CONFIG_PKG_USING_RMP is not set
938939
# CONFIG_PKG_USING_R_RHEALSTONE is not set
939940
# CONFIG_PKG_USING_HEARTBEAT is not set
940941
# end of system packages
@@ -950,12 +951,44 @@ CONFIG_RT_USING_VDSO=y
950951
#
951952
# STM32 HAL & SDK Drivers
952953
#
954+
# CONFIG_PKG_USING_STM32F0_HAL_DRIVER is not set
955+
# CONFIG_PKG_USING_STM32F0_CMSIS_DRIVER is not set
956+
# CONFIG_PKG_USING_STM32F1_HAL_DRIVER is not set
957+
# CONFIG_PKG_USING_STM32F1_CMSIS_DRIVER is not set
958+
# CONFIG_PKG_USING_STM32F2_HAL_DRIVER is not set
959+
# CONFIG_PKG_USING_STM32F2_CMSIS_DRIVER is not set
960+
# CONFIG_PKG_USING_STM32F3_HAL_DRIVER is not set
961+
# CONFIG_PKG_USING_STM32F3_CMSIS_DRIVER is not set
953962
# CONFIG_PKG_USING_STM32F4_HAL_DRIVER is not set
954963
# CONFIG_PKG_USING_STM32F4_CMSIS_DRIVER is not set
964+
# CONFIG_PKG_USING_STM32F7_HAL_DRIVER is not set
965+
# CONFIG_PKG_USING_STM32F7_CMSIS_DRIVER is not set
966+
# CONFIG_PKG_USING_STM32G0_HAL_DRIVER is not set
967+
# CONFIG_PKG_USING_STM32G0_CMSIS_DRIVER is not set
968+
# CONFIG_PKG_USING_STM32G4_HAL_DRIVER is not set
969+
# CONFIG_PKG_USING_STM32G4_CMSIS_DRIVER is not set
970+
# CONFIG_PKG_USING_STM32H5_HAL_DRIVER is not set
971+
# CONFIG_PKG_USING_STM32H5_CMSIS_DRIVER is not set
972+
# CONFIG_PKG_USING_STM32H7_HAL_DRIVER is not set
973+
# CONFIG_PKG_USING_STM32H7_CMSIS_DRIVER is not set
974+
# CONFIG_PKG_USING_STM32H7RS_HAL_DRIVER is not set
975+
# CONFIG_PKG_USING_STM32H7RS_CMSIS_DRIVER is not set
976+
# CONFIG_PKG_USING_STM32L0_HAL_DRIVER is not set
977+
# CONFIG_PKG_USING_STM32L0_CMSIS_DRIVER is not set
955978
# CONFIG_PKG_USING_STM32L4_HAL_DRIVER is not set
956979
# CONFIG_PKG_USING_STM32L4_CMSIS_DRIVER is not set
980+
# CONFIG_PKG_USING_STM32L5_HAL_DRIVER is not set
981+
# CONFIG_PKG_USING_STM32L5_CMSIS_DRIVER is not set
982+
# CONFIG_PKG_USING_STM32U5_HAL_DRIVER is not set
983+
# CONFIG_PKG_USING_STM32U5_CMSIS_DRIVER is not set
957984
# CONFIG_PKG_USING_STM32WB55_SDK is not set
958985
# CONFIG_PKG_USING_STM32_SDIO is not set
986+
# CONFIG_PKG_USING_STM32WL_HAL_DRIVER is not set
987+
# CONFIG_PKG_USING_STM32WL_CMSIS_DRIVER is not set
988+
# CONFIG_PKG_USING_STM32WB_HAL_DRIVER is not set
989+
# CONFIG_PKG_USING_STM32WB_CMSIS_DRIVER is not set
990+
# CONFIG_PKG_USING_STM32MP1_M4_HAL_DRIVER is not set
991+
# CONFIG_PKG_USING_STM32MP1_M4_CMSIS_DRIVER is not set
959992
# end of STM32 HAL & SDK Drivers
960993

961994
#
@@ -988,6 +1021,60 @@ CONFIG_RT_USING_VDSO=y
9881021
# CONFIG_PKG_USING_NRFX is not set
9891022
# CONFIG_PKG_USING_NUCLEI_SDK is not set
9901023
# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set
1024+
# CONFIG_PKG_USING_MM32 is not set
1025+
1026+
#
1027+
# WCH HAL & SDK Drivers
1028+
#
1029+
# CONFIG_PKG_USING_CH32V20x_SDK is not set
1030+
# CONFIG_PKG_USING_CH32V307_SDK is not set
1031+
# end of WCH HAL & SDK Drivers
1032+
1033+
#
1034+
# AT32 HAL & SDK Drivers
1035+
#
1036+
# CONFIG_PKG_USING_AT32A403A_HAL_DRIVER is not set
1037+
# CONFIG_PKG_USING_AT32A403A_CMSIS_DRIVER is not set
1038+
# CONFIG_PKG_USING_AT32A423_HAL_DRIVER is not set
1039+
# CONFIG_PKG_USING_AT32A423_CMSIS_DRIVER is not set
1040+
# CONFIG_PKG_USING_AT32F45x_HAL_DRIVER is not set
1041+
# CONFIG_PKG_USING_AT32F45x_CMSIS_DRIVER is not set
1042+
# CONFIG_PKG_USING_AT32F402_405_HAL_DRIVER is not set
1043+
# CONFIG_PKG_USING_AT32F402_405_CMSIS_DRIVER is not set
1044+
# CONFIG_PKG_USING_AT32F403A_407_HAL_DRIVER is not set
1045+
# CONFIG_PKG_USING_AT32F403A_407_CMSIS_DRIVER is not set
1046+
# CONFIG_PKG_USING_AT32F413_HAL_DRIVER is not set
1047+
# CONFIG_PKG_USING_AT32F413_CMSIS_DRIVER is not set
1048+
# CONFIG_PKG_USING_AT32F415_HAL_DRIVER is not set
1049+
# CONFIG_PKG_USING_AT32F415_CMSIS_DRIVER is not set
1050+
# CONFIG_PKG_USING_AT32F421_HAL_DRIVER is not set
1051+
# CONFIG_PKG_USING_AT32F421_CMSIS_DRIVER is not set
1052+
# CONFIG_PKG_USING_AT32F423_HAL_DRIVER is not set
1053+
# CONFIG_PKG_USING_AT32F423_CMSIS_DRIVER is not set
1054+
# CONFIG_PKG_USING_AT32F425_HAL_DRIVER is not set
1055+
# CONFIG_PKG_USING_AT32F425_CMSIS_DRIVER is not set
1056+
# CONFIG_PKG_USING_AT32F435_437_HAL_DRIVER is not set
1057+
# CONFIG_PKG_USING_AT32F435_437_CMSIS_DRIVER is not set
1058+
# CONFIG_PKG_USING_AT32M412_416_HAL_DRIVER is not set
1059+
# CONFIG_PKG_USING_AT32M412_416_CMSIS_DRIVER is not set
1060+
# end of AT32 HAL & SDK Drivers
1061+
1062+
#
1063+
# HC32 DDL Drivers
1064+
#
1065+
# end of HC32 DDL Drivers
1066+
1067+
#
1068+
# NXP HAL & SDK Drivers
1069+
#
1070+
# CONFIG_PKG_USING_NXP_MCX_CMSIS_DRIVER is not set
1071+
# CONFIG_PKG_USING_NXP_MCX_SERIES_DRIVER is not set
1072+
# CONFIG_PKG_USING_NXP_LPC_DRIVER is not set
1073+
# CONFIG_PKG_USING_NXP_LPC55S_DRIVER is not set
1074+
# CONFIG_PKG_USING_NXP_IMX6SX_DRIVER is not set
1075+
# CONFIG_PKG_USING_NXP_IMX6UL_DRIVER is not set
1076+
# CONFIG_PKG_USING_NXP_IMXRT_DRIVER is not set
1077+
# end of NXP HAL & SDK Drivers
9911078
# end of HAL & SDK Drivers
9921079

9931080
#
@@ -1025,12 +1112,14 @@ CONFIG_RT_USING_VDSO=y
10251112
# CONFIG_PKG_USING_BMI088 is not set
10261113
# CONFIG_PKG_USING_HMC5883 is not set
10271114
# CONFIG_PKG_USING_MAX6675 is not set
1115+
# CONFIG_PKG_USING_MAX31855 is not set
10281116
# CONFIG_PKG_USING_TMP1075 is not set
10291117
# CONFIG_PKG_USING_SR04 is not set
10301118
# CONFIG_PKG_USING_CCS811 is not set
10311119
# CONFIG_PKG_USING_PMSXX is not set
10321120
# CONFIG_PKG_USING_RT3020 is not set
10331121
# CONFIG_PKG_USING_MLX90632 is not set
1122+
# CONFIG_PKG_USING_MLX90382 is not set
10341123
# CONFIG_PKG_USING_MLX90393 is not set
10351124
# CONFIG_PKG_USING_MLX90392 is not set
10361125
# CONFIG_PKG_USING_MLX90394 is not set
@@ -1059,6 +1148,8 @@ CONFIG_RT_USING_VDSO=y
10591148
# CONFIG_PKG_USING_ICM20608 is not set
10601149
# CONFIG_PKG_USING_PAJ7620 is not set
10611150
# CONFIG_PKG_USING_STHS34PF80 is not set
1151+
# CONFIG_PKG_USING_P3T1755 is not set
1152+
# CONFIG_PKG_USING_QMI8658 is not set
10621153
# end of sensors drivers
10631154

10641155
#
@@ -1150,6 +1241,9 @@ CONFIG_RT_USING_VDSO=y
11501241
# CONFIG_PKG_USING_BT_MX02 is not set
11511242
# CONFIG_PKG_USING_GC9A01 is not set
11521243
# CONFIG_PKG_USING_IK485 is not set
1244+
# CONFIG_PKG_USING_SERVO is not set
1245+
# CONFIG_PKG_USING_SEAN_WS2812B is not set
1246+
# CONFIG_PKG_USING_IC74HC165 is not set
11531247
# CONFIG_PKG_USING_SPI_TOOLS is not set
11541248
# end of peripheral libraries and drivers
11551249

@@ -1166,6 +1260,7 @@ CONFIG_RT_USING_VDSO=y
11661260
# CONFIG_PKG_USING_QUEST is not set
11671261
# CONFIG_PKG_USING_NAXOS is not set
11681262
# CONFIG_PKG_USING_R_TINYMAIX is not set
1263+
# CONFIG_PKG_USING_LLMCHAT is not set
11691264
# end of AI packages
11701265

11711266
#
@@ -1242,6 +1337,7 @@ CONFIG_PKG_ZLIB_VER="latest"
12421337
# CONFIG_PKG_USING_KI is not set
12431338
# CONFIG_PKG_USING_ARMv7M_DWT is not set
12441339
# CONFIG_PKG_USING_CRCLIB is not set
1340+
# CONFIG_PKG_USING_LIBCRC is not set
12451341
# CONFIG_PKG_USING_LWGPS is not set
12461342
# CONFIG_PKG_USING_STATE_MACHINE is not set
12471343
# CONFIG_PKG_USING_DESIGN_PATTERN is not set
@@ -1252,6 +1348,7 @@ CONFIG_PKG_ZLIB_VER="latest"
12521348
# CONFIG_PKG_USING_SOEM is not set
12531349
# CONFIG_PKG_USING_QPARAM is not set
12541350
# CONFIG_PKG_USING_CorevMCU_CLI is not set
1351+
# CONFIG_PKG_USING_DRMP is not set
12551352
# end of miscellaneous packages
12561353

12571354
#
@@ -1495,6 +1592,7 @@ CONFIG_PKG_ZLIB_VER="latest"
14951592
# Drivers Configuration
14961593
#
14971594
# CONFIG_BSP_USING_ADC is not set
1595+
# CONFIG_BSP_USING_TS is not set
14981596
# CONFIG_BSP_USING_PWM is not set
14991597
CONFIG_BSP_USING_HARDLOCK=y
15001598
CONFIG_BSP_USING_SDIO=y

bsp/k230/board/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ menu "Drivers Configuration"
44
bool "Enable ADC"
55
select RT_USING_ADC
66
default n
7+
8+
config BSP_USING_TS
9+
bool "Enable Temperature Sensor"
10+
select RT_USING_TS
11+
default n
712

813
menuconfig BSP_USING_PWM
914
bool "Enable PWM"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# RT-Thread building script for component
2+
3+
from building import *
4+
5+
cwd = GetCurrentDir()
6+
src = Glob('*.c')
7+
CPPPATH = [cwd]
8+
9+
group = DefineGroup('TS', src, depend = ['BSP_USING_TS'], CPPPATH = CPPPATH)
10+
11+
Return('group')

0 commit comments

Comments
 (0)