Shuffling headers again

This commit is contained in:
Imbus 2025-02-05 14:31:05 +01:00
parent 8f47841b72
commit aaa9ed0770
3 changed files with 17 additions and 19 deletions

View file

@ -1,23 +1,8 @@
#include "config.h" #include "GDM1602K.h"
#include <avr/io.h> #include <avr/io.h>
#include <stdbool.h> #include <stdbool.h>
#include <util/delay.h> #include <util/delay.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_4bit_init() { void lcd_4bit_init() {
LCD_DATA_DDR = 0xFF; LCD_DATA_DDR = 0xFF;
LCD_DATA_PORT = (1 << LCD_DB5); LCD_DATA_PORT = (1 << LCD_DB5);

View file

@ -1,9 +1,23 @@
#ifndef GDM1602K_H_ #ifndef GDM1602K_H_
#define 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_strings(const char *top, const char *bottom);
void lcd_write_string(const char *string); void lcd_write_string(const char *string);
void lcd_init(); void lcd_init();
void lcd_clear(); void lcd_clear();
#endif /* GDM1602K_H_ */ #endif /* GDM1602K_H_ */

View file

@ -1,5 +1,4 @@
#include "LM335.h" #include "LM335.h"
#include "config.h"
#include <avr/io.h> #include <avr/io.h>
#include <util/delay.h> #include <util/delay.h>
@ -40,4 +39,4 @@ float LM335_ReadTemperature() {
float temperature = (voltage - 2.92) * vfactor; float temperature = (voltage - 2.92) * vfactor;
return temperature; return temperature;
} }