3030#include "py/objproperty.h"
3131#include "py/runtime.h"
3232
33- //| .. currentmodule:: samd
33+ //| import typing
34+ //| class Clock:
35+ //| """Identifies a clock on the microcontroller.
3436//|
35- //| :class:`Clock` --- Clock reference
36- //| ------------------------------------------
37- //|
38- //| Identifies a clock on the microcontroller.
39- //|
40- //| .. class:: Clock
41- //|
42- //| Identifies a clock on the microcontroller. They are fixed by the
43- //| hardware so they cannot be constructed on demand. Instead, use
44- //| `samd.clock` to reference the desired clock.
37+ //| They are fixed by the hardware so they cannot be constructed on demand. Instead, use
38+ //| ``samd.clock`` to reference the desired clock."""
4539//|
4640
4741STATIC void samd_clock_print (const mp_print_t * print , mp_obj_t self_in , mp_print_kind_t kind ) {
@@ -50,9 +44,8 @@ STATIC void samd_clock_print(const mp_print_t *print, mp_obj_t self_in, mp_print
5044 mp_printf (print , "%q.%q.%q" , MP_QSTR_samd , MP_QSTR_clock , self -> name );
5145}
5246
53- //| .. attribute:: enabled
54- //|
55- //| Is the clock enabled? (read-only)
47+ //| enabled: bool = ...
48+ //| """Is the clock enabled? (read-only)"""
5649//|
5750STATIC mp_obj_t samd_clock_get_enabled (mp_obj_t self_in ) {
5851 samd_clock_obj_t * self = MP_OBJ_TO_PTR (self_in );
@@ -69,9 +62,8 @@ const mp_obj_property_t samd_clock_enabled_obj = {
6962 },
7063};
7164
72- //| .. attribute:: parent
73- //|
74- //| Clock parent. (read-only)
65+ //| parent: typing.Union(Clock | None) = ...
66+ //| """Clock parent. (read-only)"""
7567//|
7668STATIC mp_obj_t samd_clock_get_parent (mp_obj_t self_in ) {
7769 samd_clock_obj_t * self = MP_OBJ_TO_PTR (self_in );
@@ -98,9 +90,8 @@ const mp_obj_property_t samd_clock_parent_obj = {
9890 },
9991};
10092
101- //| .. attribute:: frequency
102- //|
103- //| Clock frequency. (read-only)
93+ //| frequency: int = ...
94+ //| """Clock frequency in Herz. (read-only)"""
10495//|
10596STATIC mp_obj_t samd_clock_get_frequency (mp_obj_t self_in ) {
10697 samd_clock_obj_t * self = MP_OBJ_TO_PTR (self_in );
@@ -117,9 +108,8 @@ const mp_obj_property_t samd_clock_frequency_obj = {
117108 },
118109};
119110
120- //| .. attribute:: calibration
121- //|
122- //| Clock calibration. Not all clocks can be calibrated.
111+ //| calibration: int = ...
112+ //| """Clock calibration. Not all clocks can be calibrated."""
123113//|
124114STATIC mp_obj_t samd_clock_get_calibration (mp_obj_t self_in ) {
125115 samd_clock_obj_t * self = MP_OBJ_TO_PTR (self_in );
0 commit comments