This website works better with JavaScript.
Home
Help
Register
Sign In
jim
/
openocd
Watch
0
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
26
Wiki
Activity
Browse Source
sleep command now prints out target debugmsgs w/anything like usable performance
git-svn-id: svn://svn.berlios.de/openocd/trunk@1076 b42882b7-edfa-0310-969c-e2dbd0fdcd60
tags/v0.1.0
oharboe
15 years ago
parent
824c270142
commit
358b472ab8
3 changed files
with
11 additions
and
6 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-1
src/helper/command.c
+4
-4
src/helper/log.c
+1
-1
src/target/target/zy1000.cfg
+ 6
- 1
src/helper/command.c
View File
@@ -741,7 +741,12 @@ int handle_sleep_command(struct command_context_s *cmd_ctx, char *cmd, char **ar
busy_sleep(duration);
} else
{
alive_sleep(duration);
long long then=timeval_ms();
while ((timeval_ms()-then)<duration)
{
target_call_timer_callbacks_now();
usleep(1000);
}
}
return ERROR_OK;
+ 4
- 4
src/helper/log.c
View File
@@ -400,14 +400,14 @@ void kept_alive()
void alive_sleep(int ms)
{
int i;
for (i=0; i<ms; i+=500)
int napTime=10;
for (i=0; i<ms; i+=napTime)
{
int sleep_a_bit=ms-i;
if (sleep_a_bit>
500
)
if (sleep_a_bit>
napTime
)
{
sleep_a_bit=
500
;
sleep_a_bit=
napTime
;
}
keep_alive();
usleep(sleep_a_bit*1000);
keep_alive();
}
+ 1
- 1
src/target/target/zy1000.cfg
View File
@@ -86,7 +86,7 @@ proc production_test {} {
sleep 1000
target_request debugmsgs enable
reset run
sleep 2
0
000
sleep 2
5
000
target_request debugmsgs disable
return "See IP address above..."
}
Write
Preview
Loading…
Cancel
Save