Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
[platform] fix the dgetc signature problem
Browse files Browse the repository at this point in the history
  • Loading branch information
travisg authored and Ajay Dudani committed Jul 28, 2011
1 parent beb8d43 commit dbc2c68
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
18 changes: 12 additions & 6 deletions platform/armemu/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,21 @@ void _dputc(char c)
*REG8(DEBUG_STDOUT) = c;
}

int dgetc(char *c)
int dgetc(char *c, bool wait)
{
int8_t result = (int8_t)*REG8(DEBUG_STDIN);
for (;;) {
int8_t result = (int8_t)*REG8(DEBUG_STDIN);

if (result == -1)
return -1;
if (result == -1) {
if (wait)
continue;
else
return -1;
}

*c = (char)result;
return 0;
*c = (char)result;
return 0;
}
}

void debug_dump_regs(void)
Expand Down
2 changes: 1 addition & 1 deletion platform/integrator/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void _dputc(char c)
uart_putc(0, c);
}

int dgetc(char *c)
int dgetc(char *c, bool wait)
{
int result = uart_getc(0, false);

Expand Down
2 changes: 1 addition & 1 deletion platform/msm_shared/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void _dputc(char c)
#endif
}

int dgetc(char *c)
int dgetc(char *c, bool wait)
{
int n;
#if WITH_DEBUG_DCC
Expand Down
2 changes: 1 addition & 1 deletion platform/omap3/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void _dputc(char c)
uart_putc(DEBUG_UART, c);
}

int dgetc(char *c)
int dgetc(char *c, bool wait)
{
int _c;

Expand Down

0 comments on commit dbc2c68

Please sign in to comment.