set nano pins

This commit is contained in:
Luxferre
2024-11-23 14:57:55 +02:00
parent 5485b4fa21
commit d26d65337f
2 changed files with 20 additions and 15 deletions
+13 -6
View File
@@ -1,14 +1,21 @@
PROGRAM_NAME = example_blonk PROGRAM_NAME = example_blonk
BUILD_DIR = build BUILD_DIR = build
MCU = atmega2560 SERIALDEV = /dev/ttyUSB0
MCUSHORT = m2560 #MCU = atmega2560
MCUDEFS = -DF_CPU=16000000UL -DAAIO_MEGA2560 #MCUSHORT = m2560
PROG_PARAMS = -c wiring -P /dev/ttyUSB0 #MCUDEFS = -DF_CPU=16000000UL -DAAIO_MEGA2560
#PROG_PARAMS = -c wiring -P $(SERIALDEV) -D
#MCU = atmega328p #MCU = atmega328p
#MCUSHORT = m328p #MCUSHORT = m328p
#MCUDEFS = -DF_CPU=8000000UL -DAAIO_NANO #MCUDEFS = -DF_CPU=8000000UL -DAAIO_NANO
#PROG_PARAMS = -c wiring -P /dev/ttyUSB0 #PROG_PARAMS = -c wiring -P $(SERIALDEV) -D
MCU = atmega168pa
MCUSHORT = m168pa
MCUDEFS = -DF_CPU=16000000UL -DAAIO_NANO
PROG_PARAMS = -c urclock -P $(SERIALDEV) -D
#PROG_PARAMS = -c usbasp
SUDOCMD = doas SUDOCMD = doas
@@ -22,7 +29,7 @@ $(PROGRAM_NAME): $(BUILD_DIR)
avr-objcopy -j .text -j .data -O ihex $(BUILD_DIR)/$(PROGRAM_NAME).elf $(BUILD_DIR)/$(PROGRAM_NAME).hex avr-objcopy -j .text -j .data -O ihex $(BUILD_DIR)/$(PROGRAM_NAME).elf $(BUILD_DIR)/$(PROGRAM_NAME).hex
upload: $(PROGRAM_NAME) upload: $(PROGRAM_NAME)
$(SUDOCMD) avrdude -p $(MCUSHORT) $(PROG_PARAMS) -D -U flash:w:$(BUILD_DIR)/$(PROGRAM_NAME).hex:i $(SUDOCMD) avrdude -p $(MCUSHORT) $(PROG_PARAMS) -U flash:w:$(BUILD_DIR)/$(PROGRAM_NAME).hex:i
clean: clean:
rm -rf $(BUILD_DIR) rm -rf $(BUILD_DIR)
+7 -9
View File
@@ -49,34 +49,32 @@
#define AAIO_KEYPAD_PIN PIND #define AAIO_KEYPAD_PIN PIND
#endif #endif
/* TODO: change default LCD values for Nano! */
#ifndef AAIO_LCD_PORT #ifndef AAIO_LCD_PORT
#define AAIO_LCD_PORT PORTL #define AAIO_LCD_PORT PORTC
#endif #endif
#ifndef AAIO_LCD_DDR #ifndef AAIO_LCD_DDR
#define AAIO_LCD_DDR DDRL #define AAIO_LCD_DDR DDRC
#endif #endif
#ifndef AAIO_LCD_SCE #ifndef AAIO_LCD_SCE
#define AAIO_LCD_SCE PL4 #define AAIO_LCD_SCE PC4
#endif #endif
#ifndef AAIO_LCD_RST #ifndef AAIO_LCD_RST
#define AAIO_LCD_RST PL3 #define AAIO_LCD_RST PC3
#endif #endif
#ifndef AAIO_LCD_DC #ifndef AAIO_LCD_DC
#define AAIO_LCD_DC PL2 #define AAIO_LCD_DC PC2
#endif #endif
#ifndef AAIO_LCD_DIN #ifndef AAIO_LCD_DIN
#define AAIO_LCD_DIN PL1 #define AAIO_LCD_DIN PC1
#endif #endif
#ifndef AAIO_LCD_CLK #ifndef AAIO_LCD_CLK
#define AAIO_LCD_CLK PL0 #define AAIO_LCD_CLK PC0
#endif #endif
#endif #endif