Date:2011-09-05 19:10:42 (8 years 10 days ago)
Author:Werner Almesberger
Commit:149be29ac78d96fe55bc116cd7780f2dd5b10e1c
Message:labsw/fw/: make loop use all front panel elements; set CH1/2 opto to open-drain

Files: labsw/fw/labsw.c (2 diffs)

Change Details

labsw/fw/labsw.c
2828
2929    LED_MAIN_R_MODE |= 1 << LED_MAIN_R_BIT;
3030    LED_MAIN_G_MODE |= 1 << LED_MAIN_G_BIT;
31    LED_CH1_R_MODE |= 1 << LED_CH1_R_BIT;
32    LED_CH1_G_MODE |= 1 << LED_CH1_G_BIT;
33    LED_CH2_R_MODE |= 1 << LED_CH2_R_BIT;
34    LED_CH2_G_MODE |= 1 << LED_CH2_G_BIT;
3135    CH1_RELAY = 0;
3236    CH2_RELAY = 0;
3337    CH1_RELAY_MODE |= 1 << CH1_RELAY_BIT;
3438    CH2_RELAY_MODE |= 1 << CH2_RELAY_BIT;
39
40    /* @@@ we need this while using the boot loader of cntr */
41    CH1_OPT_MODE &= ~(1 << CH1_OPT_BIT);
42    CH2_OPT_MODE &= ~(1 << CH2_OPT_BIT);
3543}
3644
3745
...... 
4654        if (!BUT_MAIN) {
4755            LED_MAIN_R = 1;
4856            LED_MAIN_G = 0;
49            CH1_RELAY = 1;
50            CH2_RELAY = 1;
5157        } else {
5258            LED_MAIN_R = 0;
5359            LED_MAIN_G = 1;
60        }
61        if (!BUT_CH1) {
62            LED_CH1_R = 1;
63            LED_CH1_G = 0;
64            CH1_RELAY = 1;
65            CH1_OPT = 0;
66        } else {
67            LED_CH1_R = 0;
68            LED_CH1_G = 1;
5469            CH1_RELAY = 0;
70            CH1_OPT = 1;
71        }
72        if (!BUT_CH2) {
73            LED_CH2_R = 1;
74            LED_CH2_G = 0;
75            CH2_RELAY = 1;
76            CH2_OPT = 0;
77        } else {
78            LED_CH2_R = 0;
79            LED_CH2_G = 1;
5580            CH2_RELAY = 0;
81            CH2_OPT = 1;
5682        }
5783        usb_poll();
5884    }

Archive Download the corresponding diff file

Branches:
master



interactive