Skip to content

Commit 1deefdd

Browse files
committed
[feat] add ext rtc ds1307
1 parent 75b3558 commit 1deefdd

3 files changed

Lines changed: 82 additions & 0 deletions

File tree

peripherals/rtc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ menuconfig PKG_USING_EXTERN_RTC_DRIVERS
77

88
source "$PKGS_DIR/packages/peripherals/rtc/ds3231/Kconfig"
99
source "$PKGS_DIR/packages/peripherals/rtc/rx8900/Kconfig"
10+
source "$PKGS_DIR/packages/peripherals/rtc/ds1307/Kconfig"
1011

1112
endif

peripherals/rtc/ds1307/Kconfig

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
# Kconfig file for package ds1307
3+
menuconfig PKG_USING_DS1307
4+
bool "ds1307 Extern RTC Driver."
5+
default n
6+
select RT_USING_MTD_NOR
7+
select RT_USING_I2C
8+
9+
if PKG_USING_DS1307
10+
11+
config PKG_DS1307_IIC_BUS
12+
string "select iic bus"
13+
default "i2c1"
14+
15+
config PKG_DS1307_DEBUG
16+
bool "Enable output rtc ds1307 debug message"
17+
default n
18+
19+
config PKG_DS1307_RAM_SHELL_TEST
20+
bool "Enable ds1307 RAM read write test in finsh"
21+
default n
22+
23+
config PKG_DS1307_PATH
24+
string
25+
default "/packages/peripherals/rtc/ds1307"
26+
27+
choice
28+
default PKG_USING_DS1307_LATEST_VERSION
29+
prompt "Version"
30+
help
31+
Select the package version
32+
33+
config PKG_USING_DS1307_V100
34+
bool "v1.0.0"
35+
36+
config PKG_USING_DS1307_LATEST_VERSION
37+
bool "latest"
38+
endchoice
39+
40+
config PKG_DS1307_VER
41+
string
42+
default "v1.0.0" if PKG_USING_DS1307_V100
43+
default "latest" if PKG_USING_DS1307_LATEST_VERSION
44+
45+
46+
47+
endif
48+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "ds1307",
3+
"description": "Extern RTC driver for ds1307 .",
4+
"description_zh": " ds1307 外置RTC驱动",
5+
"enable": "PKG_USING_DS1307",
6+
"keywords": [
7+
"ds1307"
8+
],
9+
"category": "peripherals/rtc",
10+
"author": {
11+
"name": "chejia12",
12+
"email": "1085582540@qq.com",
13+
"github": "chejia12"
14+
},
15+
"license": "Apache-2.0",
16+
"repository": "https://gitee.com/chejia12/ds1307",
17+
"icon": "unknown",
18+
"homepage": "https://gitee.com/chejia12/ds1307",
19+
"doc": "unknown",
20+
"site": [
21+
{
22+
"version": "V1.0.0",
23+
"URL": "https://gitee.com/chejia12/ds1307/releases/download/V1.0.0/V1.0.0.zip",
24+
"filename": "ds1307V1.0.0.zip"
25+
},
26+
{
27+
"version": "latest",
28+
"URL": "https://gitee.com/chejia12/ds1307.git",
29+
"filename": "",
30+
"VER_SHA": "master"
31+
}
32+
]
33+
}

0 commit comments

Comments
 (0)