Add cc1111 isr stub example
[fw/altos] / ccdbg-io.c
index c69fc0d816751172b190393a96de95bbc047f83d..b78e3aad2d5795a5c2bc8ad968a2843e671bc0cf 100644 (file)
  */
 
 #include "ccdbg.h"
-
-void
-ccdbg_quarter_clock(struct ccdbg *dbg)
-{
-       usleep(CC_CLOCK_US / 4);
-}
+#include <time.h>
 
 void
 ccdbg_half_clock(struct ccdbg *dbg)
 {
-       usleep(CC_CLOCK_US / 2);
+       struct timespec req, rem;
+       req.tv_sec = (CC_CLOCK_US / 2) / 1000000;
+       req.tv_nsec = ((CC_CLOCK_US / 2) % 1000000) * 1000;
+       nanosleep(&req, &rem);
 }
 
 struct ccdbg *