Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
779d4a17
Commit
779d4a17
authored
Jun 9, 2018
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Highlight 64128N and common ST7565 difference
Followup to #10920, addressing #10962
parent
b9418439
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp
+9
-9
9 additions, 9 deletions
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp
with
9 additions
and
9 deletions
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp
+
9
−
9
View file @
779d4a17
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
#define ST7565_ON(N) (0xAE | ((N) & 0x1))
#define ST7565_ON(N) (0xAE | ((N) & 0x1))
#define ST7565_OUT_MODE(N) (0xC0 | ((N) & 0x1) << 3)
#define ST7565_OUT_MODE(N) (0xC0 | ((N) & 0x1) << 3)
#define ST7565_POWER_CONTROL(N) (0x28 | (N))
#define ST7565_POWER_CONTROL(N) (0x28 | (N))
#define ST7565_V0_RATIO(N) (0x
2
0 | ((N) & 0x7))
#define ST7565_V0_RATIO(N) (0x
1
0 | ((N) & 0x7))
// Specific to Displaytech 64128N? (ST7565 is 0x20 | N)
#define ST7565_CONTRAST(N) (0x81), (N)
#define ST7565_CONTRAST(N) (0x81), (N)
#define ST7565_COLUMN_ADR(N) (0x10 | (((N) >> 4) & 0xF)), ((N) & 0xF)
#define ST7565_COLUMN_ADR(N) (0x10 | (((N) >> 4) & 0xF)), ((N) & 0xF)
...
@@ -91,14 +91,14 @@ static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = {
...
@@ -91,14 +91,14 @@ static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = {
ST7565_BIAS_MODE
(
0
),
// 0xA2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
ST7565_BIAS_MODE
(
0
),
// 0xA2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
ST7565_ADC_REVERSE
(
0
),
// Normal ADC Select (according to Displaytech 64128N datasheet)
ST7565_ADC_REVERSE
(
0
),
// Normal ADC Select (according to Displaytech 64128N datasheet)
ST7565_OUT_MODE
(
1
),
// common output mode: set scan direction normal operation/SHL Select, 0x
0
C0 --> SHL = 0, normal, 0x
0
C8 --> SHL = 1
ST7565_OUT_MODE
(
1
),
// common output mode: set scan direction normal operation/SHL Select, 0xC0 --> SHL = 0, normal, 0xC8 --> SHL = 1
ST7565_START_LINE
(
0
),
// Display start line for Displaytech 64128N
ST7565_START_LINE
(
0
),
// Display start line for Displaytech 64128N
//0x028 | 0x04,
// power control: turn on voltage converter
ST7565_POWER_CONTROL
(
0x4
),
// power control: turn on voltage converter
//
U8G_ESC_DLY(50), // delay 50 ms
U8G_ESC_DLY
(
50
),
// delay 50 ms
//0x028 | 0x06,
// power control: turn on voltage regulator
ST7565_POWER_CONTROL
(
0x6
),
// power control: turn on voltage regulator
//
U8G_ESC_DLY(50), // delay 50 ms
U8G_ESC_DLY
(
50
),
// delay 50 ms
ST7565_POWER_CONTROL
(
0x7
),
// power control: turn on voltage follower
ST7565_POWER_CONTROL
(
0x7
),
// power control: turn on voltage follower
U8G_ESC_DLY
(
50
),
// delay 50 ms
U8G_ESC_DLY
(
50
),
// delay 50 ms
...
@@ -131,7 +131,7 @@ static const uint8_t u8g_dev_st7565_64128n_HAL_sleep_on[] PROGMEM = {
...
@@ -131,7 +131,7 @@ static const uint8_t u8g_dev_st7565_64128n_HAL_sleep_on[] PROGMEM = {
U8G_ESC_ADR
(
0
),
// instruction mode
U8G_ESC_ADR
(
0
),
// instruction mode
U8G_ESC_CS
(
1
),
// enable chip
U8G_ESC_CS
(
1
),
// enable chip
ST7565_SLEEP_MODE
(),
// static indicator off
ST7565_SLEEP_MODE
(),
// static indicator off
//0x00
0
, // indicator register set (not sure if this is required)
//0x00,
// indicator register set (not sure if this is required)
ST7565_ON
(
0
),
// display off
ST7565_ON
(
0
),
// display off
ST7565_ALL_PIX
(
1
),
// all points on
ST7565_ALL_PIX
(
1
),
// all points on
U8G_ESC_CS
(
0
),
// disable chip, bugfix 12 nov 2014
U8G_ESC_CS
(
0
),
// disable chip, bugfix 12 nov 2014
...
@@ -168,7 +168,7 @@ uint8_t u8g_dev_st7565_64128n_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_t m
...
@@ -168,7 +168,7 @@ uint8_t u8g_dev_st7565_64128n_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_t m
case
U8G_DEV_MSG_CONTRAST
:
case
U8G_DEV_MSG_CONTRAST
:
u8g_SetChipSelect
(
u8g
,
dev
,
1
);
u8g_SetChipSelect
(
u8g
,
dev
,
1
);
u8g_SetAddress
(
u8g
,
dev
,
0
);
/* instruction mode */
u8g_SetAddress
(
u8g
,
dev
,
0
);
/* instruction mode */
u8g_WriteByte
(
u8g
,
dev
,
0x
0
81
);
u8g_WriteByte
(
u8g
,
dev
,
0x81
);
u8g_WriteByte
(
u8g
,
dev
,
(
*
(
uint8_t
*
)
arg
)
>>
2
);
u8g_WriteByte
(
u8g
,
dev
,
(
*
(
uint8_t
*
)
arg
)
>>
2
);
u8g_SetChipSelect
(
u8g
,
dev
,
0
);
u8g_SetChipSelect
(
u8g
,
dev
,
0
);
return
1
;
return
1
;
...
@@ -209,7 +209,7 @@ uint8_t u8g_dev_st7565_64128n_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_
...
@@ -209,7 +209,7 @@ uint8_t u8g_dev_st7565_64128n_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_
case
U8G_DEV_MSG_CONTRAST
:
case
U8G_DEV_MSG_CONTRAST
:
u8g_SetChipSelect
(
u8g
,
dev
,
1
);
u8g_SetChipSelect
(
u8g
,
dev
,
1
);
u8g_SetAddress
(
u8g
,
dev
,
0
);
/* instruction mode */
u8g_SetAddress
(
u8g
,
dev
,
0
);
/* instruction mode */
u8g_WriteByte
(
u8g
,
dev
,
0x
0
81
);
u8g_WriteByte
(
u8g
,
dev
,
0x81
);
u8g_WriteByte
(
u8g
,
dev
,
(
*
(
uint8_t
*
)
arg
)
>>
2
);
u8g_WriteByte
(
u8g
,
dev
,
(
*
(
uint8_t
*
)
arg
)
>>
2
);
u8g_SetChipSelect
(
u8g
,
dev
,
0
);
u8g_SetChipSelect
(
u8g
,
dev
,
0
);
return
1
;
return
1
;
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment