mirror of
https://github.com/hoglet67/AtomBusMon.git
synced 2024-12-21 09:29:52 +00:00
Eliminate a divide from hwCmd
Change-Id: I85284e3709679d66a11e7f1c00cbd8db4a25da51
This commit is contained in:
parent
2773dd97b1
commit
db014b0e56
@ -793,7 +793,7 @@ void hwCmd(cmd_t cmd, cmd_t param) {
|
||||
// An interation of the inner loop with a 32-bit loop variable
|
||||
// is 9 instructions. So use F_CPU to scale to the timeout
|
||||
// value is approx microseconds.
|
||||
uint32_t timeout = ((uint32_t) memTimeout) * (F_CPU / 1000000) / 9;
|
||||
uint32_t timeout = ((uint32_t) memTimeout) * ((F_CPU / 1000000) / 9);
|
||||
cmd |= param;
|
||||
CTRL_PORT &= ~CMD_MASK;
|
||||
CTRL_PORT ^= cmd | CMD_EDGE;
|
||||
|
Loading…
Reference in New Issue
Block a user