AO_READ_AGAIN doesn't fit in a char anymore now that stdio is 8-bit
clean, everyone using pollchar must use an 'int' variable to capture
the whole value from pollchar.
Signed-off-by: Keith Packard <keithp@keithp.com>
{
int c;
- while ((c = ao_usb_pollchar()) == -1)
+ while ((c = ao_usb_pollchar()) == AO_READ_AGAIN)
ao_sleep(&ao_stdin_ready);
return c;
}
char
getchar(void) __reentrant
{
- char c;
+ int c;
ao_arch_critical(
int8_t stdio = ao_cur_stdio;
ao_btm_get_line(void)
{
uint8_t ao_btm_reply_len = 0;
- char c;
+ int c;
for (;;) {
static char
ao_packet_getchar(void)
{
- char c;
+ int c;
while ((c = ao_packet_pollchar()) == AO_READ_AGAIN) {
if (!ao_packet_enable)
break;
static void
ao_packet_echo(void) __reentrant
{
- char c;
+ int c;
while (ao_packet_enable) {
c = ao_packet_getchar();
if (c != AO_READ_AGAIN)