Skip to content

Commit 3cbff45

Browse files
authored
Merge pull request #4407 from jposada202020/RTC_doc_corrections
RTC and Touchin docs changes
2 parents 4fdcdda + 1386a81 commit 3cbff45

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

shared-bindings/rtc/RTC.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ const mp_obj_property_t rtc_rtc_datetime_obj = {
9898
//| """The RTC calibration value as an `int`.
9999
//|
100100
//| A positive value speeds up the clock and a negative value slows it down.
101-
//| Range and value is hardware specific, but one step is often approximately 1 ppm."""
101+
//| Range and value is hardware specific, but one step is often approximately 1 ppm::
102+
//|
103+
//| import rtc
104+
//| import time
105+
//|
106+
//| r = rtc.RTC()
107+
//| r.calibration = 1"""
102108
//|
103109
STATIC mp_obj_t rtc_rtc_obj_get_calibration(mp_obj_t self_in) {
104110
int calibration = common_hal_rtc_get_calibration();

shared-bindings/touchio/TouchIn.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,13 @@ const mp_obj_property_t touchio_touchin_raw_value_obj = {
153153
//| When the **TouchIn** object is created, an initial `raw_value` is read from the pin,
154154
//| and then `threshold` is set to be 100 + that value.
155155
//|
156-
//| You can adjust `threshold` to make the pin more or less sensitive."""
156+
//| You can adjust `threshold` to make the pin more or less sensitive::
157+
//|
158+
//| import board
159+
//| import touchio
160+
//|
161+
//| touch = touchio.TouchIn(board.A1)
162+
//| touch.threshold = 7300"""
157163
//|
158164
STATIC mp_obj_t touchio_touchin_obj_get_threshold(mp_obj_t self_in) {
159165
touchio_touchin_obj_t *self = MP_OBJ_TO_PTR(self_in);

0 commit comments

Comments
 (0)