diff options
| author | jposada202020 <jquintana202020@gmail.com> | 2021-03-14 16:20:40 -0400 |
|---|---|---|
| committer | jposada202020 <jquintana202020@gmail.com> | 2021-03-14 16:20:40 -0400 |
| commit | 1386a8104a1164694ef4beed46ac7db917f88e51 (patch) | |
| tree | a3d7964492ae746e54068e555900bafac159da08 | |
| parent | 6a56d5dc73319e8b1bc8efe7f989931b1d349a7e (diff) | |
RTC and Touchin docs changes
| -rw-r--r-- | shared-bindings/rtc/RTC.c | 8 | ||||
| -rw-r--r-- | shared-bindings/touchio/TouchIn.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/shared-bindings/rtc/RTC.c b/shared-bindings/rtc/RTC.c index 4a792484d..5e6b00c6e 100644 --- a/shared-bindings/rtc/RTC.c +++ b/shared-bindings/rtc/RTC.c @@ -98,7 +98,13 @@ const mp_obj_property_t rtc_rtc_datetime_obj = { //| """The RTC calibration value as an `int`. //| //| A positive value speeds up the clock and a negative value slows it down. -//| Range and value is hardware specific, but one step is often approximately 1 ppm.""" +//| Range and value is hardware specific, but one step is often approximately 1 ppm:: +//| +//| import rtc +//| import time +//| +//| r = rtc.RTC() +//| r.calibration = 1""" //| STATIC mp_obj_t rtc_rtc_obj_get_calibration(mp_obj_t self_in) { int calibration = common_hal_rtc_get_calibration(); diff --git a/shared-bindings/touchio/TouchIn.c b/shared-bindings/touchio/TouchIn.c index ff723ccc7..904589a48 100644 --- a/shared-bindings/touchio/TouchIn.c +++ b/shared-bindings/touchio/TouchIn.c @@ -153,7 +153,13 @@ const mp_obj_property_t touchio_touchin_raw_value_obj = { //| When the **TouchIn** object is created, an initial `raw_value` is read from the pin, //| and then `threshold` is set to be 100 + that value. //| -//| You can adjust `threshold` to make the pin more or less sensitive.""" +//| You can adjust `threshold` to make the pin more or less sensitive:: +//| +//| import board +//| import touchio +//| +//| touch = touchio.TouchIn(board.A1) +//| touch.threshold = 7300""" //| STATIC mp_obj_t touchio_touchin_obj_get_threshold(mp_obj_t self_in) { touchio_touchin_obj_t *self = MP_OBJ_TO_PTR(self_in); |
