Skip to content

Commit

Permalink
Semihosting: Add support of SYS_READC
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-Chouteau committed Jan 27, 2017
1 parent 77acc50 commit b7e66f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gdbserver/semihosting.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,13 @@ int do_semihosting (stlink_t *sl, uint32_t r0, uint32_t r1, uint32_t *ret) {
}
break;
}
case SYS_READC:
{
uint8_t c = getchar();
*ret = c;
return 0;
break;
}
case SYS_WRITE0:
{
uint8_t buf[WRITE0_BUFFER_SIZE];
Expand Down

0 comments on commit b7e66f4

Please sign in to comment.