rename left over esp32s2 to espressif
This commit is contained in:
parent
f9b40d417a
commit
1536ec0123
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_BACKGROUND_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_BACKGROUND_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_BACKGROUND_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_BACKGROUND_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_BACKGROUND_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_BACKGROUND_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_BINDINGS_ESPIDF___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_BINDINGS_ESPIDF___INIT___H
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "py/mpconfig.h"
|
||||
|
@ -39,4 +39,4 @@ NORETURN void mp_raise_espidf_MemoryError(void);
|
|||
void raise_esp_error(esp_err_t err) NORETURN;
|
||||
#define CHECK_ESP_RESULT(x) do { int res = (x); if (res != ESP_OK) raise_esp_error(res); } while (0)
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_BINDINGS_ESPIDF___INIT___H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -50,4 +50,4 @@ typedef struct {
|
|||
|
||||
extern void alarm_sleep_memory_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM__INIT__H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM__INIT__H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H
|
||||
|
||||
#include "common-hal/alarm/SleepMemory.h"
|
||||
|
||||
|
@ -33,4 +33,4 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj;
|
|||
|
||||
extern void alarm_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ALARM__INIT__H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -39,4 +39,4 @@ typedef struct {
|
|||
const mcu_pin_obj_t *pin;
|
||||
} analogio_analogin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGIN_H
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -40,4 +40,4 @@ typedef struct {
|
|||
|
||||
void analogout_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_STM32F4_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ANALOGIO_ANALOGOUT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_I2C_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_I2C_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_I2C_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_I2C_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -45,4 +45,4 @@ typedef struct {
|
|||
|
||||
void i2c_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_I2C_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_SPI_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_SPI_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_SPI_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_SPI_H
|
||||
|
||||
#include "driver/spi_master.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
|
@ -49,4 +49,4 @@ typedef struct {
|
|||
|
||||
void spi_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_SPI_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_SPI_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_UART_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_UART_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_UART_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_UART_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -46,4 +46,4 @@ typedef struct {
|
|||
|
||||
void uart_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_UART_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_BUSIO_UART_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_COUNTIO_COUNTER_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/pcnt.h"
|
||||
|
@ -37,4 +37,4 @@ typedef struct {
|
|||
pcnt_unit_t unit;
|
||||
} countio_counter_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_COUNTIO_COUNT_H
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -36,4 +36,4 @@ typedef struct {
|
|||
bool output_value;
|
||||
} digitalio_digitalinout_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DIGITALIO_DIGITALINOUT_H
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DUALBANK___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DUALBANK___INIT___H
|
||||
|
||||
extern void dualbank_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_DUALBANK___INIT___H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/pcnt.h"
|
||||
|
@ -42,4 +42,4 @@ typedef struct {
|
|||
uint16_t capture_period;
|
||||
} frequencyio_frequencyin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
|
||||
#include "py/mphal.h"
|
||||
|
||||
|
@ -41,4 +41,4 @@ void claim_pin_number(gpio_num_t pin_number);
|
|||
bool pin_number_is_free(gpio_num_t pin_number);
|
||||
void never_reset_pin_number(gpio_num_t pin_number);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PIN_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
|
||||
#define COMMON_HAL_MCU_PROCESSOR_UID_LENGTH 6
|
||||
|
||||
|
@ -36,4 +36,4 @@ typedef struct {
|
|||
// Stores no state currently.
|
||||
} mcu_processor_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_MICROCONTROLLER_PROCESSOR_H
|
||||
|
|
|
@ -91,7 +91,7 @@ static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, si
|
|||
void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, uint8_t *pixels, uint32_t numBytes) {
|
||||
// Reserve channel
|
||||
uint8_t number = digitalinout->pin->number;
|
||||
rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt();
|
||||
rmt_channel_t channel = peripherals_find_and_reserve_rmt();
|
||||
if (channel == RMT_CHANNEL_MAX) {
|
||||
mp_raise_RuntimeError(translate("All timers in use"));
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
|
|||
rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100));
|
||||
|
||||
// Free channel again
|
||||
esp32s2_peripherals_free_rmt(config.channel);
|
||||
peripherals_free_rmt(config.channel);
|
||||
// Swap pin back to GPIO mode
|
||||
gpio_set_direction(digitalinout->pin->number, GPIO_MODE_OUTPUT);
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -35,4 +35,4 @@ typedef struct {
|
|||
uint32_t len;
|
||||
} nvm_bytearray_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_NVM_BYTEARRAY_H
|
||||
|
|
|
@ -36,8 +36,8 @@ STATIC const qstr os_uname_info_fields[] = {
|
|||
MP_QSTR_sysname, MP_QSTR_nodename,
|
||||
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
|
||||
};
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, "esp32s2");
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, "esp32s2");
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, MICROPY_HW_MCU_NAME);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, MICROPY_HW_MCU_NAME);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_release_obj, MICROPY_VERSION_STRING);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_version_obj, MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE);
|
||||
STATIC const MP_DEFINE_STR_OBJ(os_uname_info_machine_obj, MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME);
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
|
||||
#include "common-hal/digitalio/DigitalInOut.h"
|
||||
|
||||
|
@ -44,4 +44,4 @@ typedef struct {
|
|||
uint32_t write_mask; // bit mask for the single bit for the write pin register
|
||||
} paralleldisplay_parallelbus_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PS2IO_PS2_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PS2IO_PS2_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -57,4 +57,4 @@ typedef struct {
|
|||
|
||||
void ps2_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PS2IO_PS2_H
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
STATIC uint8_t refcount = 0;
|
||||
STATIC pulseio_pulsein_obj_t *handles[RMT_CHANNEL_MAX];
|
||||
|
||||
// Requires rmt.c void esp32s2_peripherals_reset_all(void) to reset
|
||||
// Requires rmt.c void peripherals_reset_all(void) to reset
|
||||
|
||||
STATIC void update_internal_buffer(pulseio_pulsein_obj_t *self) {
|
||||
uint32_t length = 0;
|
||||
|
@ -106,7 +106,7 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, const mcu
|
|||
}
|
||||
|
||||
// Find a free RMT Channel and configure it
|
||||
rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt();
|
||||
rmt_channel_t channel = peripherals_find_and_reserve_rmt();
|
||||
if (channel == RMT_CHANNEL_MAX) {
|
||||
mp_raise_RuntimeError(translate("All timers in use"));
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ bool common_hal_pulseio_pulsein_deinited(pulseio_pulsein_obj_t *self) {
|
|||
|
||||
void common_hal_pulseio_pulsein_deinit(pulseio_pulsein_obj_t *self) {
|
||||
handles[self->channel] = NULL;
|
||||
esp32s2_peripherals_free_rmt(self->channel);
|
||||
peripherals_free_rmt(self->channel);
|
||||
reset_pin_number(self->pin->number);
|
||||
refcount--;
|
||||
if (refcount == 0) {
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
||||
|
@ -53,4 +53,4 @@ typedef struct {
|
|||
void pulsein_reset(void);
|
||||
void pulsein_background(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEIN_H
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
#include "shared-bindings/pwmio/PWMOut.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
// Requires rmt.c void esp32s2_peripherals_reset_all(void) to reset
|
||||
// Requires rmt.c void peripherals_reset_all(void) to reset
|
||||
|
||||
void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self,
|
||||
const mcu_pin_obj_t *pin,
|
||||
uint32_t frequency,
|
||||
uint16_t duty_cycle) {
|
||||
|
||||
rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt();
|
||||
rmt_channel_t channel = peripherals_find_and_reserve_rmt();
|
||||
if (channel == RMT_CHANNEL_MAX) {
|
||||
mp_raise_RuntimeError(translate("All timers in use"));
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) {
|
|||
}
|
||||
|
||||
void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) {
|
||||
esp32s2_peripherals_free_rmt(self->channel);
|
||||
peripherals_free_rmt(self->channel);
|
||||
self->channel = RMT_CHANNEL_MAX;
|
||||
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "components/driver/include/driver/rmt.h"
|
||||
|
@ -38,4 +38,4 @@ typedef struct {
|
|||
rmt_channel_t channel;
|
||||
} pulseio_pulseout_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "components/driver/include/driver/ledc.h"
|
||||
|
@ -42,4 +42,4 @@ typedef struct {
|
|||
|
||||
void pwmout_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "peripherals/pcnt.h"
|
||||
|
@ -37,4 +37,4 @@ typedef struct {
|
|||
pcnt_unit_t unit;
|
||||
} rotaryio_incrementalencoder_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_RTC_RTC_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_RTC_RTC_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_RTC_RTC_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_RTC_RTC_H
|
||||
|
||||
extern void rtc_init(void);
|
||||
extern void rtc_reset(void);
|
||||
extern void common_hal_rtc_init(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_RTC_RTC_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_RTC_RTC_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -48,4 +48,4 @@ typedef struct {
|
|||
void socket_reset(void);
|
||||
bool register_open_socket(socketpool_socket_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKET_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -33,4 +33,4 @@ typedef struct {
|
|||
mp_obj_base_t base;
|
||||
} socketpool_socketpool_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL_SOCKETPOOL_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SOCKETPOOL___INIT___H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLCONTEXT_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -36,4 +36,4 @@ typedef struct {
|
|||
esp_tls_cfg_t ssl_config;
|
||||
} ssl_sslcontext_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSL_CONTEXT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSL_CONTEXT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -41,4 +41,4 @@ typedef struct {
|
|||
ssl_sslcontext_obj_t *ssl_context;
|
||||
} ssl_sslsocket_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL___INIT___H
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SSL___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL___INIT___H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -34,4 +34,4 @@ typedef struct {
|
|||
// Stores no state currently.
|
||||
} super_runtime_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SUPERVISOR_RUNTIME_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
|
@ -36,4 +36,4 @@ typedef struct {
|
|||
uint16_t threshold;
|
||||
} touchio_touchin_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_TOUCHIO_TOUCHIN_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "shared-bindings/watchdog/WatchDogMode.h"
|
||||
|
@ -40,4 +40,4 @@ struct _watchdog_watchdogtimer_obj_t {
|
|||
// This needs to be called in order to disable the watchdog
|
||||
void watchdog_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_NETWORK_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_NETWORK_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_NETWORK_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_NETWORK_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -36,4 +36,4 @@ typedef struct {
|
|||
wifi_ap_record_t record;
|
||||
} wifi_network_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_NETWORK_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_NETWORK_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_RADIO_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_RADIO_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_RADIO_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_RADIO_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -65,4 +65,4 @@ typedef struct {
|
|||
|
||||
extern void common_hal_wifi_radio_gc_collect(wifi_radio_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_RADIO_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_RADIO_H
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -59,4 +59,4 @@ typedef struct {
|
|||
void wifi_scannednetworks_scan_next_channel(wifi_scannednetworks_obj_t *self);
|
||||
void wifi_scannednetworks_deinit(wifi_scannednetworks_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI_SCANNEDNETWORKS_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI___INIT___H
|
||||
#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI___INIT___H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI___INIT___H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI___INIT___H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -35,4 +35,4 @@ void wifi_reset(void);
|
|||
|
||||
void ipaddress_ipaddress_to_esp_idf(mp_obj_t ip_address, ip_addr_t *esp_ip_address);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_WIFI___INIT___H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WIFI___INIT___H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_CONFIG_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_CONFIG_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_CONFIG_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_CONFIG_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
|
@ -35,4 +35,4 @@ extern const mp_obj_type_t mcu_pin_type;
|
|||
#define PIN_PREFIX_FIELDS mp_obj_base_t base;
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_CONFIG_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_CONFIG_H
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_MODULES_MODULE_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_MODULES_MODULE_H
|
||||
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
|
||||
void never_reset_module_internal_pins(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_MODULES_MODULE_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_MODULES_MODULE_H
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef ESP32S2_MPCONFIGPORT_H__
|
||||
#define ESP32S2_MPCONFIGPORT_H__
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
|
||||
|
||||
#define MICROPY_NLR_THUMB (0)
|
||||
|
||||
#define MICROPY_USE_INTERNAL_PRINTF (0)
|
||||
#define MICROPY_PY_SYS_PLATFORM "Espressif ESP32-S2"
|
||||
#define MICROPY_PY_SYS_PLATFORM "Espressif"
|
||||
|
||||
#include "py/circuitpy_mpconfig.h"
|
||||
|
||||
|
@ -61,4 +61,4 @@
|
|||
#ifndef CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP
|
||||
#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0)
|
||||
#endif
|
||||
#endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __ESP32S2_HAL
|
||||
#define __ESP32S2_HAL
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_MPHAL_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_MPHAL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
@ -38,4 +38,4 @@
|
|||
|
||||
bool mp_hal_stdin_any(void);
|
||||
|
||||
#endif
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_MPHAL_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H
|
||||
|
||||
#include "driver/pcnt.h"
|
||||
|
||||
|
@ -33,4 +33,4 @@ extern int peripherals_pcnt_init(pcnt_config_t pcnt_config);
|
|||
extern void peripherals_pcnt_deinit(pcnt_unit_t *unit);
|
||||
extern void peripherals_pcnt_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
// DO NOT include this file directly. Use shared-bindings/microcontroller/Pin.h instead to ensure
|
||||
// that all necessary includes are already included.
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PINS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PINS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -93,4 +93,4 @@ extern const mcu_pin_obj_t pin_GPIO46;
|
|||
|
||||
#define NO_PIN (GPIO_NUM_NC)
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PINS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
|
||||
bool rmt_reserved_channels[RMT_CHANNEL_MAX];
|
||||
|
||||
void esp32s2_peripherals_rmt_reset(void) {
|
||||
void peripherals_rmt_reset(void) {
|
||||
for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) {
|
||||
if (rmt_reserved_channels[i]) {
|
||||
esp32s2_peripherals_free_rmt(i);
|
||||
peripherals_free_rmt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void) {
|
||||
rmt_channel_t peripherals_find_and_reserve_rmt(void) {
|
||||
for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) {
|
||||
if (!rmt_reserved_channels[i]) {
|
||||
rmt_reserved_channels[i] = true;
|
||||
|
@ -48,7 +48,7 @@ rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void) {
|
|||
return RMT_CHANNEL_MAX;
|
||||
}
|
||||
|
||||
void esp32s2_peripherals_free_rmt(rmt_channel_t chan) {
|
||||
void peripherals_free_rmt(rmt_channel_t chan) {
|
||||
rmt_reserved_channels[chan] = false;
|
||||
rmt_driver_uninstall(chan);
|
||||
}
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H
|
||||
|
||||
#include "py/mphal.h"
|
||||
#include "components/driver/include/driver/rmt.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void esp32s2_peripherals_rmt_reset(void);
|
||||
rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void);
|
||||
void esp32s2_peripherals_free_rmt(rmt_channel_t chan);
|
||||
void peripherals_rmt_reset(void);
|
||||
rmt_channel_t peripherals_find_and_reserve_rmt(void);
|
||||
void peripherals_free_rmt(rmt_channel_t chan);
|
||||
|
||||
#endif
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H
|
||||
|
||||
#include "driver/timer.h"
|
||||
|
||||
|
@ -40,4 +40,4 @@ extern void peripherals_timer_deinit(timer_index_t *timer);
|
|||
extern void peripherals_timer_reset(void);
|
||||
extern void peripherals_timer_never_reset(timer_index_t *timer);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TOUCH_HANDLER_H
|
||||
|
||||
#include "driver/touch_pad.h"
|
||||
|
||||
|
@ -33,4 +33,4 @@ extern void peripherals_touch_reset(void);
|
|||
extern void peripherals_touch_never_reset(const bool enable);
|
||||
extern void peripherals_touch_init(const touch_pad_t touchpad);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TOUCH_HANDLER_H
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_SUPERVISOR_PORT_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_SUPERVISOR_PORT_H
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
extern TaskHandle_t circuitpython_task;
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_SUPERVISOR_PORT_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
@ -35,4 +35,4 @@
|
|||
#define INTERNAL_FLASH_SYSTICK_MASK (0x1ff) // 512ms
|
||||
#define INTERNAL_FLASH_IDLE_TICK(tick) (((tick) & INTERNAL_FLASH_SYSTICK_MASK) == 2)
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_H
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#define MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#ifndef MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#define MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
|
||||
#define FLASH_ROOT_POINTERS
|
||||
|
||||
#endif // MICROPY_INCLUDED_ESP32S2_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
#endif // MICROPY_INCLUDED_ESPRESSIF_INTERNAL_FLASH_ROOT_POINTERS_H
|
||||
|
|
|
@ -173,27 +173,10 @@ void reset_port(void) {
|
|||
analogout_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_DUALBANK
|
||||
dualbank_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PS2IO
|
||||
ps2_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_AUDIOBUSIO
|
||||
i2s_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PULSEIO
|
||||
esp32s2_peripherals_rmt_reset();
|
||||
pulsein_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PWMIO
|
||||
pwmout_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_BUSIO
|
||||
i2c_reset();
|
||||
spi_reset();
|
||||
|
@ -204,12 +187,20 @@ void reset_port(void) {
|
|||
peripherals_pcnt_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_DUALBANK
|
||||
dualbank_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_FREQUENCYIO
|
||||
peripherals_timer_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PS2IO
|
||||
ps2_reset();
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_PULSEIO
|
||||
esp32s2_peripherals_rmt_reset();
|
||||
peripherals_rmt_reset();
|
||||
pulsein_reset();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue