There isn't really a good way to calibrate this RTC adafruit/circuitpython#1046
This commit is contained in:
parent
6206fa9a82
commit
6afe23d0b0
@ -42,7 +42,6 @@
|
||||
#define RTC_CLOCK_HZ (8)
|
||||
|
||||
volatile static uint32_t rtc_offset = 0;
|
||||
int8_t rtc_calibration = 0;
|
||||
|
||||
const nrfx_rtc_t rtc_instance = NRFX_RTC_INSTANCE(0);
|
||||
|
||||
@ -80,14 +79,3 @@ void common_hal_rtc_set_time(timeutils_struct_time_t *tm) {
|
||||
);
|
||||
nrfx_rtc_counter_clear(&rtc_instance);
|
||||
}
|
||||
|
||||
// A positive value speeds up the clock by removing clock cycles.
|
||||
int common_hal_rtc_get_calibration(void) {
|
||||
return rtc_calibration;
|
||||
}
|
||||
|
||||
void common_hal_rtc_set_calibration(int calibration) {
|
||||
if (calibration > 127 || calibration < -127)
|
||||
mp_raise_ValueError(translate("calibration value out of range +/-127"));
|
||||
rtc_calibration = calibration;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user