Increase button delays in preperation for frequency scaling.

When run at lower clock speeds, delays seem to need to be a little
longer in absolute time.

Change-Id: I5373f43094302e6fa3f0a79126e54cfccd90f5a4
This commit is contained in:
Michael Giacomelli 2016-01-18 23:51:25 +01:00
parent 784790dbec
commit 9f364a13c6

View file

@ -246,12 +246,13 @@ int button_read_device(void)
GPIOB_DIR &= ~(1<<1);
GPIOB_PIN(0) = 1<<0;
udelay(4);
/*note that lower delays (4, 2 us) work without frequency scaling*/
udelay(20);
gpiod6 = GPIOD_PIN(6);
GPIOB_PIN(0) = 0;
udelay(2);
udelay(5);
btn = GPIOC_PIN_MASK(0x3e) | (GPIOB_PIN(1) >> 1);