SSD1351 library for the STM32F401RE. Uses BurstSPI and a couple of tweaks to improve throughput.
Library for the SSD1351 128 x 128 OLED display, specifically for the STM32F401RE Nucleo/STMstation development boards.
See API documentation for more details and code.
Diff: SSD1351.h
- Revision:
- 3:7dd40c4c2ef3
- Parent:
- 2:fb159c293541
--- a/SSD1351.h Mon Jul 03 08:05:00 2017 +0000 +++ b/SSD1351.h Mon Jul 03 08:24:52 2017 +0000 @@ -4,39 +4,6 @@ #include "mbed.h" #include "BurstSPI.h" -/** SSD1351 Library for STM32F401RE Nucleo or STMstation P.1 development boards - may work with - * other targets, but not tested yet. - * - * Standard mbed SPI library is VERY slow, limiting frame rate. Using EricWieser's BurstSPI (which - * fixes compilation errors on the STM32F4XX improves throughput significantly. - * - * Tested on SSD1351 P/N UG-2828GDEDF11. May work with other SSD1351 panels but this is untested. - * - * Example: - * @code - * - * #include "mbed.h" - * #include "SSD1351.h" - * - * uint8_t buffer[128*128*2]; - * - * SSD1351 oled; - * //SSD1351 oled(PA_7,PA_5,PA_6,PC_5,PA_4); - * - * - * int main(){ - * oled.enableWrite(); - * oled.setBuf(buffer); - * oled.fillBuf(0x0000); - * oled.printText("Hello World!",0,0,0x07E0,1) - * oled.writeBuf(); - * } - * - * @endcode - */ - - - //Pinouts for OLED SPI interface #define OLED_MOSI PA_7 #define OLED_SCLK PA_5 @@ -77,6 +44,36 @@ #define SSD1351_CMD_STOPSCROLL 0x9E #define SSD1351_CMD_STARTSCROLL 0x9F +/** SSD1351 Library for STM32F401RE Nucleo or STMstation P.1 development boards - may work with + * other targets, but not tested yet. + * + * Standard mbed SPI library is VERY slow, limiting frame rate. Using EricWieser's BurstSPI (which + * fixes compilation errors on the STM32F4XX improves throughput significantly. + * + * Tested on SSD1351 P/N UG-2828GDEDF11. May work with other SSD1351 panels but this is untested. + * + * Example: + * @code + * + * #include "mbed.h" + * #include "SSD1351.h" + * + * uint8_t buffer[128*128*2]; + * + * SSD1351 oled; + * //SSD1351 oled(PA_7,PA_5,PA_6,PC_5,PA_4); + * + * + * int main(){ + * oled.enableWrite(); + * oled.setBuf(buffer); + * oled.fillBuf(0x0000); + * oled.printText("Hello World!",0,0,0x07E0,1) + * oled.writeBuf(); + * } + * + * @endcode + */ class SSD1351{ public: /** Connect to an SSD1351 on specified pins