Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lcd_dogm_hw.h
Go to the documentation of this file.
1 #ifndef LCD_DOGM_HW_H
2 #define LCD_DOGM_HW_H
3 
4 #include <stdbool.h>
5 #include "std.h"
6 #include "mcu_periph/spi.h"
7 #include "led.h"
8 
9 
10 #define LCDDOGM_SS_PORT 0
11 #define LCDDOGM_SS_PIN 20
12 
13 #define LCDDOGM_RS_PORT 0
14 #define LCDDOGM_RS_PIN 16
15 
16 #define LCDDOGM_IO__(port, reg) IO ## port ## reg
17 #define LCDDOGM_IO_(port, reg) LCDDOGM_IO__(port, reg)
18 
19 #define LCDDOGM_SS_IOCLR LCDDOGM_IO_(LCDDOGM_SS_PORT, CLR)
20 #define LCDDOGM_SS_IODIR LCDDOGM_IO_(LCDDOGM_SS_PORT, DIR)
21 #define LCDDOGM_SS_IOSET LCDDOGM_IO_(LCDDOGM_SS_PORT, SET)
22 
23 #define LCDDOGM_RS_IOCLR LCDDOGM_IO_(LCDDOGM_RS_PORT, CLR)
24 #define LCDDOGM_RS_IODIR LCDDOGM_IO_(LCDDOGM_RS_PORT, DIR)
25 #define LCDDOGM_RS_IOSET LCDDOGM_IO_(LCDDOGM_RS_PORT, SET)
26 
27 #define lcddogmSelect() { \
28  SetBit(LCDDOGM_SS_IOCLR, LCDDOGM_SS_PIN); \
29  }
30 
31 #define lcddogmUnselect() { \
32  SetBit(LCDDOGM_SS_IOSET, LCDDOGM_SS_PIN); \
33  }
34 
35 #define lcddogmCmdMode() { \
36  SetBit(LCDDOGM_RS_IOCLR, LCDDOGM_RS_PIN); \
37  }
38 
39 #define lcddogmDataMode() { \
40  SetBit(LCDDOGM_RS_IOSET, LCDDOGM_RS_PIN); \
41  }
42 
43 extern void lcd_spi_tx(uint8_t data);
44 extern void lcd_dogm_init_hw(void);
45 
46 
47 #endif /* LCD_DOGM_HW_H */
48 
void lcd_dogm_init_hw(void)
Definition: lcd_dogm_hw.c:65
Architecture independent SPI (Serial Peripheral Interface) API.
void lcd_spi_tx(uint8_t data)
Definition: lcd_dogm_hw.c:57
unsigned char uint8_t
Definition: types.h:14
arch independent LED (Light Emitting Diodes) API