kopia lustrzana https://github.com/micropython/micropython-lib
micropython/drivers/sensor/pasco2: Cleanup and adding code comments.
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>pull/644/head
rodzic
11c1fe2c27
commit
af939e65fa
|
@ -1,3 +1,5 @@
|
|||
# Infineon XENSIV PAS CO2 sensor driver for MicroPython
|
||||
|
||||
from machine import I2C
|
||||
from utime import sleep, sleep_ms
|
||||
|
||||
|
@ -16,8 +18,6 @@ _PASCO2_ERROR = -1
|
|||
addr = 0
|
||||
mask = 1
|
||||
|
||||
i2c = I2C(0)
|
||||
|
||||
class PASCO2:
|
||||
"""IFX - XENSIV PAS CO2 sensor driver"""
|
||||
# RegAddr, Mask, <Later extend with register access type, bit position etc.>
|
||||
|
@ -66,7 +66,6 @@ class PASCO2:
|
|||
writeData = bytes([(readData & ~(reg[mask])) | modeVal])
|
||||
self._write_reg(_PASCO2_REG_MEAS_CFG,writeData)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
""" Public function to initialize the sensor """
|
||||
try:
|
||||
|
|
Ładowanie…
Reference in New Issue