summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-03 12:02:21 +0000
committerDamien George <damien.p.george@gmail.com>2014-05-03 12:02:21 +0000
commitffaf8be1c6c1435240e80b2ec3a61a8548db1f26 (patch)
treec8e52ab95472e71ffabb52ab45564c371eb0e45d
parent3119b600d8578d866de76d49287099e3cc5685ed (diff)
stmhal: Add example use to RTC doc; add rtc.c to gendoc.py.
-rw-r--r--stmhal/gendoc.py2
-rw-r--r--stmhal/rtc.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/stmhal/gendoc.py b/stmhal/gendoc.py
index e52ca5d8a..0122579ab 100644
--- a/stmhal/gendoc.py
+++ b/stmhal/gendoc.py
@@ -343,7 +343,7 @@ def main():
args = cmd_parser.parse_args()
if len(args.files) == 0:
- args.files = ['modpyb.c', 'accel.c', 'adc.c', 'dac.c', 'extint.c', 'i2c.c', 'led.c', 'pin.c', 'rng.c', 'servo.c', 'spi.c', 'uart.c', 'usrsw.c', 'timer.c']
+ args.files = ['modpyb.c', 'accel.c', 'adc.c', 'dac.c', 'extint.c', 'i2c.c', 'led.c', 'pin.c', 'rng.c', 'servo.c', 'spi.c', 'uart.c', 'usrsw.c', 'timer.c', 'rtc.c']
doc = Doc()
for file in args.files:
diff --git a/stmhal/rtc.c b/stmhal/rtc.c
index 28c139db0..ec3c0126b 100644
--- a/stmhal/rtc.c
+++ b/stmhal/rtc.c
@@ -14,6 +14,12 @@
///
/// The RTC is and independent clock that keeps track of the date
/// and time.
+///
+/// Example usage:
+///
+/// rtc = pyb.RTC()
+/// rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0))
+/// print(rtc.datetime())
RTC_HandleTypeDef RTCHandle;