summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
16fd900)
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>
- while ((c = ao_usb_pollchar()) == -1)
+ while ((c = ao_usb_pollchar()) == AO_READ_AGAIN)
ao_sleep(&ao_stdin_ready);
return c;
}
ao_sleep(&ao_stdin_ready);
return c;
}
char
getchar(void) __reentrant
{
char
getchar(void) __reentrant
{
ao_arch_critical(
int8_t stdio = ao_cur_stdio;
ao_arch_critical(
int8_t stdio = ao_cur_stdio;
ao_btm_get_line(void)
{
uint8_t ao_btm_reply_len = 0;
ao_btm_get_line(void)
{
uint8_t ao_btm_reply_len = 0;
static char
ao_packet_getchar(void)
{
static char
ao_packet_getchar(void)
{
while ((c = ao_packet_pollchar()) == AO_READ_AGAIN) {
if (!ao_packet_enable)
break;
while ((c = ao_packet_pollchar()) == AO_READ_AGAIN) {
if (!ao_packet_enable)
break;
static void
ao_packet_echo(void) __reentrant
{
static void
ao_packet_echo(void) __reentrant
{
while (ao_packet_enable) {
c = ao_packet_getchar();
if (c != AO_READ_AGAIN)
while (ao_packet_enable) {
c = ao_packet_getchar();
if (c != AO_READ_AGAIN)