Sophie Dexter
/
Just4Trionic
Just4Trionic - CAN and BDM FLASH programmer for Saab cars
Diff: interfaces.h
- Revision:
- 2:bf3a2b29259a
- Parent:
- 1:d5452e398b76
- Child:
- 5:1775b4b13232
diff -r d5452e398b76 -r bf3a2b29259a interfaces.h --- a/interfaces.h Tue Sep 14 21:02:04 2010 +0000 +++ b/interfaces.h Tue Dec 14 21:50:35 2010 +0000 @@ -31,9 +31,9 @@ extern DigitalInOut PIN_BKPT; // breakpoint/serial clock extern DigitalInOut PIN_RESET; // reset signal extern DigitalInOut PIN_DSI; // data input (to ECU) signal -extern DigitalIn PIN_DS; // data strobe signal (not used) +extern DigitalIn PIN_DSO; // data output (from ECU) signal extern DigitalIn PIN_FREEZE; // freeze signal -extern DigitalIn PIN_DSO; // data output (from ECU) signal +//extern DigitalIn PIN_DS; // data strobe signal (not used) //LEDS @@ -47,4 +47,15 @@ void leds_off(void); +// led control macros +// These macros use the fastio register method to control the leds +#define CANTXLEDON LPC_GPIO1->FIOSET = (1 << 18) // Turn on the CAN bus transmitter activity led (led1, P1.18) +#define CANTXLEDOFF LPC_GPIO1->FIOCLR = (1 << 18) // Turn off the CAN bus transmitter activity led (led1, P1.18) +#define CANRXLEDON LPC_GPIO1->FIOSET = (1 << 20) // Turn on the CAN bus receiver activity led (led2, P1.20) +#define CANRXLEDOFF LPC_GPIO1->FIOCLR = (1 << 20) // Turn off the CAN bus receiver activity led (led2, P1.20) +#define ACTIVITYLEDON LPC_GPIO1->FIOSET = (1 << 21) // Turn on the activity led (led3, P1.21) +#define ACTIVITYLEDOFF LPC_GPIO1->FIOCLR = (1 << 21) // Turn off the activity led (led3, P1.21) +#define ERRORLEDON LPC_GPIO1->FIOSET = (1 << 23) // Turn on the ERROR led (led3, P1.23) +#define ERRORLEDOFF LPC_GPIO1->FIOCLR = (1 << 23) // Turn off the ERROR led (led3, P1.23) + #endif // __INTERFACES_H__ \ No newline at end of file