Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rp2/machine_rtc: Check return value from rtc_set_alarm. #7392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mbedtls
4 changes: 3 additions & 1 deletion ports/rp2/machine_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ STATIC mp_obj_t machine_rtc_datetime(mp_uint_t n_args, const mp_obj_t *args) {
.sec = mp_obj_get_int(items[6]),
};

rtc_set_datetime(&t);
if (!rtc_set_datetime(&t)) {
mp_raise_OSError(MP_EINVAL);
}

}
return mp_const_none;
Expand Down