TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle
tm_stm32f4_hd44780.h
1 
30 #ifndef TM_HD44780_H
31 #define TM_HD44780_H 120
32 
113 #include "stm32f4xx.h"
114 #include "stm32f4xx_rcc.h"
115 #include "stm32f4xx_gpio.h"
116 #include "defines.h"
117 #include "tm_stm32f4_delay.h"
118 #include "tm_stm32f4_gpio.h"
119 
126 /* 4 bit mode */
127 /* Control pins, can be overwritten */
128 /* RS - Register select pin */
129 #ifndef HD44780_RS_PIN
130 #define HD44780_RS_PORT GPIOB
131 #define HD44780_RS_PIN GPIO_PIN_2
132 #endif
133 /* E - Enable pin */
134 #ifndef HD44780_E_PIN
135 #define HD44780_E_PORT GPIOB
136 #define HD44780_E_PIN GPIO_PIN_7
137 #endif
138 /* Data pins */
139 /* D4 - Data 4 pin */
140 #ifndef HD44780_D4_PIN
141 #define HD44780_D4_PORT GPIOC
142 #define HD44780_D4_PIN GPIO_PIN_12
143 #endif
144 /* D5 - Data 5 pin */
145 #ifndef HD44780_D5_PIN
146 #define HD44780_D5_PORT GPIOC
147 #define HD44780_D5_PIN GPIO_PIN_13
148 #endif
149 /* D6 - Data 6 pin */
150 #ifndef HD44780_D6_PIN
151 #define HD44780_D6_PORT GPIOB
152 #define HD44780_D6_PIN GPIO_PIN_12
153 #endif
154 /* D7 - Data 7 pin */
155 #ifndef HD44780_D7_PIN
156 #define HD44780_D7_PORT GPIOB
157 #define HD44780_D7_PIN GPIO_PIN_13
158 #endif
159 
176 void TM_HD44780_Init(uint8_t cols, uint8_t rows);
177 
183 void TM_HD44780_DisplayOn(void);
184 
190 void TM_HD44780_DisplayOff(void);
191 
197 void TM_HD44780_Clear(void);
198 
206 void TM_HD44780_Puts(uint8_t x, uint8_t y, char* str);
207 
213 void TM_HD44780_BlinkOn(void);
214 
220 void TM_HD44780_BlinkOff(void);
221 
227 void TM_HD44780_CursorOn(void);
228 
234 void TM_HD44780_CursorOff(void);
235 
241 void TM_HD44780_ScrollLeft(void);
242 
248 void TM_HD44780_ScrollRight(void);
249 
256 void TM_HD44780_CreateChar(uint8_t location, uint8_t* data);
257 
263 void TM_HD44780_PutCustom(uint8_t x, uint8_t y, uint8_t location);
264 
277 #endif
278 
void TM_HD44780_DisplayOn(void)
Turn display on.
void TM_HD44780_Clear(void)
Clears entire LCD.
void TM_HD44780_ScrollRight(void)
Scrolls display to the right.
void TM_HD44780_BlinkOn(void)
Enables cursor blink.
void TM_HD44780_DisplayOff(void)
Turn display off.
void TM_HD44780_Puts(uint8_t x, uint8_t y, char *str)
Puts string on lcd.
void TM_HD44780_ScrollLeft(void)
Scrolls display to the left.
void TM_HD44780_PutCustom(uint8_t x, uint8_t y, uint8_t location)
Puts custom created character on LCD.
void TM_HD44780_CursorOff(void)
Hides cursor.
void TM_HD44780_Init(uint8_t cols, uint8_t rows)
Initializes HD44780 LCD.
void TM_HD44780_CursorOn(void)
Shows cursor.
void TM_HD44780_CreateChar(uint8_t location, uint8_t *data)
Creates custom character.
void TM_HD44780_BlinkOff(void)
Disables cursor blink.