aboutsummaryrefslogtreecommitdiff
path: root/src/inc/spi/dev/display_dogm.h
blob: d9cf560e422617932344f9001b4f3c49aeea61ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef DISPLAY_DOGM_H
#define DISPLAY_DOGM_H

  #include <avr/io.h>
  #include <util/delay.h>
  #include "../spi.h"

  #define CONTAST              3

  #define CMD_FUNCTION_SET          32 + 16 + 8 + 0 + 1
  #define CMD_POWER_CONTROL    64 +  0 + 16 + 0 + 4 + CONTAST
  #define CMD_FOLLOWER_CONTROL 0x6E

  #define CMD_ENTRY_MODE_SET   4 + 2 + 0
  #define CMD_DISPLAY_HOME     0 + 2 + 0
  #define CMD_DISPLAY_CLEAR    0 + 0 + 1

  #define CMD_CONTRAST_SET     0x7F
  #define CMD_FUNCTION_SET2    0x38
  #define CMD_DISPLAY_ONOFF    0x0C
  #define CMD_DISPLAY_POS      0x80

  //#define display_dogm_enable()  PORTD &= ~(1<<PD7); PORTD |=  (1<<PD6); // <XDCS>
  //#define display_dogm_disable() PORTD |=  (1<<PD7); PORTD &= ~(1<<PD6); // </XDCS>


  void display_dogm_init();
  void display_dogm_putc(char);
  void display_dogm_exec(char);

#endif
..