Skip to content

Commit 5ae72ea

Browse files
author
andygock
committed
Allow user defined VOP by symbol declaration
1 parent 5681a6a commit 5ae72ea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

controllers/PCD8544.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,13 @@ void glcd_PCD8544_init(void) {
120120
glcd_command(PCD8544_SET_BIAS | 0x2);
121121

122122
/* Set VOP (affects contrast) */
123-
glcd_command(PCD8544_SET_VOP | 80); /* Experimentally determined, play with this figure until contrast looks nice */
124-
123+
/* Experimentally determined, play with this figure until contrast looks nice */
124+
#if defined(PCD8544_CONTRAST)
125+
glcd_command(PCD8544_SET_VOP | PCD8544_CONTRAST);
126+
#else
127+
glcd_command(PCD8544_SET_VOP | 80);
128+
#endif
129+
125130
/* Back to standard instructions */
126131
glcd_command(PCD8544_FUNCTION_SET);
127132

0 commit comments

Comments
 (0)