From 5d2fb1c30ad558e5deac368dd05531a31709cda9 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Fri, 5 Feb 2016 20:09:29 -0500 Subject: Rename blink to blink-t85. --- blink-t85/Makefile | 16 ++++++++++++++++ blink-t85/blink.c | 15 +++++++++++++++ blink/Makefile | 16 ---------------- blink/blink.c | 15 --------------- 4 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 blink-t85/Makefile create mode 100644 blink-t85/blink.c delete mode 100644 blink/Makefile delete mode 100644 blink/blink.c diff --git a/blink-t85/Makefile b/blink-t85/Makefile new file mode 100644 index 0000000..890a892 --- /dev/null +++ b/blink-t85/Makefile @@ -0,0 +1,16 @@ +PROJECT=blink +SOURCES=$(PROJECT).c +MMCU=attiny85 +F_CPU = 1000000 + +CFLAGS=-mmcu=$(MMCU) -Wall -Os -DF_CPU=$(F_CPU) + +$(PROJECT).hex: $(PROJECT).out + avr-objcopy -O ihex $(PROJECT).out $(PROJECT).c.hex;\ + avr-size --mcu=$(MMCU) --format=avr $(PROJECT).out + +$(PROJECT).out: $(SOURCES) + avr-gcc $(CFLAGS) -I./ -o $(PROJECT).out $(SOURCES) + +program: $(PROJECT).hex + avrdude -p $(MMCU) -c avrisp -P /dev/ttyUSB0 -b 19200 -U flash:w:$(PROJECT).c.hex diff --git a/blink-t85/blink.c b/blink-t85/blink.c new file mode 100644 index 0000000..5006606 --- /dev/null +++ b/blink-t85/blink.c @@ -0,0 +1,15 @@ +#include +#include + +int main(void) { + DDRB |= _BV(PB1); + while (1) { + PORTB |= (1<<2); + PORTB &= ~(1<<3); + _delay_ms(500); + PORTB &= ~(1<<2); + PORTB |= (1<<3); + _delay_ms(500); + } + return 0; +} diff --git a/blink/Makefile b/blink/Makefile deleted file mode 100644 index 890a892..0000000 --- a/blink/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -PROJECT=blink -SOURCES=$(PROJECT).c -MMCU=attiny85 -F_CPU = 1000000 - -CFLAGS=-mmcu=$(MMCU) -Wall -Os -DF_CPU=$(F_CPU) - -$(PROJECT).hex: $(PROJECT).out - avr-objcopy -O ihex $(PROJECT).out $(PROJECT).c.hex;\ - avr-size --mcu=$(MMCU) --format=avr $(PROJECT).out - -$(PROJECT).out: $(SOURCES) - avr-gcc $(CFLAGS) -I./ -o $(PROJECT).out $(SOURCES) - -program: $(PROJECT).hex - avrdude -p $(MMCU) -c avrisp -P /dev/ttyUSB0 -b 19200 -U flash:w:$(PROJECT).c.hex diff --git a/blink/blink.c b/blink/blink.c deleted file mode 100644 index 5006606..0000000 --- a/blink/blink.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -int main(void) { - DDRB |= _BV(PB1); - while (1) { - PORTB |= (1<<2); - PORTB &= ~(1<<3); - _delay_ms(500); - PORTB &= ~(1<<2); - PORTB |= (1<<3); - _delay_ms(500); - } - return 0; -} -- cgit v1.2.3