Skip to content

Commit

Permalink
Semihosting: Add support of SYS_READC (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-Chouteau authored and xor-gate committed Jan 31, 2017
1 parent e71a241 commit f62895b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gdbserver/semihosting.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ 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;
break;
}
case SYS_WRITE0:
{
uint8_t buf[WRITE0_BUFFER_SIZE];
Expand Down

0 comments on commit f62895b

Please sign in to comment.