[maki@niconii]$ avr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega328p -c -o switch.o switch.c
switch.c: In function 'main':
switch.c:18:2: error: 'GICR' undeclared (first use in this function)
GICR = 1<<INT0;
^~~~
switch.c:18:2: note: each undeclared identifier is reported only once for each function it appears in
#include <avr/io.h>
#include <avr/interrupt.h>
switch.c:18:2: error: 'GICR' undeclared (first use in this function)
seriously what the HECK
CC := avr-gcc
CXX := avr-g++
MCU := atmega328p
INCLUDES += -I/usr/share/arduino/hardware/arduino/cores/arduino/ -I/usr/share/arduino/hardware/arduino/variants/standard/
DEFS += -D__AVR_ATmega328P__ -D__ATTR_PROGMEM__=__attribute__\(\(__progmem__\)\) -DPROGMEM=__ATTR_PROGMEM__
CCFLAGS += $(INCLUDES) -mmcu=$(MCU) $(DEFS)
You're missing includes and some defs.
well thanks for your help but i can't get it to work so im giving up forever
>>59253541
grep -Rn GICR .
>>59252845
unsigned int GICR;
>>59252845
Is there any IRL Maki?
>>59253579
don't think i want to do that, since i'm trying to read from the General Interrupt Control Register
>>59253594
I'm Maki irl and i can't figure out how to use interrupts on this avr!
self portrait of me getting my arduino in the mail, unaware that i wouldn't be able to figure out interrupts
>>59253724
keep posting maki