TauLabs/TauLabs — pull request #924 by lilvinz (2013-08-31 11:28:35+00:00)
Title: Pios delay fixes

* removes old CMSIS for F1 and uses common CMSIS3 headers instead
* refactors pios_delay.c into common
* fixes overflow in PIOS_DELAY_GetuSSince
* reenables access to DWT registers right before usage to fix debugging issues where DWT access gets disabled

note:
I have to calculate the modulo value for us diff calculation on init.
The maths is:
us_modulo = COUNTER_MAX_VALUE + 1 / us_ticks;
This is a 64bit division which pulls in too much code for bl and bu images so i made this a loop instead.
I am open for better approaches to this though.