diff options
author | Keith Packard <keithp@keithp.com> | 2008-12-19 11:04:16 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-12-19 11:04:16 -0800 |
commit | 55995515b9d4fc1e193039eab697c5d03db417c2 (patch) | |
tree | 26fe03c8e599a60cdaf2b4d1ebc3b17549584320 /blink.c | |
parent | 0bc52385b8f86f9ca1c450ad106e6d8afe3bc153 (diff) |
Add flash writing code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'blink.c')
-rw-r--r-- | blink.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -11,7 +11,7 @@ sfr at 0xA0 P2; sfr at 0xFD P0DIR; sfr at 0xFE P1DIR; -sfr at 0xFE P2DIR; +sfr at 0xFF P2DIR; sfr at 0x8F P0INP; sfr at 0xF6 P1INP; sfr at 0xF7 P2INP; @@ -24,6 +24,7 @@ sfr at 0xF7 P2INP; nop \ _endasm; +#if 0 void delay (int n) { @@ -62,14 +63,29 @@ wordspace () { delay(8); } +#define _ dit(); +#define ___ dah(); +#define C charspace(); +#define W wordspace(); + +#endif + main () { +#if 0 /* Set p1_1 to output */ P1DIR = 0x02; P1INP = 0x00; P2INP = 0x00; for (;;) { - dah(); dit(); dah(); dit(); charspace (); - dah(); dah(); dit(); dah(); wordspace(); + ___ _ ___ _ C ___ ___ _ ___ W /* cq */ + ___ _ _ C _ W /* de */ + ___ _ ___ C ___ _ _ C /* kd */ + ___ ___ _ _ _ C _ _ _ C /* 7s */ + ___ ___ _ ___ C ___ ___ _ W /* qg */ } +#else + P1DIR = 0x02; + for (;;); +#endif } |