forked from SmingHub/Sming
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '4a0fec18235521e4369d111f111c2624fbd3203b'
* commit '4a0fec18235521e4369d111f111c2624fbd3203b': (50 commits) Added the Arduino Libraries. Added the latest changes to the third-party projects. Preparation for release 3.5.0. (SmingHub#1295) Added Stream::indexOf(char c) that finds a character in a stream (SmingHub#1290) Made spiffs_mount() compatible with rBoot. (SmingHub#1292) Added experimental support for SDK 2.1 (SmingHub#1264) Initial test code for improved sendPing and sendPong. (SmingHub#1270) Added experimental support for LWIP v2 (SmingHub#1289) Fixed ssl memory leaks related to SSL context not being freed (SmingHub#1288) Fixed an error breaking SSL session resumption, Http Connection reuse and Http pipelining. (SmingHub#1287) Added Adafruit_BME280 Library (SmingHub#1286) Allow immediate server deletion if there are no active connections. (SmingHub#1285) Deleting an HttpClient should result in freeing the total memory it uses. Allow shutting down of TcpServers (SmingHub#1284) TcpConnection fixes related to ssl extensions. Styling fixes for HttpClient. fix/MemoryLeak(Heap) during TCP Client connection and delete Reverted: m_printf: stacksize reduced SmingHub#1097. (SmingHub#1279) Preparation for release 3.4.0. (SmingHub#1277) Mqtt memory fix: Fix copy and paste error (SmingHub#1276) Fix Memory Leak in Mqtt (SmingHub#1273) ...
- Loading branch information
Showing
1,390 changed files
with
348,857 additions
and
1,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory contains patches to upstream Arudino libraries. |
46 changes: 46 additions & 0 deletions
46
Sming/Libraries/Adafruit_BME280_Library/.github/ISSUE_TEMPLATE.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Thank you for opening an issue on an Adafruit Arduino library repository. To | ||
improve the speed of resolution please review the following guidelines and | ||
common troubleshooting steps below before creating the issue: | ||
|
||
- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use | ||
the forums at http://forums.adafruit.com to ask questions and troubleshoot why | ||
something isn't working as expected. In many cases the problem is a common issue | ||
that you will more quickly receive help from the forum community. GitHub issues | ||
are meant for known defects in the code. If you don't know if there is a defect | ||
in the code then start with troubleshooting on the forum first. | ||
|
||
- **If following a tutorial or guide be sure you didn't miss a step.** Carefully | ||
check all of the steps and commands to run have been followed. Consult the | ||
forum if you're unsure or have questions about steps in a guide/tutorial. | ||
|
||
- **For Arduino projects check these very common issues to ensure they don't apply**: | ||
|
||
- For uploading sketches or communicating with the board make sure you're using | ||
a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes | ||
very hard to tell the difference between a data and charge cable! Try using the | ||
cable with other devices or swapping to another cable to confirm it is not | ||
the problem. | ||
|
||
- **Be sure you are supplying adequate power to the board.** Check the specs of | ||
your board and plug in an external power supply. In many cases just | ||
plugging a board into your computer is not enough to power it and other | ||
peripherals. | ||
|
||
- **Double check all soldering joints and connections.** Flakey connections | ||
cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints. | ||
|
||
- **Ensure you are using an official Arduino or Adafruit board.** We can't | ||
guarantee a clone board will have the same functionality and work as expected | ||
with this code and don't support them. | ||
|
||
If you're sure this issue is a defect in the code and checked the steps above | ||
please fill in the following fields to provide enough troubleshooting information. | ||
You may delete the guideline and text above to just leave the following details: | ||
|
||
- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE** | ||
|
||
- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO | ||
VERSION HERE** | ||
|
||
- List the steps to reproduce the problem below (if possible attach a sketch or | ||
copy the sketch code in too): **LIST REPRO STEPS BELOW** |
Oops, something went wrong.