8000 Merge branch 'idf-update' of https://github.com/espressif/arduino-esp… · bilkusg/arduino-esp32@2fbe490 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fbe490

Browse files
committed
Merge branch 'idf-update' of https://github.com/espressif/arduino-esp32 into stickbreaker-i2c
2 parents 4fd7dd1 + 0263d21 commit 2fbe490

File tree

51 files changed

+9821
-9790
lines changed
  • tools
  • variants
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    51 files changed

    +9821
    -9790
    lines changed

    .gitignore

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -4,4 +4,4 @@ tools/esptool
    44
    tools/esptool.exe
    55
    tools/mkspiffs/mkspiffs
    66
    tools/mkspiffs/mkspiffs.exe
    7-
    .DS_Store
    7+
    .DS_Store

    Kconfig.projbuild

    Lines changed: 3 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -90,13 +90,16 @@ config ARDUHAL_PARTITION_SCHEME_MINIMAL
    9090
    bool "Minimal (for 2MB FLASH)"
    9191
    config ARDUHAL_PARTITION_SCHEME_NO_OTA
    9292
    bool "No OTA (for large apps)"
    93+
    config ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS
    94+
    bool "Minimal SPIFFS (for large apps with OTA)"
    9395
    endchoice
    9496

    9597
    config ARDUHAL_PARTITION_SCHEME
    9698
    string
    9799
    default "default" if ARDUHAL_PARTITION_SCHEME_DEFAULT
    98100
    default "minimal" if ARDUHAL_PARTITION_SCHEME_MINIMAL
    99101
    default "no_ota" if ARDUHAL_PARTITION_SCHEME_NO_OTA
    102+
    default "min_spiffs" if ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS
    100103

    101104

    102105
    config AUTOCONNECT_WIFI

    boards.txt

    Lines changed: 4 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -35,6 +35,8 @@ esp32.menu.PartitionScheme.minimal=Minimal (2MB FLASH)
    3535
    esp32.menu.PartitionScheme.minimal.build.partitions=minimal
    3636
    esp32.menu.PartitionScheme.no_ota=No OTA (Large APP)
    3737
    esp32.menu.PartitionScheme.no_ota.build.partitions=no_ota
    38+
    esp32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
    39+
    esp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
    3840

    3941
    esp32.menu.FlashMode.qio=QIO
    4042
    esp32.menu.FlashMode.qio.build.flash_mode=dio
    @@ -108,8 +110,8 @@ pico32.build.board=ESP32_PICO
    108110
    pico32.build.f_cpu=240000000L
    109111
    pico32.build.flash_size=4MB
    110112
    pico32.build.flash_freq=80m
    111-
    pico32.build.flash_mode=qio
    112-
    pico32.build.boot=qio
    113+
    pico32.build.flash_mode=dio
    114+
    pico32.build.boot=dio
    113115
    pico32.build.partitions=default
    114116

    115117
    pico32.menu.UploadSpeed.921600=921600

    cores/esp32/HardwareSerial.cpp

    Lines changed: 110 additions & 110 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,110 +1,110 @@
    1-
    #include <stdlib.h>
    2-
    #include <stdio.h>
    3-
    #include <string.h>
    4-
    #include <inttypes.h>
    5-
    6-
    #include "HardwareSerial.h"
    7-
    8-
    #if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
    9-
    HardwareSerial Serial(0);
    10-
    #endif
    11-
    12-
    HardwareSerial::HardwareSerial(int uart_nr) : _uart_nr(uart_nr), _uart(NULL) {}
    13-
    14-
    void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert)
    15-
    {
    16-
    if(0 > _uart_nr || _uart_nr > 2) {
    17-
    log_e("Serial number is invalid, please use 0, 1 or 2");
    18-
    return;
    19-
    }
    20-
    if(_uart) {
    21-
    end();
    22-
    }
    23-
    if(_uart_nr == 0 && rxPin < 0 && txPin < 0) {
    24-
    rxPin = 3;
    25-
    txPin = 1;
    26-
    }
    27-
    if(_uart_nr == 1 && rxPin < 0 && txPin < 0) {
    28-
    rxPin = 9;
    29-
    txPin = 10;
    30-
    }
    31-
    if(_uart_nr == 2 && rxPin < 0 && txPin < 0) {
    32-
    rxPin = 16;
    33-
    txPin = 17;
    34-
    }
    35-
    _uart = uartBegin(_uart_nr, baud, config, rxPin, txPin, 256, invert);
    36-
    }
    37-
    38-
    void HardwareSerial::end()
    39-
    {
    40-
    if(uartGetDebug() == _uart_nr) {
    41-
    uartSetDebug(0);
    42-
    }
    43-
    uartEnd(_uart);
    44-
    _uart = 0;
    45-
    }
    46-
    47-
    void HardwareSerial::setDebugOutput(bool en)
    48-
    {
    49-
    if(_uart == 0) {
    50-
    return;
    51-
    }
    52-
    if(en) {
    53-
    uartSetDebug(_uart);
    54-
    } else {
    55-
    if(uartGetDebug() == _uart_nr) {
    56-
    uartSetDebug(0);
    57-
    }
    58-
    }
    59-
    }
    60-
    61-
    int HardwareSerial::available(void)
    62-
    {
    63-
    return uartAvailable(_uart);
    64-
    }
    65-
    int HardwareSerial::availableForWrite(void)
    66-
    {
    67-
    return uartAvailableForWrite(_uart);
    68-
    }
    69-
    70-
    int HardwareSerial::peek(void)
    71-
    {
    72-
    if (available()) {
    73-
    return uartPeek(_uart);
    74-
    }
    75-
    return -1;
    76-
    }
    77-
    78-
    int HardwareSerial::read(void)
    79-
    {
    80-
    if(available()) {
    81-
    return uartRead(_uart);
    82-
    }
    83-
    return -1;
    84-
    }
    85-
    86-
    void HardwareSerial::flush()
    87-
    {
    88-
    uartFlush(_uart);
    89-
    }
    90-
    91-
    size_t HardwareSerial::write(uint8_t c)
    92-
    {
    93-
    uartWrite(_uart, c);
    94-
    return 1;
    95-
    }
    96-
    97-
    size_t HardwareSerial::write(const uint8_t *buffer, size_t size)
    98-
    {
    99-
    uartWriteBuf(_uart, buffer, size);
    100-
    return size;
    101-}
    102-
    uint32_t HardwareSerial::baudRate()
    103-
    104-
    {
    105-
    return uartGetBaudRate(_uart);
    106-
    }
    107-
    HardwareSerial::operator bool() const
    108-
    {
    109-
    return true;
    110-
    }
    1+
    #include <stdlib.h>
    2+
    #include <stdio.h>
    3+
    #include <string.h>
    4+
    #include <inttypes.h>
    5+
    6+
    #include "HardwareSerial.h"
    7+
    8+
    #if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
    9+
    HardwareSerial Serial(0);
    10+
    #endif
    11+
    12+
    HardwareSerial::HardwareSerial(int uart_nr) : _uart_nr(uart_nr), _uart(NULL) {}
    13+
    14+
    void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert)
    15+
    {
    16+
    if(0 > _uart_nr || _uart_nr > 2) {
    17+
    log_e("Serial number is invalid, please use 0, 1 or 2");
    18+
    return;
    19+
    }
    20+
    if(_uart) {
    21+
    end();
    22+
    }
    23+
    if(_uart_nr == 0 && rxPin < 0 && txPin < 0) {
    24+
    rxPin = 3;
    25+
    txPin = 1;
    26+
    }
    27+
    if(_uart_nr == 1 && rxPin < 0 && txPin < 0) {
    28+
    rxPin = 9;
    29+
    txPin = 10;
    30+
    }
    31+
    if(_uart_nr == 2 && rxPin < 0 && txPin < 0) {
    32+
    rxPin = 16;
    33+
    txPin = 17;
    34+
    }
    35+
    _uart = uartBegin(_uart_nr, baud, config, rxPin, txPin, 256, invert);
    36+
    }
    37+
    38+
    void HardwareSerial::end()
    39+
    {
    40+
    if(uartGetDebug() == _uart_nr) {
    41+
    uartSetDebug(0);
    42+
    }
    43+
    uartEnd(_uart);
    44+
    _uart = 0;
    45+
    }
    46+
    47+
    void HardwareSerial::setDebugOutput(bool en)
    48+
    {
    49+
    if(_uart == 0) {
    50+
    return;
    51+
    }
    52+
    if(en) {
    53+
    uartSetDebug(_uart);
    54+
    } else {
    55+
    if(uartGetDebug() == _uart_nr) {
    56+
    uartSetDebug(0);
    57+
    }
    58+
    }
    59+
    }
    60+
    61+
    int HardwareSerial::available(void)
    62+
    {
    63+
    return uartAvailable(_uart);
    64+
    }
    65+
    int HardwareSerial::availableForWrite(void)
    66+
    {
    67+
    return uartAvailableForWrite(_uart);
    68+
    }
    69+
    70+
    int HardwareSerial::peek(void)
    71+
    {
    72+
    if (available()) {
    73+
    return uartPeek(_uart);
    74+
    }
    75+
    return -1;
    76+
    }
    77+
    78+
    int HardwareSerial::read(void)
    79+
    {
    80+
    if(available()) {
    81+
    return uartRead(_uart);
    82+
    }
    83+
    return -1;
    84+
    }
    85+
    86+
    void HardwareSerial::flush()
    87+
    {
    88+
    uartFlush(_uart);
    89+
    }
    90+
    91+
    size_t HardwareSerial::write(uint8_t c)
    92+
    {
    93+
    uartWrite(_uart, c);
    94+
    return 1;
    95+
    }
    96+
    97+
    size_t HardwareSerial::write(const uint8_t *buffer, size_t size)
    98+
    {
    99+
    uartWriteBuf(_uart, buffer, size);
    100+
    return size;
    101+
    }
    102+
    uint32_t HardwareSerial::baudRate()
    103+
    104+
    {
    105+
    return uartGetBaudRate(_uart);
    106+
    }
    107+
    HardwareSerial::operator bool() const
    108+
    {
    109+
    return true;
    110+
    }

    0 commit comments

    Comments
     (0)
    0