#include "fw_hal.h"
#include "st7567.h"
Go to the source code of this file.
◆ GPIO_Init()
Definition at line 53 of file st7567_stc8h3k.c.
54{
55
56
58
61}
#define GPIO_P3_SetMode(__PINS__, __MODE__)
#define GPIO_P1_SetMode(__PINS__, __MODE__)
◆ main()
Definition at line 63 of file st7567_stc8h3k.c.
64{
65 int y1, y2;
67
72
73 while(1)
74 {
79
92
93 y1 = 10;
94 while (y1 <= 0x30)
95 {
98 }
99 while (y1 >= 10)
100 {
103 }
104 while (y1 <= 0x20)
105 {
108 }
110
114
118
120 y1 = 64, y2 = 0;
121 while (y1 > 0)
122 {
125 y1 -= 2;
126 y2 += 2;
128 }
130
132 y1 = 127, y2 = 0;
133 while (y1 > 0)
134 {
137 y1 -= 2;
138 y2 += 2;
140 }
142
146 }
147}
void SYS_Delay(uint16_t t)
__CODE FontDef_t Font_5x7
__CODE FontDef_t Font_3x5
void ST7567_SetContrast(uint8_t val)
Turn ST7567 LCD backlight off.
void ST7567_GotoXY(uint16_t x, uint16_t y)
Sets cursor pointer to desired location for strings.
void ST7567_Fill(uint8_t color)
Fills entire LCD with specified color.
void ST7567_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t c)
Draws line on LCD.
void ST7567_ToggleInvert(void)
Toggles pixels invertion inside internal RAM.
char ST7567_Puts(char *str, FontDef_t *Font, uint8_t color)
Puts string to internal RAM.
void ST7567_Init(void)
Initializes ST7567 LCD.
void ST7567_UpdateScreen(void)
Update LCD display with buffer changes.
◆ SPI_Init()
Definition at line 33 of file st7567_stc8h3k.c.
34{
35
37
39
41
43
45
47
49
51}
#define SPI_SetClockPrescaler(__PRE_SCALER__)
#define SPI_SetPort(__ALTER_PORT__)
#define SPI_SetDataOrder(__ORDER__)
#define SPI_SetEnabled(__STATE__)
#define SPI_SetClockPolarity(__STATE__)
#define SPI_SetClockPhase(__PHASE__)
@ SPI_ClockPhase_LeadingEdge
#define SPI_IgnoreSlaveSelect(__STATE__)
#define SPI_SetMasterMode(__STATE__)
@ SPI_AlterPort_P35_P34_P33_P32