Skip to content

Commit

Permalink
Wait a bit before sampling the version pins
Browse files Browse the repository at this point in the history
  • Loading branch information
jpieper committed Jul 10, 2024
1 parent 847ee36 commit 552f435
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fw/power_dist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1099,10 +1099,14 @@ int main(void) {
__HAL_RCC_ADC12_CLK_ENABLE();
__HAL_RCC_ADC345_CLK_ENABLE();

fw::MillisecondTimer timer;

DigitalIn hwrev0(HWREV_PIN0, PullUp);
DigitalIn hwrev1(HWREV_PIN1, PullUp);
DigitalIn hwrev2(HWREV_PIN2, PullUp);

timer.wait_ms(2);

const uint8_t this_hw_pins =
0x07 & (~(hwrev0.read() |
(hwrev1.read() << 1) |
Expand Down

0 comments on commit 552f435

Please sign in to comment.