diff options
| author | Keith Packard <keithp@keithp.com> | 2009-04-24 19:12:28 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-04-24 19:12:28 -0700 | 
| commit | 20b9f304ecbddd73a0ee2461b4c5e80f08157f98 (patch) | |
| tree | 620596f2ef818f6f1cd91ace81d40f18a1d27703 | |
| parent | 6bf1d91ce0b723abe2bcec89668c13135ec044cf (diff) | |
configure igniter ports, set values to measured ones
| -rw-r--r-- | ao_ignite.c | 16 | 
1 files changed, 11 insertions, 5 deletions
| diff --git a/ao_ignite.c b/ao_ignite.c index acb9399b..ece40bf3 100644 --- a/ao_ignite.c +++ b/ao_ignite.c @@ -19,12 +19,15 @@  #define AO_IGNITER_DROGUE	P2_3  #define AO_IGNITER_MAIN		P2_4 +#define AO_IGNITER_DIR		P2DIR +#define AO_IGNITER_DROGUE_BIT	(1 << 3) +#define AO_IGNITER_MAIN_BIT	(1 << 4) -/* XXX test these values with real igniters */ -#define AO_IGNITER_OPEN		100 -#define AO_IGNITER_CLOSED	20000 -#define AO_IGNITER_FIRE_TIME	AO_MS_TO_TICKS(50) -#define AO_IGNITER_CHARGE_TIME	AO_MS_TO_TICKS(200) +/* test these values with real igniters */ +#define AO_IGNITER_OPEN		1000 +#define AO_IGNITER_CLOSED	7000 +#define AO_IGNITER_FIRE_TIME	AO_MS_TO_TICKS(500) +#define AO_IGNITER_CHARGE_TIME	AO_MS_TO_TICKS(2000)  struct ao_ignition {  	uint8_t	request; @@ -119,5 +122,8 @@ __xdata struct ao_task ao_igniter_task;  void  ao_igniter_init(void)  { +	AO_IGNITER_DROGUE = 0; +	AO_IGNITER_MAIN = 0; +	AO_IGNITER_DIR |= AO_IGNITER_DROGUE_BIT | AO_IGNITER_MAIN_BIT;  	ao_add_task(&ao_igniter_task, ao_igniter, "igniter");  } | 
