Subversion Repositories HelenOS-historic

Rev

Rev 606 | Rev 814 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 606 Rev 610
Line 215... Line 215...
215
        ch = '\b';
215
        ch = '\b';
216
   
216
   
217
    chardev_push_character(&console, ch);
217
    chardev_push_character(&console, ch);
218
}
218
}
219
 
219
 
-
 
220
static char arc_read(chardev_t *dev)
-
 
221
{
-
 
222
    char ch;
-
 
223
    __u32 count;
-
 
224
    long result;
-
 
225
 
-
 
226
    result = arc_entry->read(0, &ch, 1, &count);
-
 
227
    if (result || count!=1) {
-
 
228
        printf("Error reading from ARC keyboard.\n");
-
 
229
        cpu_halt();
-
 
230
    }
-
 
231
    if (ch == '\r')
-
 
232
        return '\n';
-
 
233
    if (ch == 0x7f)
-
 
234
        return '\b';
-
 
235
    return ch;
-
 
236
}
-
 
237
 
220
static void arc_write(chardev_t *dev, const char ch)
238
static void arc_write(chardev_t *dev, const char ch)
221
{
239
{
222
    arc_putchar(ch);
240
    arc_putchar(ch);
223
}
241
}
224
 
242
 
Line 233... Line 251...
233
}
251
}
234
 
252
 
235
static chardev_operations_t arc_ops = {
253
static chardev_operations_t arc_ops = {
236
    .resume = arc_enable,
254
    .resume = arc_enable,
237
    .suspend = arc_disable,
255
    .suspend = arc_disable,
238
    .write = arc_write
256
    .write = arc_write,
-
 
257
    .read = arc_read
239
};
258
};
240
 
259
 
241
iroutine old_timer;
260
iroutine old_timer;
242
/** Do polling on timer interrupt */
261
/** Do polling on timer interrupt */
243
static void timer_replace(int n, void *stack)
262
static void timer_replace(int n, void *stack)