Add ability to read/write arbitrary memory. Write LED blinker program.
[fw/altos] / ccdbg-io.c
index c69fc0d816751172b190393a96de95bbc047f83d..765bde845cabedcd643fe270b5b3c0363063f3e7 100644 (file)
  */
 
 #include "ccdbg.h"
  */
 
 #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)
 {
 
 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 *
 }
 
 struct ccdbg *