Rev 1125 | Rev 1137 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1125 | Rev 1136 | ||
|---|---|---|---|
| Line 72... | Line 72... | ||
| 72 | 72 | ||
| 73 | /* Interrupted at a pin change on zero-cross pin |
73 | /* Interrupted at a pin change on zero-cross pin |
| 74 | The zero-cross pin will go high just before the real zero-cross and |
74 | The zero-cross pin will go high just before the real zero-cross and |
| 75 | low just after the real zero-cross. The time difference is measured |
75 | low just after the real zero-cross. The time difference is measured |
| 76 | and adjusted for. */ |
76 | and adjusted for. */ |
| 77 | void act_dimmer230_pcint_callback(uint8_t id) //ISR (act_dimmer230_ZC_PCINT_vect) |
77 | void act_dimmer230_pcint_callback(uint8_t id, uint8_t status) //ISR (act_dimmer230_ZC_PCINT_vect) |
| 78 | { |
78 | { |
| 79 | /* only execute if zerocross pin is low (after real zerocross). |
79 | /* only execute if zerocross pin is low (after real zerocross). |
| 80 | Calculate the diff from real zero-cross. |
80 | Calculate the diff from real zero-cross. |
| 81 | */ |
81 | */ |
| 82 | if (!gpio_get_state(act_dimmer230_ZC_IO)) |
82 | if (!gpio_get_state(act_dimmer230_ZC_IO)) |