37d01d4be3
Initial support for machine.RTC on rp2 port. It only supports datetime() method and nothing else. The method gets/returns a tuple of 8 items, just like esp32 port, for example, but the usec parameter is ignored as the RP2 RTC only works up to seconds precision. The Pico RTC isn't very useful as the time is lost during reset and there seems to be no way to easily power up just the RTC clock with a low current voltage, but still there seems to be use-cases for that, see issues #6831, and a Thonny issue #1592. It was also requested for inclusion on v1.15 roadmap on #6832. Signed-off-by: Krzysztof Adamski <k@japko.eu>
20 lines
623 B
C
20 lines
623 B
C
#ifndef MICROPY_INCLUDED_RP2_MODMACHINE_H
|
|
#define MICROPY_INCLUDED_RP2_MODMACHINE_H
|
|
|
|
#include "py/obj.h"
|
|
|
|
extern const mp_obj_type_t machine_adc_type;
|
|
extern const mp_obj_type_t machine_hw_i2c_type;
|
|
extern const mp_obj_type_t machine_pin_type;
|
|
extern const mp_obj_type_t machine_pwm_type;
|
|
extern const mp_obj_type_t machine_rtc_type;
|
|
extern const mp_obj_type_t machine_spi_type;
|
|
extern const mp_obj_type_t machine_timer_type;
|
|
extern const mp_obj_type_t machine_uart_type;
|
|
extern const mp_obj_type_t machine_wdt_type;
|
|
|
|
void machine_pin_init(void);
|
|
void machine_pin_deinit(void);
|
|
|
|
#endif // MICROPY_INCLUDED_RP2_MODMACHINE_H
|