Skip to content
Snippets Groups Projects
Select Git revision
  • 1f7cec944e9355860ebd264854015b2b9d561790
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

onewire.py

Blame
    • Damien George's avatar
      1f7cec94
      esp8266/scripts/onewire.py: Simplify and improve 1-wire driver. · 1f7cec94
      Damien George authored
      Changes are:
      - added OneWireError exception and used where errors can occur
      - renamed read/write functions to use same names as C _onewire funcs
      - read_bytes is now read, write_bytes is now write
      - add ability to read/write DS18B20 scratch pad
      - rename start_measure to convert_temp (since that's what it does)
      - rename get_temp to read_temp (consistency with other read names)
      - removed test function
      1f7cec94
      History
      esp8266/scripts/onewire.py: Simplify and improve 1-wire driver.
      Damien George authored
      Changes are:
      - added OneWireError exception and used where errors can occur
      - renamed read/write functions to use same names as C _onewire funcs
      - read_bytes is now read, write_bytes is now write
      - add ability to read/write DS18B20 scratch pad
      - rename start_measure to convert_temp (since that's what it does)
      - rename get_temp to read_temp (consistency with other read names)
      - removed test function
    _boot.py 179 B
    import gc
    import uos
    from flashbdev import bdev
    
    try:
        if bdev:
            vfs = uos.VfsFat(bdev, "")
    except OSError:
        import inisetup
        vfs = inisetup.setup()
    
    gc.collect()