1. 05 Nov, 2016 1 commit
  2. 05 Oct, 2016 1 commit
  3. 25 Aug, 2016 1 commit
  4. 06 Jun, 2016 1 commit
  5. 03 Jun, 2016 1 commit
    • puuu's avatar
      esp8266/modpybrtc: Handle RTC overflow. · cafdfb7a
      puuu authored
      ESP-SDK system_get_rtc_time() returns uint32 and therefore overflow
      about every 7:45h.  Let's write the last state of system_get_rtc_time()
      in RTC mem and use it to check for overflow. This commit require running
      pyb_rtc_get_us_since_2000() at least once within 7 hours to avoid
  6. 01 Jun, 2016 1 commit
  7. 21 Apr, 2016 1 commit
    • Damien George's avatar
      esp8266: Implement basic deep-sleep capabilities. · 32d7cf6e
      Damien George authored
      Use the machine.deepsleep() function to enter the sleep mode.  Use the
      RTC to configure the alarm to wake the device.
      Basic use is the following:
          import machine
          # configure RTC's ALARM0 to wake device from deep sleep
          rtc = machine.RTC()
          rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
          # do other things
          # ...
          # set ALARM0's alarm to wake after 10 seconds
          rtc.alarm(rtc.ALARM0, 10000)
          # enter deep-sleep state (system is reset upon waking)
      To detect if the system woke from a deep sleep use:
          if machine.reset_cause() == machine.DEEPSLEEP_RESET:
              print('woke from deep sleep')
  8. 04 Mar, 2016 1 commit
    • Paul Sokolovsky's avatar
      esp8266: Reset "virtual RTC" on power on. · a4c8ef9d
      Paul Sokolovsky authored
      Initialize RTC period coefficients, etc. if RTC RAM doesn't contain valid
      values. time.time() then will return number of seconds since power-on, unless
      set to different timebase.
      This reuses MEM_MAGIC for the purpose beyond its initial purpose (but the whole
      modpybrtc.c need to be eventually reworked completely anyway).
  9. 12 Feb, 2016 1 commit
  10. 08 Feb, 2016 1 commit
  11. 11 Jan, 2016 1 commit
    • Damien George's avatar
      py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*. · 5b3f0b7f
      Damien George authored
      The first argument to the type.make_new method is naturally a uPy type,
      and all uses of this argument cast it directly to a pointer to a type
      structure.  So it makes sense to just have it a pointer to a type from
      the very beginning (and a const pointer at that).  This patch makes
      such a change, and removes all unnecessary casting to/from mp_obj_t.
  12. 31 Oct, 2015 1 commit
    • Damien George's avatar
      all: Add py/mphal.h and use it in all ports. · 731f3592
      Damien George authored
      py/mphal.h contains declarations for generic mp_hal_XXX functions, such
      as stdio and delay/ticks, which ports should provide definitions for.  A
      port will also provide mphalport.h with further HAL declarations.
  13. 22 Jun, 2015 1 commit
  14. 13 May, 2015 1 commit
  15. 12 May, 2015 1 commit