Wykres commitów

8 Commity (2e75a17bab9a3f3379546659e557f026ef70cabe)

Autor SHA1 Wiadomość Data
Paul Sokolovsky a4c8ef9d16 esp8266: Reset "virtual RTC" on power on.
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).
2016-03-04 16:49:01 +02:00
Paul Sokolovsky a2e39a756c esp8266/modpybrtc: Simplify multiplication by fixed-point value. 2016-02-12 23:20:52 +02:00
Paul Sokolovsky 814b1ae3a9 esp8266/modpybrtc: pyb_rtc_memory(): Fix copy-paste error. 2016-02-08 21:39:33 +02:00
Damien George 5b3f0b7f39 py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.
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.
2016-01-11 00:49:27 +00:00
Damien George 731f359292 all: Add py/mphal.h and use it in all ports.
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.
2015-10-31 19:14:30 +03:00
Damien George de8b585ab7 esp8266: Make pyb.RTC a type, and pyb.RTC() constructs an RTC object.
This is the standard way of doing things, one should construct a
peripheral object (even if it's a singleton).

See issue #1330.
2015-06-22 23:03:17 +01:00
Josef Gajdusek 40c6d57804 esp8266: Actually use the decimal part of system_rtc_clock_cali_proc() 2015-05-13 17:59:36 +02:00
Josef Gajdusek 103d12a877 esp8266: Add utime and pyb.RTC 2015-05-13 00:12:54 +01:00