Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of FastIO by
Revision 7:b45620275f74, committed 2014-07-05
- Comitter:
- Sissors
- Date:
- Sat Jul 05 18:10:56 2014 +0000
- Parent:
- 6:8ad8f8acd0a5
- Commit message:
- Added time in ns
Changed in this revision
--- a/FastIO.lib Wed Jul 02 06:02:25 2014 +0000 +++ b/FastIO.lib Sat Jul 05 18:10:56 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Sissors/code/FastIO/#85a4a54f15e3 +http://mbed.org/users/Sissors/code/FastIO/#1a6ed4b84590
--- a/main.cpp Wed Jul 02 06:02:25 2014 +0000
+++ b/main.cpp Sat Jul 05 18:10:56 2014 +0000
@@ -17,7 +17,7 @@
void print_results(int digicount, int fastcount);
int main() {
- printf("\r\nAll numbers are the number of core clock cycles per IO operation\r\n");
+ printf("\r\nStarting test bench\r\n");
basic_test();
fixed_write();
@@ -32,7 +32,8 @@
void print_results(int digicount, int fastcount) {
float digicycles = (float)digicount / LOOPS * (float)SystemCoreClock / 1000000.0f;
float fastcycles = (float)fastcount / LOOPS * (float)SystemCoreClock / 1000000.0f;
- printf("Standard took %.1f cycles, FastIO took %.1f cycles, which is %d%%\r\n", digicycles, fastcycles,(int)(100.0f*fastcycles/digicycles + 0.5));
+ printf("Standard took %.2f cycles, FastIO took %.2f cycles, which is %d%%\r\n", digicycles, fastcycles,(int)(100.0f*fastcycles/digicycles + 0.5));
+ printf("Standard took %.0fns, FastIO took %.0fns\r\n", (float)digicount/LOOPS * 1000, (float)fastcount/LOOPS * 1000);
}
void basic_test() {
--- a/mbed.bld Wed Jul 02 06:02:25 2014 +0000 +++ b/mbed.bld Sat Jul 05 18:10:56 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae \ No newline at end of file
