Merge pull request #244 from waynepiekarski/master
Fix up error: declaration of 'spi' shadows a member
This commit is contained in:
commit
ca3a261c95
1 changed files with 5 additions and 4 deletions
|
|
@ -220,7 +220,7 @@ Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, int8_t mosi_pin,
|
|||
Display width in pixels
|
||||
@param h
|
||||
Display height in pixels
|
||||
@param spi
|
||||
@param spi_ptr
|
||||
Pointer to an existing SPIClass instance (e.g. &SPI, the
|
||||
microcontroller's primary SPI bus).
|
||||
@param dc_pin
|
||||
|
|
@ -240,11 +240,12 @@ Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, int8_t mosi_pin,
|
|||
@note Call the object's begin() function before use -- buffer
|
||||
allocation is performed there!
|
||||
*/
|
||||
Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, SPIClass *spi,
|
||||
Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, SPIClass *spi_ptr,
|
||||
int8_t dc_pin, int8_t rst_pin, int8_t cs_pin,
|
||||
uint32_t bitrate)
|
||||
: Adafruit_GFX(w, h), spi(spi ? spi : &SPI), wire(NULL), buffer(NULL),
|
||||
mosiPin(-1), clkPin(-1), dcPin(dc_pin), csPin(cs_pin), rstPin(rst_pin) {
|
||||
: Adafruit_GFX(w, h), spi(spi_ptr ? spi_ptr : &SPI), wire(NULL),
|
||||
buffer(NULL), mosiPin(-1), clkPin(-1), dcPin(dc_pin), csPin(cs_pin),
|
||||
rstPin(rst_pin) {
|
||||
#ifdef SPI_HAS_TRANSACTION
|
||||
spiSettings = SPISettings(bitrate, MSBFIRST, SPI_MODE0);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue