Files
Boris Lovosevic 0de63ef395 Changed the method of passing parameters from tasks/events/interrupts to MicroPython callbacks
Updated MicroPython scheduler functions
  Updated all affected modules

esp-idf sdspi_host driver refactored
  Using SDCard in SPI mode and display at the same time now works
  Tested on M5Stack & Adafruit 2.4" TFT Featherwing

Display module refactored
  uses (modified) esp-idf spi-master driver
  16-bit color mode added
  low level display functions added
  get TP calibration constants function added
  Backlight on/off function added
  M5Stack & GENERIC display types added
  display initialization sequence for unknown display types can now be handled from MicroPython
  tpcalib frozen module updated

I2C module refactored
  SLAVE mode added
  Low level I2C functions added
  esp-idf i2c driver modified

SPI module updated

UART module updated

network module updated

machine module: added method for reading internal ESP32 temperature sensor

_thread module: status of the system tasks is now available in _thread.list()

os module: SDCard mode can now be configured from MicroPython

time.ticks_xx() functions now returns correct tick count after time update
rtc module updated

Added MPU9250 frozen module (available on M5Stack)

Experimental Bluetooth support, not yet finished
Experimental support for eve display modules, not yet finished

License file added
License information in many source files updated/added
2018-02-28 14:46:02 +01:00

66 lines
2.2 KiB
C

/*
* This file is part of the MicroPython ESP32 project, https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo
*
* The MIT License (MIT)
*
* Copyright (c) 2018 LoBo (https://github.com/loboris)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
* Author: LoBo (loboris@gmail.com / https://github.com/loboris)
* Modification date: 10/2017
* Code based on MicroPython port by Pycom Limited
*/
#ifndef MPSLEEP_H_
#define MPSLEEP_H_
typedef enum {
MPSLEEP_PWRON_RESET = 0,
MPSLEEP_HARD_RESET,
MPSLEEP_WDT_RESET,
MPSLEEP_DEEPSLEEP_RESET,
MPSLEEP_SOFT_RESET,
MPSLEEP_BROWN_OUT_RESET,
MPSLEEP_SOFT_CPU_RESET,
MPSLEEP_RTCWDT_RESET,
MPSLEEP_UNKNOWN_RESET,
} mpsleep_reset_cause_t;
typedef enum {
MPSLEEP_NONE_WAKE = 0,
MPSLEEP_GPIO0_WAKE,
MPSLEEP_GPIO1_WAKE,
MPSLEEP_TOUCH_WAKE,
MPSLEEP_RTC_WAKE,
MPSLEEP_ULP_WAKE
} mpsleep_wake_reason_t;
void mpsleep_init0 (void);
void mpsleep_signal_soft_reset (void);
mpsleep_reset_cause_t mpsleep_get_reset_cause (void);
mpsleep_wake_reason_t mpsleep_get_wake_reason (void);
void mpsleep_get_reset_desc (char *reset_reason);
void mpsleep_get_wake_desc (char *wake_reason);
#endif /* MPSLEEP_H_ */