summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Readme.txt4
-rw-r--r--commandline/Makefile6
-rw-r--r--commandline/i2c.c (renamed from commandline/powerSwitch.c)0
4 files changed, 7 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f6ccfa0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/commandline/i2c
+/commandline/i2c.o
diff --git a/Readme.txt b/Readme.txt
index 3c5ea04..c668932 100644
--- a/Readme.txt
+++ b/Readme.txt
@@ -6,13 +6,13 @@ use an ATTiny and have D+ is connected to INT0, D- to INT1,
SDA to PB6 and SCL to PB7. Using hardware 1k5 pull-ups on SDA and SCL is
recommended.
-The powerSwitch program in the commandline directory will transmit the I2C
+The i2c program in the commandline directory will transmit the I2C
start condition and then the bytes it reads on stdin (as decimal numbers,
separated by newlines). On EOF, a stop condition is transmitted.
So, to set a freshly flashed MicroMoody's color to yellow, you'd have to do:
-> ./powerSwitch
+> ./i2c
35
0
0
diff --git a/commandline/Makefile b/commandline/Makefile
index 4587b5e..4d33064 100644
--- a/commandline/Makefile
+++ b/commandline/Makefile
@@ -27,7 +27,7 @@ CC = gcc
CFLAGS = $(USBFLAGS) -O -Wall
LIBS = $(USBLIBS)
-PROGRAM = powerSwitch$(EXE_SUFFIX)
+PROGRAM = i2c$(EXE_SUFFIX)
all: $(PROGRAM)
@@ -35,8 +35,8 @@ all: $(PROGRAM)
.c.o:
$(CC) $(CFLAGS) -c $<
-$(PROGRAM): powerSwitch.o
- $(CC) -o $(PROGRAM) powerSwitch.o $(LIBS)
+$(PROGRAM): i2c.o
+ $(CC) -o $(PROGRAM) i2c.o $(LIBS)
strip: $(PROGRAM)
strip $(PROGRAM)
diff --git a/commandline/powerSwitch.c b/commandline/i2c.c
index ce29dde..ce29dde 100644
--- a/commandline/powerSwitch.c
+++ b/commandline/i2c.c