diff --git a/libraries/oleddrv/bsp.h b/libraries/oleddrv/bsp.h --- a/libraries/oleddrv/bsp.h +++ b/libraries/oleddrv/bsp.h @@ -42,7 +42,8 @@ D1/Data 3 4 D0/Clk #define SSD_CS_Low() GPIOB->BRR = GPIO_Pin_1 #define SSD_CS_High() GPIOB->ODR |= GPIO_Pin_1 -#define SPI_SendByte(data) SPI1->DR = (data) +// Use stdperiph +#define SPI_SendByte(data) SPI_I2S_SendData(SPI1, data); //SPI1->DR = (data) #define SPI_Wait() while(!(SPI1->SR&SPI_I2S_FLAG_TXE));while(SPI1->SR&SPI_I2S_FLAG_BSY); #define SSD1303_FPS 50