Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.6.0 to fix memory leak bugs
Browse files Browse the repository at this point in the history
### Release v1.6.0

1. Fix memory leak bugs. Check [memory leak on 'server_version' #17](#17) and [memory leak on MySQL_Connection.MySQL_Packet.buffer #18](#18)
2. Optimize library code by using `reference-passing` instead of `value-passing`
3. Update RP2040 Ethernet-related examples to use SS/CS pin GP17 for ARDUINO_ARCH_MBED similar to arduino-pico core
4. Update `Packages' Patches`
  • Loading branch information
khoih-prog committed Mar 11, 2022
1 parent c8ae41a commit 9190388
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 24 deletions.
4 changes: 2 additions & 2 deletions examples/Ethernet/Basic_Insert/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/Basic_Select/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/Complex_Insert/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
21 changes: 18 additions & 3 deletions examples/Ethernet/Complex_Select/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,22 @@

#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) )

#error Portenta_H7 not supported.
#if defined(BOARD_NAME)
#undef BOARD_NAME
#endif

#if defined(CORE_CM7)
#warning Using Portenta H7 M7 core
#define BOARD_NAME "PORTENTA_H7_M7"
#else
#warning Using Portenta H7 M4 core
#define BOARD_NAME "PORTENTA_H7_M4"
#endif

#define ETHERNET_USE_PORTENTA_H7 true
#define USE_ETHERNET_PORTENTA_H7 true

#define USE_ETHERNET_WRAPPER false

#endif

Expand Down Expand Up @@ -298,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/Connect/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/Connect_By_Hostname/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/Connect_Default_Database/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
21 changes: 18 additions & 3 deletions examples/Ethernet/Connect_Disconnect/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,22 @@

#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) )

#error Portenta_H7 not supported.
#if defined(BOARD_NAME)
#undef BOARD_NAME
#endif

#if defined(CORE_CM7)
#warning Using Portenta H7 M7 core
#define BOARD_NAME "PORTENTA_H7_M7"
#else
#warning Using Portenta H7 M4 core
#define BOARD_NAME "PORTENTA_H7_M4"
#endif

#define ETHERNET_USE_PORTENTA_H7 true
#define USE_ETHERNET_PORTENTA_H7 true

#define USE_ETHERNET_WRAPPER false

#endif

Expand Down Expand Up @@ -298,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
21 changes: 18 additions & 3 deletions examples/Ethernet/Query_Progmem/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,22 @@

#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) )

#error Portenta_H7 not supported.
#if defined(BOARD_NAME)
#undef BOARD_NAME
#endif

#if defined(CORE_CM7)
#warning Using Portenta H7 M7 core
#define BOARD_NAME "PORTENTA_H7_M7"
#else
#warning Using Portenta H7 M4 core
#define BOARD_NAME "PORTENTA_H7_M4"
#endif

#define ETHERNET_USE_PORTENTA_H7 true
#define USE_ETHERNET_PORTENTA_H7 true

#define USE_ETHERNET_WRAPPER false

#endif

Expand Down Expand Up @@ -298,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down
21 changes: 18 additions & 3 deletions examples/Ethernet/Query_Results/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,22 @@

#if ( defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) )

#error Portenta_H7 not supported.
#if defined(BOARD_NAME)
#undef BOARD_NAME
#endif

#if defined(CORE_CM7)
#warning Using Portenta H7 M7 core
#define BOARD_NAME "PORTENTA_H7_M7"
#else
#warning Using Portenta H7 M4 core
#define BOARD_NAME "PORTENTA_H7_M4"
#endif

#define ETHERNET_USE_PORTENTA_H7 true
#define USE_ETHERNET_PORTENTA_H7 true

#define USE_ETHERNET_WRAPPER false

#endif

Expand Down Expand Up @@ -298,9 +313,9 @@
// Default pin 5 (in Mbed) or 17 to SS/CS
#if defined(ARDUINO_ARCH_MBED)
// For RPI Pico using Arduino Mbed RP2040 core
// SCK: GPIO2, MOSI: GPIO3, MISO: GPIO4, SS/CS: GPIO5
// SCK: GP18, MOSI: GP19, MISO: GP16, SS/CS: GP17 or GP05

#define USE_THIS_SS_PIN 5
#define USE_THIS_SS_PIN 17 //5

#if defined(BOARD_NAME)
#undef BOARD_NAME
Expand Down

0 comments on commit 9190388

Please sign in to comment.