@@ -124,25 +124,26 @@ def temperature(self):
124
124
only every 64 seconds, or when a conversion is forced."""
125
125
return self ._temperature / 4
126
126
127
- def force_conversion (self ):
127
+ def force_temperature_conversion (self ):
128
128
"""Forces a conversion and returns the new temperature"""
129
129
while self ._busy :
130
- pass
130
+ pass # Wait for any normal in-progress conversion to complete
131
131
self ._conv = True
132
- while self ._busy :
133
- pass
132
+ while self ._conv :
133
+ pass # Wait for manual conversion request to complete
134
134
return self .temperature
135
135
136
136
@property
137
137
def calibration (self ):
138
- """Calibration values range from -128 to 127; each step is
139
- approximately 0.1ppm, and positive values decrease the frequency
140
- (increase the period). When set, a temperature conversion is forced so
141
- the result of calibration can be seen directly at the 32kHz pin after
142
- the next temperature conversion."""
138
+ """Calibrate the frequency of the crystal oscillator by adding or
139
+ removing capacitance. The datasheet calls this the Aging Offset.
140
+ Calibration values range from -128 to 127; each step is approximately
141
+ 0.1ppm, and positive values decrease the frequency (increase the
142
+ period). When set, a temperature conversion is forced so the result of
143
+ calibration can be seen directly at the 32kHz pin immediately"""
143
144
return self ._calibration
144
145
145
146
@calibration .setter
146
147
def calibration (self , value ):
147
148
self ._calibration = value
148
- self .force_conversion ()
149
+ self .force_temperature_conversion ()
0 commit comments