mirror of
https://github.com/cnlohr/lolra.git
synced 2026-06-17 00:09:31 +00:00
Update to use SPI OLED
This commit is contained in:
+1
-1
Submodule ch32v/ch32v003fun updated: f41db0dc30...31a231ff27
@@ -62,8 +62,13 @@ SOFTWARE.
|
||||
#include <stdio.h>
|
||||
|
||||
#define SH1107_128x128
|
||||
#define SSD1306_REMAP_I2C
|
||||
#include "ssd1306_i2c.h"
|
||||
#define SSD1306_RST_PIN PA3
|
||||
#define SSD1306_CS_PIN PA4
|
||||
#define SSD1306_DC_PIN PA6
|
||||
#define SSD1306_MOSI_PIN PA7
|
||||
#define SSD1306_SCK_PIN PA5
|
||||
#define SSD1306_BAUD_RATE_PRESCALER SPI_BaudRatePrescaler_4
|
||||
#include "ssd1306_spi.h"
|
||||
#include "ssd1306.h"
|
||||
|
||||
#define FIX_FFT_IMPLEMENTATION
|
||||
@@ -442,8 +447,8 @@ int main()
|
||||
SetupADC();
|
||||
|
||||
printf( "Setting up OLED.\n" );
|
||||
ssd1306_i2c_setup();
|
||||
uint8_t ret = ssd1306_i2c_init();
|
||||
//ssd1306_spi_setup();
|
||||
uint8_t ret = ssd1306_spi_init();
|
||||
ssd1306_init();
|
||||
ssd1306_setbuf(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user