Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Prudek
apo-seminary
Commits
94336bae
Commit
94336bae
authored
Jun 12, 2020
by
Pavel Pisa
Browse files
Parallel LCD: add control register (CR) register definition and write function.
Signed-off-by:
Pavel Pisa
<
pisa@cmp.felk.cvut.cz
>
parent
623cb60e
Changes
3
Hide whitespace changes
Inline
Side-by-side
mzapo_parlcd.c
View file @
94336bae
...
...
@@ -23,6 +23,11 @@
#include "mzapo_parlcd.h"
#include "mzapo_regs.h"
void
parlcd_write_cr
(
unsigned
char
*
parlcd_mem_base
,
uint16_t
data
)
{
*
(
volatile
uint16_t
*
)(
parlcd_mem_base
+
PARLCD_REG_CR_o
)
=
data
;
}
void
parlcd_write_cmd
(
unsigned
char
*
parlcd_mem_base
,
uint16_t
cmd
)
{
*
(
volatile
uint16_t
*
)(
parlcd_mem_base
+
PARLCD_REG_CMD_o
)
=
cmd
;
...
...
mzapo_parlcd.h
View file @
94336bae
...
...
@@ -21,6 +21,8 @@
extern
"C"
{
#endif
void
parlcd_write_cr
(
unsigned
char
*
parlcd_mem_base
,
uint16_t
data
);
void
parlcd_write_cmd
(
unsigned
char
*
parlcd_mem_base
,
uint16_t
cmd
);
void
parlcd_write_data
(
unsigned
char
*
parlcd_mem_base
,
uint16_t
data
);
...
...
mzapo_regs.h
View file @
94336bae
...
...
@@ -45,6 +45,8 @@
#define PARLCD_REG_BASE_PHYS 0x43c00000
#define PARLCD_REG_SIZE 0x00004000
#define PARLCD_REG_CR_o 0x0000
#define PARLCD_REG_CR_RESET_m 0x00000010
#define PARLCD_REG_CMD_o 0x0008
#define PARLCD_REG_DATA_o 0x000C
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment