|
DIY Logging Volt/Ampmeter
|
#include <stddef.h>#include <_ansi.h>#include "ssd1306_conf.h"#include "stm32f1xx_hal.h"#include "ssd1306_fonts.h"Go to the source code of this file.
Data Structures | |
| struct | SSD1306_t |
| struct | SSD1306_VERTEX |
Macros | |
| #define | SSD1306_SPI_PORT hspi2 |
| #define | SSD1306_CS_Port GPIOB |
| #define | SSD1306_CS_Pin GPIO_PIN_12 |
| #define | SSD1306_DC_Port GPIOB |
| #define | SSD1306_DC_Pin GPIO_PIN_14 |
| #define | SSD1306_Reset_Port GPIOA |
| #define | SSD1306_Reset_Pin GPIO_PIN_8 |
| #define | SSD1306_HEIGHT 64 |
| #define | SSD1306_BUFFER_SIZE SSD1306_WIDTH * SSD1306_HEIGHT / 8 |
Enumerations | |
| enum | SSD1306_COLOR { Black = 0x00, White = 0x01 } |
| enum | SSD1306_Error_t { SSD1306_OK = 0x00, SSD1306_ERR = 0x01 } |
Functions | |
| void | ssd1306_SelectDisplay (uint8_t display) |
| void | ssd1306_Init (void) |
| void | ssd1306_Fill (SSD1306_COLOR color) |
| void | ssd1306_UpdateScreen (void) |
| void | ssd1306_DrawPixel (uint8_t x, uint8_t y, SSD1306_COLOR color) |
| char | ssd1306_WriteChar (char ch, FontDef Font, SSD1306_COLOR color) |
| char | ssd1306_WriteString (char *str, FontDef Font, SSD1306_COLOR color) |
| void | ssd1306_SetCursor (uint8_t x, uint8_t y) |
| void | ssd1306_Line (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, SSD1306_COLOR color) |
| void | ssd1306_DrawArc (uint8_t x, uint8_t y, uint8_t radius, uint16_t start_angle, uint16_t sweep, SSD1306_COLOR color) |
| void | ssd1306_DrawCircle (uint8_t par_x, uint8_t par_y, uint8_t par_r, SSD1306_COLOR color) |
| void | ssd1306_Polyline (const SSD1306_VERTEX *par_vertex, uint16_t par_size, SSD1306_COLOR color) |
| void | ssd1306_DrawRectangle (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, SSD1306_COLOR color) |
| void | ssd1306_SetContrast (const uint8_t value) |
| Sets the contrast of the display. More... | |
| void | ssd1306_SetDisplayOn (const uint8_t on) |
| Set Display ON/OFF. More... | |
| uint8_t | ssd1306_GetDisplayOn () |
| Reads DisplayOn state. More... | |
| void | ssd1306_Reset (void) |
| void | ssd1306_WriteCommand (uint8_t byte) |
| void | ssd1306_WriteData (uint8_t *buffer, size_t buff_size) |
| SSD1306_Error_t | ssd1306_FillBuffer (uint8_t *buf, uint32_t len) |
Variables | |
| I2C_HandleTypeDef | hi2c1 |
| #define SSD1306_BUFFER_SIZE SSD1306_WIDTH * SSD1306_HEIGHT / 8 |
| #define SSD1306_CS_Pin GPIO_PIN_12 |
| #define SSD1306_DC_Pin GPIO_PIN_14 |
| #define SSD1306_Reset_Pin GPIO_PIN_8 |
| #define SSD1306_SPI_PORT hspi2 |
This Library was originally written by Olivier Van den Eede (4ilo) in 2016. Some refactoring was done and SPI support was added by Aleksander Alekseev (afiskon) in 2018.
| enum SSD1306_COLOR |
| enum SSD1306_Error_t |
| void ssd1306_DrawArc | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | radius, | ||
| uint16_t | start_angle, | ||
| uint16_t | sweep, | ||
| SSD1306_COLOR | color | ||
| ) |
| void ssd1306_DrawCircle | ( | uint8_t | par_x, |
| uint8_t | par_y, | ||
| uint8_t | par_r, | ||
| SSD1306_COLOR | color | ||
| ) |
| void ssd1306_DrawPixel | ( | uint8_t | x, |
| uint8_t | y, | ||
| SSD1306_COLOR | color | ||
| ) |
Definition at line 239 of file ssd1306.c.
| void ssd1306_DrawRectangle | ( | uint8_t | x1, |
| uint8_t | y1, | ||
| uint8_t | x2, | ||
| uint8_t | y2, | ||
| SSD1306_COLOR | color | ||
| ) |
| void ssd1306_Fill | ( | SSD1306_COLOR | color | ) |
| SSD1306_Error_t ssd1306_FillBuffer | ( | uint8_t * | buf, |
| uint32_t | len | ||
| ) |
| uint8_t ssd1306_GetDisplayOn | ( | ) |
| void ssd1306_Init | ( | void | ) |
Definition at line 94 of file ssd1306.c.
| void ssd1306_Line | ( | uint8_t | x1, |
| uint8_t | y1, | ||
| uint8_t | x2, | ||
| uint8_t | y2, | ||
| SSD1306_COLOR | color | ||
| ) |
| void ssd1306_Polyline | ( | const SSD1306_VERTEX * | par_vertex, |
| uint16_t | par_size, | ||
| SSD1306_COLOR | color | ||
| ) |
Definition at line 394 of file ssd1306.c.
| void ssd1306_Reset | ( | void | ) |
| void ssd1306_SetContrast | ( | const uint8_t | value | ) |
| void ssd1306_SetDisplayOn | ( | const uint8_t | on | ) |
| void ssd1306_UpdateScreen | ( | void | ) |
Definition at line 220 of file ssd1306.c.
| char ssd1306_WriteChar | ( | char | ch, |
| FontDef | Font, | ||
| SSD1306_COLOR | color | ||
| ) |
Definition at line 274 of file ssd1306.c.
| void ssd1306_WriteData | ( | uint8_t * | buffer, |
| size_t | buff_size | ||
| ) |
| char ssd1306_WriteString | ( | char * | str, |
| FontDef | Font, | ||
| SSD1306_COLOR | color | ||
| ) |
| I2C_HandleTypeDef hi2c1 |