Rev 1988 | Rev 2163 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1988 | Rev 1995 | ||
|---|---|---|---|
| Line 172... | Line 172... | ||
| 172 | sns_power_ReportInterval = eeprom_read_byte(EEDATA.reportInterval); |
172 | sns_power_ReportInterval = eeprom_read_byte(EEDATA.reportInterval); |
| 173 | } |
173 | } |
| 174 | #endif |
174 | #endif |
| 175 | ///Initialize hardware etc |
175 | ///Initialize hardware etc |
| 176 | gpio_set_in(POWER_SNS_PIN); // Set to input |
176 | gpio_set_in(POWER_SNS_PIN); // Set to input |
| - | 177 | #if sns_power_PIN_PULLUP==1 |
|
| 177 | gpio_set_pullup(POWER_SNS_PIN); // Enable pull-up |
178 | gpio_set_pullup(POWER_SNS_PIN); // Enable pull-up |
| - | 179 | #endif |
|
| 178 | 180 | ||
| 179 | Pcint_SetCallbackPin(sns_power_PCINT, POWER_SNS_PIN, &sns_power_pcint_callback); |
181 | Pcint_SetCallbackPin(sns_power_PCINT, POWER_SNS_PIN, &sns_power_pcint_callback); |
| 180 | 182 | ||
| 181 | MeasurmentBufferPointer = 0; |
183 | MeasurmentBufferPointer = 0; |
| 182 | #ifdef POWER_SNS_PIN_ch2 |
184 | #ifdef POWER_SNS_PIN_ch2 |
| 183 | gpio_set_in(POWER_SNS_PIN_ch2); // Set to input |
185 | gpio_set_in(POWER_SNS_PIN_ch2); // Set to input |
| - | 186 | #if sns_power_PIN_PULLUP_ch2==1 |
|
| 184 | gpio_set_pullup(POWER_SNS_PIN_ch2); // Enable pull-up |
187 | gpio_set_pullup(POWER_SNS_PIN_ch2); // Enable pull-up |
| - | 188 | #endif |
|
| 185 | 189 | ||
| 186 | Pcint_SetCallbackPin(sns_power_PCINT_ch2, POWER_SNS_PIN_ch2, &sns_power_pcint_callback_ch2); |
190 | Pcint_SetCallbackPin(sns_power_PCINT_ch2, POWER_SNS_PIN_ch2, &sns_power_pcint_callback_ch2); |
| 187 | 191 | ||
| 188 | MeasurmentBufferPointer_ch2 = 0; |
192 | MeasurmentBufferPointer_ch2 = 0; |
| 189 | #endif |
193 | #endif |