summaryrefslogtreecommitdiff
path: root/analog
diff options
context:
space:
mode:
authorGuillaume Chevillot2008-03-04 09:11:26 +0100
committerGuillaume Chevillot2008-03-04 09:11:26 +0100
commit85ca310d6aa4554c12607298a98cce0056116085 (patch)
treeff0490883cfffb93d60f4dffd14629722a8c9f2c /analog
parentf7aedcfbdba289952f4a46a9345938bdba7e110d (diff)
Updated code LEDs to be more explicit :
- 2 LEDs for each motor driver - First LED blinking at PWM frequency for dir. 0 - Second LED blinking at PWM frequency for dir. 1 - Both LEDs are off on HIGH Z - Both LEDs are on on brake
Diffstat (limited to 'analog')
-rw-r--r--analog/motor-power-avr/src/mp_pwm_L_.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/analog/motor-power-avr/src/mp_pwm_L_.c b/analog/motor-power-avr/src/mp_pwm_L_.c
index e46398f8..da54dbe6 100644
--- a/analog/motor-power-avr/src/mp_pwm_L_.c
+++ b/analog/motor-power-avr/src/mp_pwm_L_.c
@@ -27,8 +27,8 @@ void init_pwm_L_ (void) {
_L_BH_0;
// status LEDs
- _L_LED0_1;
- _L_LED1_1;
+ _L_LED0_0;
+ _L_LED1_0;
// Set IOs as outputs
_L_ACTIVATE_OUTPUTS;
@@ -56,7 +56,7 @@ ISR(L_OVF_vect) {
sei(); // set back interrupts
// Display CMD_STATE on LEDs
- _L_LED0_0;
+ _L_LED0_1;
_L_LED1_0;
break;
@@ -71,8 +71,8 @@ ISR(L_OVF_vect) {
sei(); // set back interrupts
// Display CMD_STATE on LEDs
- _L_LED0_1;
- _L_LED1_0;
+ _L_LED0_0;
+ _L_LED1_1;
break;
@@ -87,7 +87,7 @@ ISR(L_OVF_vect) {
// Display CMD_STATE on LEDs
_L_LED0_0;
- _L_LED1_1;
+ _L_LED1_0;
break;
@@ -122,6 +122,11 @@ ISR(L_COMP_vect) {
_L_AH_0;
_L_AL_1;
sei(); // set back interrupts
+
+ // Display CMD_STATE on LEDs
+ _L_LED0_0;
+ _L_LED1_0;
+
break;
case CMD_STATE_DIR_1:
@@ -130,6 +135,11 @@ ISR(L_COMP_vect) {
_L_BH_0;
_L_BL_1;
sei(); // set back interrupts
+
+ // Display CMD_STATE on LEDs
+ _L_LED0_0;
+ _L_LED1_0;
+
break;
case CMD_STATE_BRAKE: