cleanups
This commit is contained in:
parent
5c45cbff3f
commit
c6b1141262
29
glcd.h
29
glcd.h
@ -1,20 +1,29 @@
|
|||||||
#ifndef GLCD_H
|
#ifndef GLCD_H
|
||||||
#define GLCD_H
|
#define GLCD_H
|
||||||
|
|
||||||
#include "ch.h"
|
#include <ch.h> // types
|
||||||
#include "hal.h"
|
#include <hal.h>
|
||||||
|
|
||||||
#define SCREEN_WIDTH 320
|
#define SCREEN_WIDTH 320
|
||||||
#define SCREEN_HEIGHT 240
|
#define SCREEN_HEIGHT 240
|
||||||
|
|
||||||
#define Set_CS LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_CS);
|
/* uncomment if no board.h file used
|
||||||
#define Clr_CS LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_CS);
|
#define LCD_DATA_PORT GPIOE
|
||||||
#define Set_RS LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_RS);
|
#define LCD_CMD_PORT GPIOD
|
||||||
#define Clr_RS LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_RS);
|
#define LCD_CS 12
|
||||||
#define Set_WR LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_WR);
|
#define LCD_RS 13
|
||||||
#define Clr_WR LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_WR);
|
#define LCD_WR 14
|
||||||
#define Set_RD LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_RD);
|
#define LCD_RD 15
|
||||||
#define Clr_RD LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_RD);
|
*/
|
||||||
|
|
||||||
|
#define Set_CS LCD_CMD_PORT->ODR |= (1 << LCD_CS);
|
||||||
|
#define Clr_CS LCD_CMD_PORT->ODR &= ~(1 << LCD_CS);
|
||||||
|
#define Set_RS LCD_CMD_PORT->ODR |= (1 << LCD_RS);
|
||||||
|
#define Clr_RS LCD_CMD_PORT->ODR &= ~(1 << LCD_RS);
|
||||||
|
#define Set_WR LCD_CMD_PORT->ODR |= (1 << LCD_WR);
|
||||||
|
#define Clr_WR LCD_CMD_PORT->ODR &= ~(1 << LCD_WR);
|
||||||
|
#define Set_RD LCD_CMD_PORT->ODR |= (1 << LCD_RD);
|
||||||
|
#define Clr_RD LCD_CMD_PORT->ODR &= ~(1 << LCD_RD);
|
||||||
|
|
||||||
/* LCD color */
|
/* LCD color */
|
||||||
#define White 0xFFFF
|
#define White 0xFFFF
|
||||||
|
Loading…
Reference in New Issue
Block a user