diff options
author | Keith Packard <keithp@keithp.com> | 2008-12-18 00:18:50 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-12-18 00:18:50 -0800 |
commit | 807e2adacb025af77bb53c03209e9c8e0d7a5f95 (patch) | |
tree | ae58ce250aca9f66086e888face7e8c8d3c1473e /ccdbg-io.c | |
parent | 8c879bf51c14a5928135d59211facd72f6a32808 (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.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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 * |