From ba65a03ea0fc46e382afcfbeef9fa0a84c7489f3 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 23 Jun 2026 13:49:19 -0300 Subject: [PATCH] update version --- .github/workflows/cifuzz.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/fuzz.yml | 2 +- .github/workflows/nightly.yml | 50 +++++++++---------- .github/workflows/nightly_tests.yml | 24 +++++----- .github/workflows/on_demand.yml | 4 +- .github/workflows/quicktest.yml | 32 ++++++------- .github/workflows/zephyr.yml | 2 +- mongoose.h | 74 ++++++++++++++--------------- src/version.h | 2 +- 10 files changed, 97 insertions(+), 97 deletions(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index ae22c852..04d6f16d 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -9,7 +9,7 @@ jobs: Fuzzing: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: Build Fuzzers id: build diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 336d9fc3..44c8f9ab 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,7 +17,7 @@ jobs: permissions: security-events: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: Initialize CodeQL diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index b2bd7c16..b1d978d5 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -15,7 +15,7 @@ jobs: target: [fuzz, fuzz_tls] name: ${{ matrix.target }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: make -C test ${{ matrix.target }} ARGS="-max_total_time=14400" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 42ce55dd..38dc1cb8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -40,7 +40,7 @@ jobs: SSL: ${{ matrix.ssl }} TFLAGS: ${{ matrix.select }} -DMQTT_LOCALHOST -DNO_ABORT steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - uses: webfactory/ssh-agent@v0.9.1 with: @@ -70,7 +70,7 @@ jobs: IPV6: 1 TFLAGS: -DMQTT_HOST -DIPV6_NOROUTING -DNO_ABORT # -DMQTT_HOST_NAME=\"server\" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - uses: webfactory/ssh-agent@v0.9.1 with: @@ -91,7 +91,7 @@ jobs: target: [mip_vc98] name: mip89 ${{ matrix.target }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: make -C test ${{ matrix.target }} IPV6=1 s390: @@ -104,7 +104,7 @@ jobs: env: TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && ./test/setup_mqtt_server.sh && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test s390 SSL=${{ matrix.ssl }} MULTIREC=NO armhf: @@ -117,7 +117,7 @@ jobs: env: TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update ; sudo apt -y install binfmt-support qemu-user-static && ./test/setup_mqtt_server.sh && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make -C test armhf SSL=${{ matrix.ssl }} MULTIREC=NO unamalgamated-mg_prefix: @@ -128,7 +128,7 @@ jobs: ssl: ["", BUILTIN, MBEDTLS, OPENSSL, WOLFSSL] name: unamalgamated-mg_prefix SSL=${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update ; sudo apt -y install libmbedtls-dev libwolfssl-dev - run: make -C test unamalgamated SSL=${{ matrix.ssl }} && make -C test mg_prefix @@ -142,7 +142,7 @@ jobs: env: TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update ; sudo apt -y install libmbedtls-dev libwolfssl-dev valgrind - run: ./test/setup_mqtt_server.sh && make -C test valgrind SSL=${{ matrix.ssl }} @@ -168,7 +168,7 @@ jobs: TFLAGS: ${{ matrix.select }} -DMQTT_LOCALHOST ${{ matrix.env.tflags }} -DNO_ABORT -Wno-sign-conversion -Wno-undef # Workarounds for MbedTLS HOMEBREW_NO_AUTO_UPDATE: 1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - uses: webfactory/ssh-agent@v0.9.1 with: @@ -199,7 +199,7 @@ jobs: SSL: ${{ matrix.ssl }} TFLAGS: ${{ matrix.select }} -DMQTT_LOCALHOST -DNO_ABORT steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - uses: webfactory/ssh-agent@v0.9.1 with: @@ -219,7 +219,7 @@ jobs: ssl: ["", BUILTIN] name: Arm SSL=${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: make -C test arm SSL=${{ matrix.ssl }} riscv: runs-on: ubuntu-latest @@ -229,7 +229,7 @@ jobs: ssl: ["", BUILTIN] name: RISC-V SSL=${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: make -C test riscv SSL=${{ matrix.ssl }} tutorials: @@ -240,7 +240,7 @@ jobs: ssl: [-DMG_TLS=MG_TLS_NONE, -DMG_TLS=MG_TLS_BUILTIN] name: tutorials ${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: webfactory/ssh-agent@v0.9.1 with: ssh-private-key: ${{ secrets.HEALTH_TESTS_SSH_KEY }} @@ -261,7 +261,7 @@ jobs: ssl: [-DMG_TLS=MG_TLS_NONE, -DMG_TLS=MG_TLS_BUILTIN] name: tutorials_win ${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } # - uses: egor-tensin/setup-mingw@v2 # with: @@ -281,7 +281,7 @@ jobs: ssl: [-DMG_TLS=MG_TLS_NONE, -DMG_TLS=MG_TLS_BUILTIN] name: tutorials_mac ${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: make -C test tutorials_mac CFLAGS_EXTRA="${{ matrix.ssl }}" - run: make -C test clean_tutorials_mac @@ -289,7 +289,7 @@ jobs: arduino: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: echo # nothing specific to install or do - run: make -C test/arduino @@ -307,7 +307,7 @@ jobs: # env: # GO: 0 # steps: -# - uses: actions/checkout@v4 +# - uses: actions/checkout@v5 # with: { fetch-depth: 2 } # - run: echo # nothing specific to install or do # fi @@ -349,7 +349,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi - run: make -C tutorials/${{ matrix.example.path }} build @@ -368,7 +368,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: echo # nothing specific to install or do - run: make -C tutorials/${{ matrix.example.path }} build @@ -408,7 +408,7 @@ jobs: - path: ti/ek-tm4c1294xl-make-baremetal-builtin-rndis name: ${{ matrix.example.path }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi - run: make -C tutorials/${{ matrix.example.path }} build @@ -422,7 +422,7 @@ jobs: - path: esp32 name: ${{ matrix.example.path }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: echo # nothing specific to install or do - run: make -C tutorials/http/device-dashboard/${{ matrix.example.path }} build @@ -442,7 +442,7 @@ jobs: - path: renesas/ek-ra6m4-make-baremetal-builtin name: ${{ matrix.example.path }} ${{ matrix.ssl }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi - run: make -C tutorials/${{ matrix.example.path }} build CFLAGS_EXTRA="${{ matrix.ssl }}" @@ -456,7 +456,7 @@ jobs: # - path: # name: ${{ matrix.example.path }} # steps: -# - uses: actions/checkout@v4 +# - uses: actions/checkout@v5 # with: { fetch-depth: 2 } # - run: echo # nothing specific to install or do # - run: make -C tutorials/${{ matrix.example.path }} build @@ -471,7 +471,7 @@ jobs: # - path: # name: ${{ matrix.example.path }} # steps: -# - uses: actions/checkout@v4 +# - uses: actions/checkout@v5 # with: { fetch-depth: 2 } # - run: echo # nothing specific to install or do # - run: make -C tutorials/${{ matrix.example.path }} device_dashboard @@ -480,7 +480,7 @@ jobs: cube_examples: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: sudo pip install yq - run: cd test/cube && make @@ -488,7 +488,7 @@ jobs: # xpresso_examples: # runs-on: ubuntu-latest # steps: -# - uses: actions/checkout@v4 +# - uses: actions/checkout@v5 # with: { fetch-depth: 2 } # - run: sudo pip install yq # - run: cd test/xpresso && make diff --git a/.github/workflows/nightly_tests.yml b/.github/workflows/nightly_tests.yml index 4cff8fde..622b8889 100644 --- a/.github/workflows/nightly_tests.yml +++ b/.github/workflows/nightly_tests.yml @@ -11,7 +11,7 @@ jobs: test_f7: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -20,7 +20,7 @@ jobs: test_f4: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -29,7 +29,7 @@ jobs: test_h743: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -38,7 +38,7 @@ jobs: test_h723: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -47,7 +47,7 @@ jobs: test_h5: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -56,7 +56,7 @@ jobs: test_rt1020: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -66,7 +66,7 @@ jobs: test_rt1060: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -76,7 +76,7 @@ jobs: test_rt1170: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -86,7 +86,7 @@ jobs: test_ra6m4: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 3 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -96,7 +96,7 @@ jobs: test_tm4c: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -106,7 +106,7 @@ jobs: test_same54: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: baremetal run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi @@ -116,7 +116,7 @@ jobs: test_pico_w5500: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - name: SDK run: sudo apt -y update && sudo apt -y install gcc-arm-none-eabi diff --git a/.github/workflows/on_demand.yml b/.github/workflows/on_demand.yml index 40c25016..14869a12 100644 --- a/.github/workflows/on_demand.yml +++ b/.github/workflows/on_demand.yml @@ -22,7 +22,7 @@ jobs: SSL: ${{ matrix.ssl }} TFLAGS: -DMQTT_HOST -DIPV6_NOROUTING -DNO_ABORT # -DMQTT_HOST_NAME=\"server\" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - uses: webfactory/ssh-agent@v0.9.1 with: @@ -48,7 +48,7 @@ jobs: # TFLAGS: ${{ matrix.select }} -DMQTT_LOCALHOST -DNO_ABORT -Wno-sign-conversion -Wno-undef # Workarounds for MbedTLS # HOMEBREW_NO_AUTO_UPDATE: 1 # steps: -# - uses: actions/checkout@v4 +# - uses: actions/checkout@v5 # with: { fetch-depth: 2 } # - uses: webfactory/ssh-agent@v0.9.1 # with: diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index 95e6927d..a08c0910 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -24,7 +24,7 @@ jobs: SSL: ${{ matrix.ssl }} TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -34,7 +34,7 @@ jobs: env: TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -44,7 +44,7 @@ jobs: env: TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -52,7 +52,7 @@ jobs: unamalgamated-mg_prefix: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -69,7 +69,7 @@ jobs: TFLAGS: -DMQTT_LOCALHOST # -DNO_SNTP_CHECK HOMEBREW_NO_AUTO_UPDATE: 1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -87,7 +87,7 @@ jobs: env: TFLAGS: -DMQTT_LOCALHOST steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -95,25 +95,25 @@ jobs: arm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: make -C test arm riscv: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: make -C test riscv tutorials: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: curl -sL https://github.com/Y2Z/monolith/releases/download/v2.10.1/monolith-gnu-linux-x86_64 -o /usr/local/bin/monolith ; chmod a+x /usr/local/bin/monolith - run: make -C test tutorials_essential - run: make -C test clean_tutorials_essential tutorials_win: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } # - uses: egor-tensin/setup-mingw@v2 # with: @@ -128,7 +128,7 @@ jobs: runs-on: macos-latest env: { HOMEBREW_NO_AUTO_UPDATE: 1 } steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: brew install monolith - run: make -C test tutorials_mac - run: make -C test clean_tutorials_mac @@ -160,7 +160,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: | if ./test/match_changed_files.sh '^src'; then @@ -183,7 +183,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^src|^tutorials/http/uart-bridge|^tutorials/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -206,7 +206,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: if ./test/match_changed_files.sh '^src|^tutorials/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi - if: ${{ env.GO == 1 }} @@ -225,7 +225,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: | if ./test/match_changed_files.sh '^src|tutorials/http/device-dashboard'; then @@ -254,7 +254,7 @@ jobs: env: GO: 0 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: | if ./test/match_changed_files.sh '^src|tutorials/http/device-dashboard|^tutorials/${{ matrix.example.path }}'; then diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index bad67773..a6422246 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -13,7 +13,7 @@ jobs: revno: ["--mr v3.7-branch", "--mr v4.2.0", "--mr v4.3.0"] # LTS, latest stable name: Zephyr ${{ matrix.revno }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { fetch-depth: 2 } - run: test/setup_ga_docker_filesystem.sh - run: make -C tutorials/zephyr init REPO=zephyrprojectrtos/ci:v0.28.8 REVNO="${{ matrix.revno }}" diff --git a/mongoose.h b/mongoose.h index 65e16b2f..eb33c90f 100644 --- a/mongoose.h +++ b/mongoose.h @@ -20,7 +20,7 @@ #ifndef MONGOOSE_H #define MONGOOSE_H -#define MG_VERSION "7.21" +#define MG_VERSION "7.22" #ifdef __cplusplus extern "C" { @@ -1520,7 +1520,7 @@ size_t mg_queue_printf(struct mg_queue *, const char *fmt, ...); // Built-in %M/%m printer functions. Each reads its argument(s) from ap. size_t mg_print_base64(mg_pfn_t, void *arg, va_list *ap); // expects: const void *buf, size_t len -size_t mg_print_esc(mg_pfn_t, void *arg, va_list *ap); // expects: int quote, const char *str -- use MG_ESC() +size_t mg_print_esc(mg_pfn_t, void *arg, va_list *ap); // expects: int len, const char *str -- use MG_ESC() size_t mg_print_hex(mg_pfn_t, void *arg, va_list *ap); // expects: const void *buf, size_t len size_t mg_print_ip(mg_pfn_t, void *arg, va_list *ap); // expects: const struct mg_addr * size_t mg_print_ip_port(mg_pfn_t, void *arg, va_list *ap); // expects: const struct mg_addr * @@ -5655,41 +5655,6 @@ struct mg_tcpip_driver_tms570_data { -#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC7) && MG_ENABLE_DRIVER_XMC7 - -struct mg_tcpip_driver_xmc7_data { - int mdc_cr; // Valid values: -1, 0, 1, 2, 3, 4, 5 - uint8_t phy_addr; -}; - -#ifndef MG_TCPIP_PHY_ADDR -#define MG_TCPIP_PHY_ADDR 0 -#endif - -#ifndef MG_DRIVER_MDC_CR -#define MG_DRIVER_MDC_CR 3 -#endif - -#define MG_TCPIP_DRIVER_INIT(mgr) \ - do { \ - static struct mg_tcpip_driver_xmc7_data driver_data_; \ - static struct mg_tcpip_if mif_; \ - driver_data_.mdc_cr = MG_DRIVER_MDC_CR; \ - driver_data_.phy_addr = MG_TCPIP_PHY_ADDR; \ - mif_.ip = MG_TCPIP_IP; \ - mif_.mask = MG_TCPIP_MASK; \ - mif_.gw = MG_TCPIP_GW; \ - mif_.driver = &mg_tcpip_driver_xmc7; \ - mif_.driver_data = &driver_data_; \ - MG_SET_MAC_ADDRESS(mif_.mac); \ - mg_tcpip_init(mgr, &mif_); \ - MG_INFO(("Driver: xmc7, MAC: %M", mg_print_mac, mif_.mac)); \ - } while (0) - -#endif - - - #if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC) && MG_ENABLE_DRIVER_XMC struct mg_tcpip_driver_xmc_data { @@ -5736,6 +5701,41 @@ struct mg_tcpip_driver_xmc_data { #endif + +#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC7) && MG_ENABLE_DRIVER_XMC7 + +struct mg_tcpip_driver_xmc7_data { + int mdc_cr; // Valid values: -1, 0, 1, 2, 3, 4, 5 + uint8_t phy_addr; +}; + +#ifndef MG_TCPIP_PHY_ADDR +#define MG_TCPIP_PHY_ADDR 0 +#endif + +#ifndef MG_DRIVER_MDC_CR +#define MG_DRIVER_MDC_CR 3 +#endif + +#define MG_TCPIP_DRIVER_INIT(mgr) \ + do { \ + static struct mg_tcpip_driver_xmc7_data driver_data_; \ + static struct mg_tcpip_if mif_; \ + driver_data_.mdc_cr = MG_DRIVER_MDC_CR; \ + driver_data_.phy_addr = MG_TCPIP_PHY_ADDR; \ + mif_.ip = MG_TCPIP_IP; \ + mif_.mask = MG_TCPIP_MASK; \ + mif_.gw = MG_TCPIP_GW; \ + mif_.driver = &mg_tcpip_driver_xmc7; \ + mif_.driver_data = &driver_data_; \ + MG_SET_MAC_ADDRESS(mif_.mac); \ + mg_tcpip_init(mgr, &mif_); \ + MG_INFO(("Driver: xmc7, MAC: %M", mg_print_mac, mif_.mac)); \ + } while (0) + +#endif + + #ifdef __cplusplus } #endif diff --git a/src/version.h b/src/version.h index c760959c..cd4392c3 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define MG_VERSION "7.21" +#define MG_VERSION "7.22"