diff --git a/GDM1602K.c b/GDM1602K.c index f4c6ae0..b642f70 100644 --- a/GDM1602K.c +++ b/GDM1602K.c @@ -1,23 +1,8 @@ -#include "config.h" - +#include "GDM1602K.h" #include #include #include -#define LCD_DATA_PORT PORTB -#define LCD_DATA_DDR DDRB -#define LCD_RS_PIN PB1 -#define LCD_EN_PIN PB2 -#define LCD_DB4 PB3 -#define LCD_DB5 PB4 -#define LCD_DB6 PB5 -#define LCD_DB7 PB6 - -// Delay constants from the datasheet. These are mostly in nanoseconds -#define LAG 10 -#define TW 300 -#define TSU1 100 - void lcd_4bit_init() { LCD_DATA_DDR = 0xFF; LCD_DATA_PORT = (1 << LCD_DB5); diff --git a/GDM1602K.h b/GDM1602K.h index f2bfc63..da0ce66 100644 --- a/GDM1602K.h +++ b/GDM1602K.h @@ -1,9 +1,23 @@ #ifndef GDM1602K_H_ #define GDM1602K_H_ +#define LCD_DATA_PORT PORTB +#define LCD_DATA_DDR DDRB +#define LCD_RS_PIN PB1 +#define LCD_EN_PIN PB2 +#define LCD_DB4 PB3 +#define LCD_DB5 PB4 +#define LCD_DB6 PB5 +#define LCD_DB7 PB6 + +// Delay constants from the datasheet. These are mostly in nanoseconds +#define LAG 10 +#define TW 300 +#define TSU1 100 + void lcd_write_strings(const char *top, const char *bottom); void lcd_write_string(const char *string); void lcd_init(); void lcd_clear(); -#endif /* GDM1602K_H_ */ \ No newline at end of file +#endif /* GDM1602K_H_ */ diff --git a/LM335.c b/LM335.c index f64797d..4e8a266 100644 --- a/LM335.c +++ b/LM335.c @@ -1,5 +1,4 @@ #include "LM335.h" -#include "config.h" #include #include @@ -40,4 +39,4 @@ float LM335_ReadTemperature() { float temperature = (voltage - 2.92) * vfactor; return temperature; -} \ No newline at end of file +}