Compare commits
No commits in common. "86973763d692d0fa9de1f0bc25bbb6d12d164e74" and "aaa9ed0770a77125a23c8035665e7e1f52fe9659" have entirely different histories.
86973763d6
...
aaa9ed0770
3 changed files with 5 additions and 11 deletions
1
74C922.h
1
74C922.h
|
@ -1,7 +1,6 @@
|
||||||
#ifndef H74C922_H
|
#ifndef H74C922_H
|
||||||
#define H74C922_H
|
#define H74C922_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
// Pin Definitions
|
// Pin Definitions
|
||||||
#define ENCODER_A_PIN PD6
|
#define ENCODER_A_PIN PD6
|
||||||
|
|
|
@ -58,10 +58,10 @@ void lcd_init() {
|
||||||
lcd_4bit_init();
|
lcd_4bit_init();
|
||||||
|
|
||||||
// lcd_send(1, 0b01111000);
|
// lcd_send(1, 0b01111000);
|
||||||
lcd_send(0, 0x01); // Clear screen
|
lcd_send(0, 0x01); // Clear screen
|
||||||
lcd_send(0, 0x02); // Return home
|
lcd_send(0, 0x02); // Return home
|
||||||
lcd_send(0, 0xC); // Display on, no cursor
|
lcd_send(0, 0b00001100); // Display on, no cursor
|
||||||
lcd_send(0, 0x28);
|
lcd_send(0, 0b00101000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_clear() { lcd_send(0, 0x01); }
|
void lcd_clear() { lcd_send(0, 0x01); }
|
||||||
|
|
|
@ -9,11 +9,7 @@ MCU = atmega1284p
|
||||||
QEMU_MACHINE_NAME = mega
|
QEMU_MACHINE_NAME = mega
|
||||||
|
|
||||||
# Compiler flags
|
# Compiler flags
|
||||||
CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -Wno-array-bounds -mmcu=$(MCU) \
|
CFLAGS = -std=c2x -Wall -Wno-array-bounds -mmcu=$(MCU) -DF_CPU=16000000UL -O3
|
||||||
-DF_CPU=16000000UL -O2 -fno-common -ffunction-sections -fdata-sections
|
|
||||||
|
|
||||||
# For debug
|
|
||||||
CFLAGS += -g3 -DDEBUG
|
|
||||||
|
|
||||||
# Source files
|
# Source files
|
||||||
SRCS = $(wildcard *.c)
|
SRCS = $(wildcard *.c)
|
||||||
|
@ -38,7 +34,6 @@ $(TARGET).elf: $(OBJS)
|
||||||
# Convert ELF to HEX
|
# Convert ELF to HEX
|
||||||
$(TARGET).hex: $(TARGET).elf
|
$(TARGET).hex: $(TARGET).elf
|
||||||
avr-objcopy -O ihex -R .eeprom $(TARGET).elf $(TARGET).hex
|
avr-objcopy -O ihex -R .eeprom $(TARGET).elf $(TARGET).hex
|
||||||
avr-size $<
|
|
||||||
|
|
||||||
# Flash the program
|
# Flash the program
|
||||||
flash: $(TARGET).hex
|
flash: $(TARGET).hex
|
Loading…
Add table
Reference in a new issue