From 1deefdd4897bb3e640eda5c33207a7380015b856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=A0=E5=BF=83?= <1085582540@qq.com> Date: Wed, 22 Apr 2026 16:58:25 +0800 Subject: [PATCH] [feat] add ext rtc ds1307 --- peripherals/rtc/Kconfig | 1 + peripherals/rtc/ds1307/Kconfig | 48 +++++++++++++++++++++++++++++ peripherals/rtc/ds1307/package.json | 33 ++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 peripherals/rtc/ds1307/Kconfig create mode 100644 peripherals/rtc/ds1307/package.json diff --git a/peripherals/rtc/Kconfig b/peripherals/rtc/Kconfig index 8a96196257..bce1b2e470 100644 --- a/peripherals/rtc/Kconfig +++ b/peripherals/rtc/Kconfig @@ -7,5 +7,6 @@ menuconfig PKG_USING_EXTERN_RTC_DRIVERS source "$PKGS_DIR/packages/peripherals/rtc/ds3231/Kconfig" source "$PKGS_DIR/packages/peripherals/rtc/rx8900/Kconfig" + source "$PKGS_DIR/packages/peripherals/rtc/ds1307/Kconfig" endif diff --git a/peripherals/rtc/ds1307/Kconfig b/peripherals/rtc/ds1307/Kconfig new file mode 100644 index 0000000000..b0c2a84363 --- /dev/null +++ b/peripherals/rtc/ds1307/Kconfig @@ -0,0 +1,48 @@ + +# Kconfig file for package ds1307 +menuconfig PKG_USING_DS1307 + bool "ds1307 Extern RTC Driver." + default n + select RT_USING_MTD_NOR + select RT_USING_I2C + +if PKG_USING_DS1307 + + config PKG_DS1307_IIC_BUS + string "select iic bus" + default "i2c1" + + config PKG_DS1307_DEBUG + bool "Enable output rtc ds1307 debug message" + default n + + config PKG_DS1307_RAM_SHELL_TEST + bool "Enable ds1307 RAM read write test in finsh" + default n + + config PKG_DS1307_PATH + string + default "/packages/peripherals/rtc/ds1307" + + choice + default PKG_USING_DS1307_LATEST_VERSION + prompt "Version" + help + Select the package version + + config PKG_USING_DS1307_V100 + bool "v1.0.0" + + config PKG_USING_DS1307_LATEST_VERSION + bool "latest" + endchoice + + config PKG_DS1307_VER + string + default "v1.0.0" if PKG_USING_DS1307_V100 + default "latest" if PKG_USING_DS1307_LATEST_VERSION + + + +endif + diff --git a/peripherals/rtc/ds1307/package.json b/peripherals/rtc/ds1307/package.json new file mode 100644 index 0000000000..fb072c4a44 --- /dev/null +++ b/peripherals/rtc/ds1307/package.json @@ -0,0 +1,33 @@ +{ + "name": "ds1307", + "description": "Extern RTC driver for ds1307 .", + "description_zh": " ds1307 外置RTC驱动", + "enable": "PKG_USING_DS1307", + "keywords": [ + "ds1307" + ], + "category": "peripherals/rtc", + "author": { + "name": "chejia12", + "email": "1085582540@qq.com", + "github": "chejia12" + }, + "license": "Apache-2.0", + "repository": "https://gitee.com/chejia12/ds1307", + "icon": "unknown", + "homepage": "https://gitee.com/chejia12/ds1307", + "doc": "unknown", + "site": [ + { + "version": "V1.0.0", + "URL": "https://gitee.com/chejia12/ds1307/releases/download/V1.0.0/V1.0.0.zip", + "filename": "ds1307V1.0.0.zip" + }, + { + "version": "latest", + "URL": "https://gitee.com/chejia12/ds1307.git", + "filename": "", + "VER_SHA": "master" + } + ] +}