Eliminate a divide from hwCmd

Change-Id: I85284e3709679d66a11e7f1c00cbd8db4a25da51
This commit is contained in:
David Banks 2021-06-30 13:18:56 +01:00
parent 2773dd97b1
commit db014b0e56
1 changed files with 1 additions and 1 deletions

View File

@ -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;