Skip to content

Commit

Permalink
fix: potential implicit type cast issue (Thanks to @drandreas for poi…
Browse files Browse the repository at this point in the history
…nting it out)
  • Loading branch information
iceman1001 committed Jul 29, 2018
1 parent 506da3f commit c082531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion armsrc/ticks.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void StartCountUS(void) {
uint32_t RAMFUNC GetCountUS(void){
//return (AT91C_BASE_TC1->TC_CV * 0x8000) + ((AT91C_BASE_TC0->TC_CV / 15) * 10);
// By suggestion from PwPiwi, http://www.proxmark.org/forum/viewtopic.php?pid=17548#p17548
return (AT91C_BASE_TC1->TC_CV * 0x8000) + ((AT91C_BASE_TC0->TC_CV * 2) / 3);
return ((uint32_t)AT91C_BASE_TC1->TC_CV) * 0x8000 + (((uint32_t)AT91C_BASE_TC0->TC_CV) * 2) / 3;
}

// -------------------------------------------------------------------------
Expand Down

0 comments on commit c082531

Please sign in to comment.