From: Andy Spencer Date: Sat, 1 Mar 2014 19:20:46 +0000 (+0000) Subject: Add initial hw2 folder X-Git-Url: http://pileus.org/git/?p=~andy%2Fcsm213a-hw;a=commitdiff_plain;h=aa63ea60c1cc97c374e537f6a4912c11bfe4046b Add initial hw2 folder --- diff --git a/hw2/assignment.pdf b/hw2/assignment.pdf new file mode 100644 index 0000000..2a8ccc8 Binary files /dev/null and b/hw2/assignment.pdf differ diff --git a/hw2/main.cpp b/hw2/main.cpp new file mode 100644 index 0000000..a43bc8e --- /dev/null +++ b/hw2/main.cpp @@ -0,0 +1,12 @@ +#include "mbed.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +int main(int argc, char **argv) +{ + while (1) { + led1 = 1; led2 = 0; wait(0.1); + led1 = 0; led2 = 1; wait(0.1); + } +} diff --git a/hw2/makefile b/hw2/makefile new file mode 100644 index 0000000..00a0a47 --- /dev/null +++ b/hw2/makefile @@ -0,0 +1,13 @@ +PROG = mbed +OBJS = main.o + +CPPFLAGS = +LDFLAGS = -lm + +default: info install + +dist: + zip mbed.zip makefile ../common.mk *.{c,cpp,h} */*.{cpp,.h} + +-include ../config.mk +-include ../common.mk