summaryrefslogtreecommitdiff
path: root/ccdbg-io.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-12-18 00:18:50 -0800
committerKeith Packard <keithp@keithp.com>2008-12-18 00:18:50 -0800
commit807e2adacb025af77bb53c03209e9c8e0d7a5f95 (patch)
treeae58ce250aca9f66086e888face7e8c8d3c1473e /ccdbg-io.c
parent8c879bf51c14a5928135d59211facd72f6a32808 (diff)
Add ability to read/write arbitrary memory. Write LED blinker program.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ccdbg-io.c')
-rw-r--r--ccdbg-io.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ccdbg-io.c b/ccdbg-io.c
index c69fc0d8..765bde84 100644
--- a/ccdbg-io.c
+++ b/ccdbg-io.c
@@ -17,17 +17,15 @@
*/
#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 *