Permalink
Browse files

renamed main to harleyg, fixed Makefile, minor tweak/cleanup

  • Loading branch information...
1 parent cf92c46 commit ec463c8e698e1623cd3a339a489ffc57866cee6f @tz1 committed Apr 22, 2012
Showing with 9 additions and 10 deletions.
  1. +3 −3 Makefile
  2. +6 −7 main.c → harleyjg.c
View
@@ -1,5 +1,5 @@
-PRG = j1850-full
-OBJ = main.o
+PRG = harleyjg
+OBJ = harleyjg.o
MCU = attiny4313
OPTIMIZE = -Os
@@ -22,7 +22,7 @@ all: $(PRG).elf lst text eeprom size
$(PRG).elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-j1850-full.o: j1850-full.c
+harleyjg.o: harleyjg.c
clean:
rm -rf *.o
View
@@ -146,12 +146,9 @@ static void uart_init()
DDRB |= _BV(PB1);
PORTB |= _BV(PB1);
-
DDRB |= _BV(PB2);
PORTB &= ~_BV(PB2);
-
-
/* setup serial port */
#define BAUD 115200
#include <util/setbaud.h>
@@ -349,7 +346,7 @@ ISR(TIMER1_CAPT_vect)
lastedge = now;
polarity ^= 1;
- /* bad width or outside, will happen at EOD */
+ /* bad width or outside, will happen at EOD - ignore */
if (width >= US(VPW_EOF_MIN) || width < US(VPW_SHORT_PULSE_MIN))
return;
@@ -361,14 +358,16 @@ ISR(TIMER1_CAPT_vect)
/* doesn't quite do IFRs - normalization bit, crc? */
if (!polarity && width >= US(VPW_SOF_MIN)) {
-
-
+#if 1
jmsglen = 3;
timestamp(now);
jmsgbuf[0] = tsout[0];
jmsgbuf[1] = tsout[1];
jmsgbuf[2] = 'J';
-
+#else
+ jmsglen = 1;
+ jmsgbuf[0] = 'J';
+#endif
jbitcnt = jbitaccum = 0;
return;
}

0 comments on commit ec463c8

Please sign in to comment.