Changed some pins and added I2C support

This commit is contained in:
2021-01-07 03:44:13 +01:00
parent 827bcdb386
commit c1c9774db7
7 changed files with 42 additions and 28 deletions

View File

@@ -1,20 +1,23 @@
OBJCOPY = avr-objcopy
CC = avr-gcc
BUILD = .build
TARGET = main
TARGET = keyboard
OPT = s
CFLAGS = -Wall -Wextra -std=c18 -O$(OPT) -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -Iinclude
CFLAGS = -Wall -Wextra -std=c18 -O$(OPT) -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -Iinclude -Ilibs/avr-i2c-slave
LDFLAGS = -Wall -Wextra -O$(OPT) -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p
SRC = \
src/main.c \
src/keyboard.c \
src/fifo.c \
src/scancode.c
src/scancode.c \
libs/avr-i2c-slave/I2CSlave.c
OBJ = $(addprefix $(BUILD)/, $(notdir $(SRC:.c=.o)))
vpath %.c $(sort $(dir $(SRC)))
# We can't use this as it will use the wrong main
# vpath %.c $(sort $(dir $(SRC)))
vpath %.c $(dir $(SRC))
.PHONY: all clean