test program for Silicon Laboratories Inc. Si5351A-B-GT I2C-PROGRAMMABLE ANY-FREQUENCY CMOS CLOCK GENERATOR
Revision 5:e32ef4b85317, committed 2017-08-23
- Comitter:
- kenjiArai
- Date:
- Wed Aug 23 09:54:05 2017 +0000
- Parent:
- 4:5981cf106502
- Commit message:
- on Mbed OS5
Changed in this revision
--- a/Si5351A.lib Sat Jan 07 05:57:55 2017 +0000 +++ b/Si5351A.lib Wed Aug 23 09:54:05 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/kenjiArai/code/Si5351A/#af2d99cfb3f0 +https://developer.mbed.org/users/kenjiArai/code/Si5351A/#8c63d15c8c2e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Wed Aug 23 09:54:05 2017 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#db4be94693c3a873cfa0c025a5ad2e62b86a8474
--- a/mbed.bld Sat Jan 07 05:57:55 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/9baf128c2fab \ No newline at end of file
--- a/si5351a_check.cpp Sat Jan 07 05:57:55 2017 +0000 +++ b/si5351a_check.cpp Wed Aug 23 09:54:05 2017 +0000 @@ -455,7 +455,7 @@ GETC(); return; } - wait((float)seconds); + delay(seconds); } } #endif @@ -490,7 +490,7 @@ GETC(); return; } - wait((float)seconds); + delay(seconds); } for (j = i - 2; j > 0 ; j--){ f_set = freq_tbl[j]; @@ -500,7 +500,7 @@ GETC(); return; } - wait((float)seconds); + delay(seconds); } } } @@ -512,6 +512,17 @@ put_rn(); } +void delay(int32_t time) +{ +#if MBED_MAJOR_VERSION == 2 + wait((float)time); +#elif MBED_MAJOR_VERSION == 5 + Thread::wait(time * 1000); +#else +#error "Running on Unknown OS" +#endif +} + // Put \r\n void put_rn ( void ) {
--- a/si5351a_check.h Sat Jan 07 05:57:55 2017 +0000 +++ b/si5351a_check.h Wed Aug 23 09:54:05 2017 +0000 @@ -28,7 +28,7 @@ #define BAUD_RATE 9600 -#if 0 +#if 1 #define INCREMENT // command 1,2,3 -> INCREMENT or TABLE_LOOK #endif #if !defined(INCREMENT) @@ -58,3 +58,4 @@ int xatoi(char **str, int32_t *res); void get_line(char *buff, int len); void get_line_no_param(char *buff); +void delay(int32_t time); \ No newline at end of file