MFp4:
o Disable all interrupts that the ST can generate until we have an ISR to service them. o Correct clock calculation to make DELAY the right length... Submitted by: cognet (#2)
This commit is contained in:
parent
244bb595f4
commit
5bcedfaa73
@ -102,7 +102,8 @@ at91st_attach(device_t dev)
|
||||
* initializing clocks so that DELAY works.
|
||||
*/
|
||||
WR4(ST_RTMR, 1);
|
||||
|
||||
/* Disable all interrupts */
|
||||
WR4(ST_IDR, 0xffffffff);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -175,7 +176,7 @@ DELAY(int n)
|
||||
uint32_t start, end, cur;
|
||||
|
||||
start = st_crtr();
|
||||
n = (n * 1000000) / 32768;
|
||||
n = (n * 1000) / 32768;
|
||||
if (n <= 0)
|
||||
n = 1;
|
||||
end = (start + n) & ST_CRTR_MASK;
|
||||
|
Loading…
Reference in New Issue
Block a user