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
|
Display width in pixels
|
||||||
@param h
|
@param h
|
||||||
Display height in pixels
|
Display height in pixels
|
||||||
@param spi
|
@param spi_ptr
|
||||||
Pointer to an existing SPIClass instance (e.g. &SPI, the
|
Pointer to an existing SPIClass instance (e.g. &SPI, the
|
||||||
microcontroller's primary SPI bus).
|
microcontroller's primary SPI bus).
|
||||||
@param dc_pin
|
@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
|
@note Call the object's begin() function before use -- buffer
|
||||||
allocation is performed there!
|
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,
|
int8_t dc_pin, int8_t rst_pin, int8_t cs_pin,
|
||||||
uint32_t bitrate)
|
uint32_t bitrate)
|
||||||
: Adafruit_GFX(w, h), spi(spi ? spi : &SPI), wire(NULL), buffer(NULL),
|
: Adafruit_GFX(w, h), spi(spi_ptr ? spi_ptr : &SPI), wire(NULL),
|
||||||
mosiPin(-1), clkPin(-1), dcPin(dc_pin), csPin(cs_pin), rstPin(rst_pin) {
|
buffer(NULL), mosiPin(-1), clkPin(-1), dcPin(dc_pin), csPin(cs_pin),
|
||||||
|
rstPin(rst_pin) {
|
||||||
#ifdef SPI_HAS_TRANSACTION
|
#ifdef SPI_HAS_TRANSACTION
|
||||||
spiSettings = SPISettings(bitrate, MSBFIRST, SPI_MODE0);
|
spiSettings = SPISettings(bitrate, MSBFIRST, SPI_MODE0);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue