From 4a9542c0c0319ac268d227ea8daf4c36ac7e870d Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 6 Sep 2016 14:20:52 +1000 Subject: docs/library/machine.WDT: Add that WDT is available on pyboard. --- docs/library/machine.WDT.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/library') diff --git a/docs/library/machine.WDT.rst b/docs/library/machine.WDT.rst index ff534fd9b..1d79b4c4e 100644 --- a/docs/library/machine.WDT.rst +++ b/docs/library/machine.WDT.rst @@ -14,7 +14,7 @@ Example usage:: wdt = WDT(timeout=2000) # enable it with a timeout of 2s wdt.feed() -Availability of this class: WiPy. +Availability of this class: pyboard, WiPy. Constructors ------------ -- cgit v1.2.3 From f3b5480be7243684e31e4631e3da49c725fa7234 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 8 Sep 2016 12:50:38 +1000 Subject: stmhal,cc3200,esp8266: Consistently use PWRON_RESET constant. machine.POWER_ON is renamed to machine.PWRON_RESET to match other reset-cause constants that all end in _RESET. The cc3200 port keeps a legacy definition of POWER_ON for backwards compatibility. --- cc3200/mods/modmachine.c | 3 ++- docs/library/machine.rst | 2 +- esp8266/modmachine.c | 2 +- stmhal/modmachine.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/library') diff --git a/cc3200/mods/modmachine.c b/cc3200/mods/modmachine.c index 704defb33..410d5b944 100644 --- a/cc3200/mods/modmachine.c +++ b/cc3200/mods/modmachine.c @@ -198,7 +198,8 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_IDLE), MP_OBJ_NEW_SMALL_INT(PYB_PWR_MODE_ACTIVE) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SLEEP), MP_OBJ_NEW_SMALL_INT(PYB_PWR_MODE_LPDS) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DEEPSLEEP), MP_OBJ_NEW_SMALL_INT(PYB_PWR_MODE_HIBERNATE) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_POWER_ON), MP_OBJ_NEW_SMALL_INT(PYB_SLP_PWRON_RESET) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_POWER_ON), MP_OBJ_NEW_SMALL_INT(PYB_SLP_PWRON_RESET) }, // legacy constant + { MP_OBJ_NEW_QSTR(MP_QSTR_PWRON_RESET), MP_OBJ_NEW_SMALL_INT(PYB_SLP_PWRON_RESET) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HARD_RESET), MP_OBJ_NEW_SMALL_INT(PYB_SLP_HARD_RESET) }, { MP_OBJ_NEW_QSTR(MP_QSTR_WDT_RESET), MP_OBJ_NEW_SMALL_INT(PYB_SLP_WDT_RESET) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DEEPSLEEP_RESET), MP_OBJ_NEW_SMALL_INT(PYB_SLP_HIB_RESET) }, diff --git a/docs/library/machine.rst b/docs/library/machine.rst index 0f361a7cb..46d8eea71 100644 --- a/docs/library/machine.rst +++ b/docs/library/machine.rst @@ -125,7 +125,7 @@ Constants irq wake values -.. data:: machine.POWER_ON +.. data:: machine.PWRON_RESET .. data:: machine.HARD_RESET .. data:: machine.WDT_RESET .. data:: machine.DEEPSLEEP_RESET diff --git a/esp8266/modmachine.c b/esp8266/modmachine.c index a8d2de8bb..b0b7f3a1a 100644 --- a/esp8266/modmachine.c +++ b/esp8266/modmachine.c @@ -260,7 +260,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_DEEPSLEEP), MP_ROM_INT(MACHINE_WAKE_DEEPSLEEP) }, // reset causes - { MP_ROM_QSTR(MP_QSTR_PWR_ON_RESET), MP_ROM_INT(REASON_DEFAULT_RST) }, + { MP_ROM_QSTR(MP_QSTR_PWRON_RESET), MP_ROM_INT(REASON_DEFAULT_RST) }, { MP_ROM_QSTR(MP_QSTR_HARD_RESET), MP_ROM_INT(REASON_EXT_SYS_RST) }, { MP_ROM_QSTR(MP_QSTR_DEEPSLEEP_RESET), MP_ROM_INT(REASON_DEEP_SLEEP_AWAKE) }, { MP_ROM_QSTR(MP_QSTR_WDT_RESET), MP_ROM_INT(REASON_WDT_RST) }, diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c index dbeabec55..ca17eff80 100644 --- a/stmhal/modmachine.c +++ b/stmhal/modmachine.c @@ -543,7 +543,7 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_SLEEP), MP_OBJ_NEW_SMALL_INT(PYB_PWR_MODE_LPDS) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DEEPSLEEP), MP_OBJ_NEW_SMALL_INT(PYB_PWR_MODE_HIBERNATE) }, #endif - { MP_OBJ_NEW_QSTR(MP_QSTR_POWER_ON), MP_OBJ_NEW_SMALL_INT(PYB_RESET_POWER_ON) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_PWRON_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_POWER_ON) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HARD_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_HARD) }, { MP_OBJ_NEW_QSTR(MP_QSTR_WDT_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_WDT) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DEEPSLEEP_RESET), MP_OBJ_NEW_SMALL_INT(PYB_RESET_DEEPSLEEP) }, -- cgit v1.2.3 From 4ab3eef8d77c436e1ba27d6690cb9b505dd1c8ad Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 18 Sep 2016 21:41:21 +0300 Subject: docs/library/pyb.SPI: init(): Describe "bits" argument. Based on https://github.com/micropython/micropython/pull/2210 . --- docs/library/pyb.SPI.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/library') diff --git a/docs/library/pyb.SPI.rst b/docs/library/pyb.SPI.rst index 54ecc65b6..fd110be19 100644 --- a/docs/library/pyb.SPI.rst +++ b/docs/library/pyb.SPI.rst @@ -68,6 +68,7 @@ Methods - ``polarity`` can be 0 or 1, and is the level the idle clock line sits at. - ``phase`` can be 0 or 1 to sample data on the first or second clock edge respectively. + - ``bits`` can be 8 or 16, and is the number of bits in each transferred word. - ``firstbit`` can be ``SPI.MSB`` or ``SPI.LSB``. - ``crc`` can be None for no CRC, or a polynomial specifier. -- cgit v1.2.3