Skip to content

Commit

Permalink
This release contains major changes related to better compatibility w…
Browse files Browse the repository at this point in the history
…ith Arduino.

- Arduino compatibility improvements (#1213).
- Library code for some Arduino libraries comes directly from their source repositories (Adafruit_ST7735, Adafruit_SSD1306).
- Added dynamic recalculation of image offsets to prevent rom overlapping (#1208).
- Added Wi-Fi Protected Setup (WPS) support (#1199).
- Ram savings in axTLS (#1255).
- Simplified and improved Http Client and Http Server stream handling (#1247).
- Fixed Memory Leak in Mqtt (#1273).
- Updated Spiffs code to version 0.3.7 + fixes (##1246).

And much more. All merged PRs in this release can be seen from [here](https://github.com/SmingHub/Sming/milestone/12?closed=1)

- Changed the order of Wire.begin and Wire.pins parameters to match the Arduino order (#1193).

For a complete list of changes run the following command:

```
git log 3.3.0..3.4.0
```

Thanks to everyone who helped us make this release happen.
  • Loading branch information
Slavey Karadzhov committed Nov 6, 2017
2 parents 93340e1 + f09b9e7 commit 28b05f1
Show file tree
Hide file tree
Showing 120 changed files with 3,459 additions and 5,437 deletions.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@
path = Sming/third-party/ws_parser
url = https://github.com/charliesome/ws_parser.git
ignore = dirty
[submodule "Sming/Libraries/Adafruit_ST7735"]
path = Sming/Libraries/Adafruit_ST7735
url = https://github.com/adafruit/Adafruit-ST7735-Library.git
ignore = dirty
[submodule "Sming/Libraries/Adafruit_SSD1306"]
path = Sming/Libraries/Adafruit_SSD1306
url = https://github.com/adafruit/Adafruit_SSD1306.git
ignore = dirty
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ deploy:
on:
tags: true
condition: $DEPLOY == true

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/c1a5e8bc97d3794a0417
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
3 changes: 2 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SDK = Software Development Kit
n/a = The selected SDK is not available on that OS

## Latest Stable Release
- [Sming V3.3.0](https://github.com/SmingHub/Sming/releases/tag/3.3.0)
- [Sming V3.4.0](https://github.com/SmingHub/Sming/releases/tag/3.4.0)

## Getting started
- [Windows](https://github.com/SmingHub/Sming/wiki/Windows-Quickstart)
Expand All @@ -62,6 +62,7 @@ n/a = The selected SDK is not available on that OS
- Custom LWIP: (default: ON) By default we are using custom compiled LWIP stack instead of the binary one provided from Espressif. This is increasing the free memory and decreasing the space on the flash. All espconn_* functions are turned off by default. If your application requires the use of some of the espconn_* functions then add the ENABLE_ESPCONN=1 directive. See `Makefile-user.mk` from the [Basic_SmartConfig](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_SmartConfig/Makefile-user.mk#L41) application for examples. If you would like to use the binary LWIP then you should turn off the custom LWIP compilation by providing `ENABLE_CUSTOM_LWIP=0`.
- SSL: (default: OFF) The SSL support is not built-in by default to conserve resources. If you want to enable it then take a look at the [Readme](https://github.com/SmingHub/Sming/blob/develop/samples/Basic_Ssl/README.md) in the Basic_Ssl samples.
- Custom PWM: (default: ON) If you don't want to use the [open PWM implementation](https://github.com/StefanBruens/ESP8266_new_pwm) then compile your application with `ENABLE_CUSTOM_PWM=0`. There is no need to recompile the Sming library.
- WPS: (default: OFF) The WPS support (Wi-Fi Protected Setup) is not activated by default to preserve resources. To enable WPS, use the switch ENABLE_WPS=1 for compiling Sming.
- Custom serial baud rate: (default: OFF) The default serial baud rate is 115200. If you want to change it to a higher baud rate you can recompile Sming and your application changing the `COM_SPEED_SERIAL` directive. For example `COM_SPEED_SERIAL=921600`.
- Custom heap allocation: (default: OFF) If your application is experiencing heap fragmentation then you can try the [umm_malloc](https://github.com/rhempel/umm_malloc) heap allocation. To enable it compile Sming with `ENABLE_CUSTOM_HEAP=1`. In order to use it in your sample/application make sure to compile the sample with `ENABLE_CUSTOM_HEAP=1`. **Do not enable custom heap allocation and -mforce-l32 compiler flag together**.
- Debug information log level and format: There are four debug levels: debug=3, info=2, warn=1, error=0. Using `DEBUG_VERBOSE_LEVEL` you can set the desired level (0-3). For example `DEBUG_VERBOSE_LEVEL=2` will show only info messages and above. Another make directive is `DEBUG_PRINT_FILENAME_AND_LINE=1` which enables printing the filename and line number of every debug line. This will require extra space on flash. Note: you can compile the Sming library with a set of debug directives and your project with another settings, this way you can control debugging separately for Sming and your application code.
Expand Down
96 changes: 96 additions & 0 deletions Sming/Libraries/.patches/Adafruit_SSD1306.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
diff --git a/Adafruit_SSD1306.cpp b/Adafruit_SSD1306.cpp
index 570a335..40f4784 100644
--- a/Adafruit_SSD1306.cpp
+++ b/Adafruit_SSD1306.cpp
@@ -252,7 +252,7 @@ void Adafruit_SSD1306::begin(uint8_t vccstate, uint8_t i2caddr, bool reset) {
ssd1306_command(SSD1306_SETCONTRAST); // 0x81
ssd1306_command(0x8F);

-#elif defined SSD1306_128_64
+#elif defined SSD1306_128_64 || defined SH1106_128_64
ssd1306_command(SSD1306_SETCOMPINS); // 0xDA
ssd1306_command(0x12);
ssd1306_command(SSD1306_SETCONTRAST); // 0x81
@@ -417,6 +417,28 @@ void Adafruit_SSD1306::dim(boolean dim) {
}

void Adafruit_SSD1306::display(void) {
+#if defined SH1106_128_64
+ for (int index = 0; index < 8; index++) {
+ ssd1306_command(SH1106_SETSTARTPAGE + index);
+ /* for some reason display is shifted by 2 columns
+ * on 1.3" displays from ebay
+ */
+ ssd1306_command(SSD1306_SETLOWCOLUMN + 2); // low column start address
+ ssd1306_command(SSD1306_SETHIGHCOLUMN); // high column start address
+
+ for (int pixel = 0; pixel < SSD1306_LCDWIDTH; pixel++) {
+ Wire.beginTransmission(_i2caddr);
+ WIRE_WRITE(0x40);
+ // input buffer doesn't accept all bytes at once
+ for (uint8_t x=0; x<16; x++) {
+ WIRE_WRITE(buffer[index * SSD1306_LCDWIDTH + pixel]);
+ ++pixel;
+ }
+ --pixel;
+ Wire.endTransmission();
+ }
+ }
+#else
ssd1306_command(SSD1306_COLUMNADDR);
ssd1306_command(0); // Column start address (0 = reset)
ssd1306_command(SSD1306_LCDWIDTH-1); // Column end address (127 = reset)
@@ -482,6 +504,7 @@ void Adafruit_SSD1306::display(void) {
TWBR = twbrbackup;
#endif
}
+#endif /* defined SH1106_128_64 */
}

// clear everything
diff --git a/Adafruit_SSD1306.h b/Adafruit_SSD1306.h
index 1162f87..4226f3e 100644
--- a/Adafruit_SSD1306.h
+++ b/Adafruit_SSD1306.h
@@ -69,20 +69,28 @@ All text above, and the splash screen must be included in any redistribution

SSD1306_96_16

+ SH1106_128_64 - 1.3" OLED display version
+
-----------------------------------------------------------------------*/
-// #define SSD1306_128_64
- #define SSD1306_128_32
+// #define SH1106_128_64
+ #define SSD1306_128_64
+// #define SSD1306_128_32
// #define SSD1306_96_16
/*=========================================================================*/

+#if defined SSD1306_128_64 && defined SH1106_128_64
+ #error "Select either SH1106 or SSD1306 display type in SSD1306.h"
+#endif
+
+
#if defined SSD1306_128_64 && defined SSD1306_128_32
#error "Only one SSD1306 display can be specified at once in SSD1306.h"
#endif
-#if !defined SSD1306_128_64 && !defined SSD1306_128_32 && !defined SSD1306_96_16
+#if !defined SSD1306_128_64 && !defined SSD1306_128_32 && !defined SSD1306_96_16 && !defined SH1106_128_64
#error "At least one SSD1306 display must be specified in SSD1306.h"
#endif

-#if defined SSD1306_128_64
+#if defined SSD1306_128_64 || defined SH1106_128_64
#define SSD1306_LCDWIDTH 128
#define SSD1306_LCDHEIGHT 64
#endif
@@ -132,6 +140,8 @@ All text above, and the splash screen must be included in any redistribution
#define SSD1306_EXTERNALVCC 0x1
#define SSD1306_SWITCHCAPVCC 0x2

+#define SH1106_SETSTARTPAGE 0xB0
+
// Scrolling #defines
#define SSD1306_ACTIVATE_SCROLL 0x2F
#define SSD1306_DEACTIVATE_SCROLL 0x2E
1 change: 1 addition & 0 deletions Sming/Libraries/.patches/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This directory contains patches to upstream Arudino libraries.
4 changes: 2 additions & 2 deletions Sming/Libraries/Adafruit_PCD8544/Adafruit_PCD8544.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ All text above, and the splash screen must be included in any redistribution
typedef volatile RwReg PortReg;
typedef uint32_t PortMask;
#else
typedef volatile uint8_t PortReg;
typedef uint8_t PortMask;
typedef volatile GPIO_REG_TYPE PortReg;
typedef GPIO_REG_TYPE PortMask;
#endif

#define BLACK 1
Expand Down
1 change: 1 addition & 0 deletions Sming/Libraries/Adafruit_SSD1306
Submodule Adafruit_SSD1306 added at ddfec7
Loading

0 comments on commit 28b05f1

Please sign in to comment.