#include < stdint.h >
#include "STM32F4xx.h"
#include "delay.h"

#define LCD_DATA_PORT      GPIOC
#define LCD_DATA_PORT_CLK  RCC_AHB1Periph_GPIOC
#define LCD_D4_PIN         GPIO_Pin_6
#define LCD_D5_PIN         GPIO_Pin_7
#define LCD_D6_PIN         GPIO_Pin_8
#define LCD_D7_PIN         GPIO_Pin_9

#define LCD_CMD_PORT       GPIOA
#define LCD_CMD_PORT_CLK   RCC_AHB1Periph_GPIOA
#define LCD_RS_PIN         GPIO_Pin_9
#define LCD_E_PIN          GPIO_Pin_8

#define DATA               6
#define DATA_CLR           0xFFFFFC3F
#define LINE1 0x80         // Start address of first line
#define LINE2 0xC0         // Start address of second line

//void SysTick_Handler(void);
void LCD_Init (void);
void LCD_DATA (unsigned char data,unsigned char type);
void LCD_NIBBLE (unsigned char nibble,unsigned char type);
void LCD_STR (const char *text);
void LCD_MOVE_LINE (char line);