-
Notifications
You must be signed in to change notification settings - Fork 24
Default SPI Interface
Tara K edited this page Apr 9, 2018
·
1 revision
- Depends on CONFIG_SSD1306_ENABLE_DEFAULT_SPI_INTERFACE
- Default host is HSPI
- Default frequency is 1MHz
- Default MOSI pin is 13
- Default SCLK pin is 14
- Default DC pin is 33
This provides a quick and easy way to get an SPI attached display up and running.
Default SPI options are configured in the tarablesssd1306 component config menu.
bool SSD1306_SPIMasterInitDefault( void )
Initializes the SPI host as configured in the component config menu.
- True: Successfully initialized SPI host
bool SSD1306_SPIMasterAttachDisplayDefault( struct SSD1306_Device* DeviceHandle, int Width, int Height, int CSForThisDisplay, int RSTForThisDisplay )
Initializes the display and attaches it to the SPI bus.
- Pointer to an object to use as a display handle
- Width of the display
- Height of the display
- GPIO Pin number of the chip select pin
- GPIO Pin number for the reset pin (Optional: If you're not using the reset pin, pass -1)
- True if the display was attached properly
NOTE: Since this display can be used write only, we can only assume it's properly connected
thus this will still return true even if there is a problem communicating with the device.