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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
23bb40d0
Commit
23bb40d0
authored
5 years ago
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Fix MKS_MINI_12864 init
See #13550 Co-Authored-By:
DrDitto
<
drditto@users.noreply.github.com
>
parent
9958f5e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
+50
-35
50 additions, 35 deletions
Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
with
50 additions
and
35 deletions
Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
+
50
−
35
View file @
23bb40d0
...
...
@@ -74,7 +74,8 @@
#define UC1701_V5_RATIO(N) (0x20 | ((N) & 0x7))
#define UC1701_CONTRAST(N) (0x81), (N)
#define UC1701_COLUMN_ADR(N) (0x10 | (((N) >> 4) & 0xF)), ((N) & 0xF)
#define UC1701_COLUMN_HI(N) (0x10 | (((N) >> 4) & 0xF))
#define UC1701_COLUMN_ADR(N) UC1701_COLUMN_HI(N), ((N) & 0xF)
#define UC1701_PAGE_ADR(N) (0xB0 | (N))
#define UC1701_START_LINE(N) (0x40 | (N))
#define UC1701_INDICATOR(N) (0xAC), (N)
...
...
@@ -83,43 +84,57 @@
#define UC1701_BOOST_RATIO(N) (0xF8), (N)
static
const
uint8_t
u8g_dev_uc1701_mini12864_HAL_init_seq
[]
PROGMEM
=
{
U8G_ESC_CS
(
0
),
/
*
disable chip
*/
U8G_ESC_ADR
(
0
),
/
*
instruction mode
*/
U8G_ESC_RST
(
1
),
/
*
do reset low pulse with (1*16)+2 milliseconds
*/
U8G_ESC_CS
(
1
),
/
*
enable chip
*/
UC1701_RESET
(),
/
*
soft reset
*/
UC1701_START_LINE
(
0
),
/
*
set display start line to 0
*/
UC1701_ADC_REVERSE
(
0
),
/
*
ADC set to reverse
*/
UC1701_OUT_MODE
(
1
),
/
*
common output mode
*/
UC1701_INVERTED
(
0
),
/
*
display normal, bit val 0: LCD pixel off
. */
UC1701_BIAS_MODE
(
0
),
/
*
LCD bias 1/9
*/
UC1701_POWER_CONTROL
(
0x7
),
/
*
all power control circuits on
*/
UC1701_BOOST_RATIO
(
0x0
),
/
*
set booster ratio to 4x
*/
UC1701_V5_RATIO
(
3
),
/
*
set V0 voltage resistor ratio to large
*/
UC1701_CONTRAST
(
0x27
),
/
*
set contrast
*/
UC1701_INDICATOR
(
0
),
/
*
indicator
*/
UC1701_ON
(
1
),
/
*
display on
*/
U8G_ESC_CS
(
0
),
/
*
disable chip
*/
U8G_ESC_DLY
(
100
),
/
*
delay 100 ms
*/
U8G_ESC_CS
(
1
),
/
*
enable chip
*/
UC1701_ALL_PIX
(
1
),
/
*
display all points, ST7565
*/
U8G_ESC_CS
(
0
),
/
*
disable chip
*/
U8G_ESC_DLY
(
100
),
/
*
delay 100 ms
*/
U8G_ESC_DLY
(
100
),
/
*
delay 100 ms
*/
U8G_ESC_CS
(
1
),
/
*
enable chip
*/
UC1701_ALL_PIX
(
0
),
/
*
normal display
*/
U8G_ESC_CS
(
0
),
/
*
disable chip
*/
U8G_ESC_END
/
*
end of sequence
*/
U8G_ESC_CS
(
0
),
/
/
disable chip
U8G_ESC_ADR
(
0
),
/
/
instruction mode
U8G_ESC_RST
(
1
),
/
/
do reset low pulse with (1*16)+2 milliseconds
U8G_ESC_CS
(
1
),
/
/
enable chip
UC1701_RESET
(),
/
/
soft reset
UC1701_START_LINE
(
0
),
/
/
set display start line to 0
UC1701_ADC_REVERSE
(
0
),
/
/
ADC set to reverse
UC1701_OUT_MODE
(
1
),
/
/
common output mode
UC1701_INVERTED
(
0
),
/
/
display normal, bit val 0: LCD pixel off
UC1701_BIAS_MODE
(
0
),
/
/
LCD bias 1/9
UC1701_POWER_CONTROL
(
0x7
),
/
/
all power control circuits on
UC1701_BOOST_RATIO
(
0x0
),
/
/
set booster ratio to 4x
UC1701_V5_RATIO
(
3
),
/
/
set V0 voltage resistor ratio to large
UC1701_CONTRAST
(
0x27
),
/
/
set contrast
UC1701_INDICATOR
(
0
),
/
/
indicator
disable
UC1701_ON
(
1
),
/
/
display on
U8G_ESC_CS
(
0
),
/
/
disable chip
U8G_ESC_DLY
(
100
),
/
/
delay 100 ms
U8G_ESC_CS
(
1
),
/
/
enable chip
UC1701_ALL_PIX
(
1
),
/
/
display all points, ST7565
U8G_ESC_CS
(
0
),
/
/
disable chip
U8G_ESC_DLY
(
100
),
/
/
delay 100 ms
U8G_ESC_DLY
(
100
),
/
/
delay 100 ms
U8G_ESC_CS
(
1
),
/
/
enable chip
UC1701_ALL_PIX
(
0
),
/
/
normal display
U8G_ESC_CS
(
0
),
/
/
disable chip
U8G_ESC_END
/
/
end of sequence
};
static
const
uint8_t
u8g_dev_uc1701_mini12864_HAL_data_start
[]
PROGMEM
=
{
U8G_ESC_ADR
(
0
),
/* instruction mode */
U8G_ESC_CS
(
1
),
/* enable chip */
UC1701_COLUMN_ADR
(
0
),
/* address 0 */
U8G_ESC_END
/* end of sequence */
U8G_ESC_ADR
(
0
),
// instruction mode
U8G_ESC_CS
(
1
),
// enable chip
#if ENABLED(MKS_MINI_12864)
UC1701_START_LINE
(
0
),
// set display start line to 0
UC1701_ADC_REVERSE
(
0
),
// ADC set to reverse
UC1701_OUT_MODE
(
1
),
// common output mode
UC1701_INVERTED
(
0
),
// display normal, bit val 0: LCD pixel off
UC1701_BIAS_MODE
(
0
),
// LCD bias 1/9
UC1701_POWER_CONTROL
(
0x7
),
// all power control circuits on
UC1701_BOOST_RATIO
(
0x0
),
// set booster ratio to 4x
UC1701_V5_RATIO
(
3
),
// set V0 voltage resistor ratio to large
UC1701_INDICATOR
(
0
),
// indicator disable
UC1701_ON
(
1
),
// display on
UC1701_COLUMN_HI
(
0
),
// set upper 4 bit of the col adr to 0
#else
UC1701_COLUMN_ADR
(
0
),
// address 0
#endif
U8G_ESC_END
// end of sequence
};
uint8_t
u8g_dev_uc1701_mini12864_HAL_fn
(
u8g_t
*
u8g
,
u8g_dev_t
*
dev
,
uint8_t
msg
,
void
*
arg
)
{
...
...
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