]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
save 2.3K flash-memory by avoiding a single floating point operation (#630)
authorpwpiwi <pwpiwi@users.noreply.github.com>
Thu, 26 Jul 2018 15:18:10 +0000 (17:18 +0200)
committerGitHub <noreply@github.com>
Thu, 26 Jul 2018 15:18:10 +0000 (17:18 +0200)
armsrc/util.c

index e25c6e0ba8e98d9c836082568150281f1581084e..59dfe07b45987250ae74b0495de38636e293560d 100644 (file)
@@ -489,13 +489,13 @@ void WaitTicks(uint32_t ticks){
 // 1us = 1.5ticks.
 void WaitUS(uint16_t us){
        if ( us == 0 ) return;
-       WaitTicks(  (uint32_t)(us * 1.5) );
+       WaitTicks( (uint32_t)us * 3 / 2 ) ;
 }
 
 
 void WaitMS(uint16_t ms){
        if (ms == 0) return;
-       WaitTicks( (uint32_t)(ms * 1500) );
+       WaitTicks( (uint32_t)ms * 1500 );
 }
 
 
Impressum, Datenschutz