Commit 94336bae authored by Pavel Pisa's avatar Pavel Pisa
Browse files

Parallel LCD: add control register (CR) register definition and write function.


Signed-off-by: Pavel Pisa's avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
parent 623cb60e
......@@ -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;
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment