68 Commits
Author SHA1 Message Date
NickIOT72 7a21306b53 verified clang format on header file 2025-05-02 19:08:05 -04:00
Meco Man 95fef51c89 add ARDUINO_ARCH_RTTHREAD to support RT-Thread 2024-10-06 12:06:40 -04:00
caternuson 4759c41758 add no splash def 2022-01-11 09:40:49 -08:00
b.moniey b4bb6bc12f ran clang from a raspbery pi in linux with the recommended clang-format-5.0 2021-10-09 21:33:24 -07:00
b.moniey 7ad28969aa got rid of the starred comments according to adafruite settings 2021-10-09 18:33:50 -07:00
b.moniey b0367b3ab5 clanged it 2021-10-09 10:59:09 -07:00
b.moniey 567b6bf4b5 twi and spi comments 2021-10-08 21:49:58 -07:00
b.moniey 93159a5e5f more cleaning 2021-10-08 21:45:29 -07:00
b.moniey fe6ee1711b cleaned up a few more doxygen complaints 2021-10-08 21:41:53 -07:00
b.moniey a19501eafe typo in comment 2021-10-08 21:35:11 -07:00
b.moniey 8fbbdc9ab3 -adding documentation for protected members 2021-10-08 21:29:27 -07:00
b.moniey ae96f6ee42 private data to protected 2021-10-03 13:38:18 -07:00
b.moniey 0de2f56f0a -Added typedef dfunc_t for user display function
-Added void display_d(dfunc_t dfunc) which is a variant of the display() that calls a user function after each row
-changed private data to protected to more easily derive and modify.
2021-10-01 21:54:11 -07:00
lady ada 8191e2d028 tested with RP2040 2021-03-27 17:23:49 -04:00
wecassidy ad9c3cd7c8 Replace boolean with standard bool 2020-06-30 20:06:46 -07:00
dherrada 1aff4c911b Moved repository to github actions 2020-06-08 09:55:11 -04:00
Kurt Eckhardt d1bcc4ff9b Allow a sketch to sub-class the SSD1306 object and change SPI settings
At least some of the SSD1309 displays can work with this library if SPI_MODE0 is changed to SPI_MODE3.

Instead of allowing the main constructor to do this, we pulled the spiSettings member out to be protected instead of private.  This allows us to create a smple subclass of this code base to run on these displays.  With this I have a version of the ssd1306_128x64_spi sketch that has the subclass code:
```
class Adafruit_SSD1309_SPI : public Adafruit_SSD1306 {
 public:
  Adafruit_SSD1309_SPI(uint8_t w, uint8_t h, SPIClass *spi,
    int8_t dc_pin, int8_t rst_pin, int8_t cs_pin, uint32_t bitrate=8000000UL) :
    Adafruit_SSD1306(w, h, spi, dc_pin, rst_pin, cs_pin, bitrate) {
#ifdef SPI_HAS_TRANSACTION
  spiSettings = SPISettings(bitrate, MSBFIRST, SPI_MODE3);
#endif

    }
};
```
and then I used the hardware version of the constructor:
```
#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1309_SPI display(SCREEN_WIDTH, SCREEN_HEIGHT,
  &SPI, OLED_DC, OLED_RESET, OLED_CS);
```
And it now runs on this display
2020-02-16 15:07:32 -08:00
Mark Lentczner 7fdddecaa7 save correct contrast setting for use in dim() function
In begin(), there is code to compute the correct contrast value, based on the configuration of the display.
The same code also computes the comPin setting. This code has been factored so that these two values
are computed, and contrast saved in an instance variable.

Later, in dim(), the saved computed contrast value is used when un-dimming the display.
2019-12-21 23:18:30 -08:00
Martino FacchinandGitHub 78701a4d21 Don't define HAVE_PORTREG for mbed target
Fixes https://github.com/arduino/Arduino/issues/9345
2019-10-23 14:41:38 +02:00
John Plocher 43e2acb650 no more enum, add macros SSD1306_BLACK, _WHITE, _INVERSE 2019-09-06 19:00:38 -07:00
John Plocher 8439f397c4 changed #defines for (BLACK, WHITE, INVERSE) to a class scoped enum 2019-09-05 10:17:39 -07:00
Phillip Burgess 1973f0001f Change Wire clock behavior (400 KHz default, override in constructor) 2018-11-17 10:00:19 -08:00
Phillip Burgess 8504e3fd4b Fixes for WICED Feather hardware SPI 2018-11-16 22:03:37 -08:00
Phillip Burgess 6f84757455 Reorder class members & initializers to avoid -Werror=reorder 2018-11-13 15:53:47 -08:00
Phillip Burgess 7cc57b8db1 Changes for Travis CI, Doxygen, make examples check begin() value 2018-11-13 15:17:37 -08:00
Phillip Burgess a199afa239 Clean up transactions, thanks prenticedavid! 2018-11-12 17:51:04 -08:00
Phillip Burgess 7a77e68e58 WICED Feather support (no HW SPI), revert ssd1306_command() behavior 2018-11-09 15:19:11 -08:00
Phillip Burgess 0a7ef5af16 Sweep of various things. ESP32 I2C clock, add getPixel(), etc. 2018-11-08 21:05:45 -08:00
Phillip Burgess c11bc32b53 Minor fix for old code compatibility 2018-11-08 15:53:27 -08:00
Phillip Burgess f682819634 Dynamic allocation for screen buffer, supports alt Wire & SPI buses, transactions & more 2018-11-08 15:43:43 -08:00
ladyada 2c344af9f6 make default reasonable 2016-12-04 23:13:37 -05:00
ladyada c89c91f544 *sigh* 2016-11-12 01:12:56 -05:00
ladyada 25c28c78f2 Merge branch 'master' of github.com:adafruit/Adafruit_SSD1306
Conflicts:
	Adafruit_SSD1306.cpp
	Adafruit_SSD1306.h
2016-11-11 21:42:24 -05:00
ladyada f988e56d15 https://github.com/adafruit/Adafruit_SSD1306/pull/72 2016-11-11 21:40:43 -05:00
volca 4368658527 Add support for ESP32 2016-10-27 21:38:04 +08:00
Kevin Townsend a267c43d1f Added STM32 Feather check 2016-01-27 08:50:27 +01:00
Max Horn 3a9149da93 Remove ssd1306_data 2016-01-07 10:13:19 +01:00
Max Horn 491fa0d913 Proper fix for ESP8266 2016-01-07 10:13:19 +01:00
Max Horn 6227879fba Fix PortReg handling to actually do something
The code incorrectly used #ifdef to check for a typedef. As a result,
the PortReg code was always disabled.
2016-01-07 10:13:19 +01:00
Max Horn 8c434839fa whitespace: get rid of tabs 2016-01-07 10:13:19 +01:00
Kevin Townsend 49e05436c7 Added header guard to prevent multiple includes 2016-01-07 13:32:53 +09:00
ladyada a69564befe add ability to create object without RST pin (default -1) 2015-10-15 20:54:58 -04:00
ladyada 5674153e88 tested with atsam21d but not working with 32u4? 2015-10-01 18:22:54 -04:00
PaulStoffregen 50f9ee06ec Fix definition of dim() in .h to match code in .cpp file 2015-02-01 07:26:29 -08:00
Tony DiCola 9098ca08dd Add optional reset boolean to begin to control if display is reset (good for sharing multiple displays as described in #5). 2014-06-19 18:02:58 -07:00
Tony DiCola dc405be7bb Merge pull request #15 from marioabajo/master
Added support for 96x16 displays
2014-06-19 17:25:57 -07:00
Lars Norpchen f7b050003c Macro for Wire.write to Wire.send in TWI
Current library does not compile in <1.0 because it references
Wire.write(), which was called Wire.send() in <1.0 -- added a macro to
wrap the change.
2014-03-30 21:47:24 -07:00
Lars Norpchen 8088f6cd32 Added inverse writing mode "color"
Added an inverse "color" (XOR) to draw in reverse color over existing
pixels.
2014-03-30 21:22:40 -07:00
Mario Abajo Duran 81382357dc Added support for 96x16 displays 2014-03-19 22:41:24 +01:00
Phillip Burgess d2c6f2eca6 Arduino Due support courtesy of nmadura
Note: I2C requires using pins 20 & 21 on Due (not SDA1/SCL1)
2014-02-08 22:14:59 -08:00