Subversion Repositories HelenOS-historic

Rev

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

Rev 1480 Rev 1606
Line 47... Line 47...
47
#define TIP 0x20
47
#define TIP 0x20
48
 
48
 
49
 
49
 
50
static volatile __u8 *cuda = (__u8 *) 0xf2000000;
50
static volatile __u8 *cuda = (__u8 *) 0xf2000000;
51
 
51
 
-
 
52
 
-
 
53
/* Called from getc(). */
-
 
54
static void cuda_resume(chardev_t *d)
-
 
55
{
-
 
56
}
-
 
57
 
-
 
58
 
-
 
59
/* Called from getc(). */
-
 
60
static void cuda_suspend(chardev_t *d)
-
 
61
{
-
 
62
}
-
 
63
 
-
 
64
 
-
 
65
static char key_read(chardev_t *d)
-
 
66
{
-
 
67
    char ch;
-
 
68
   
-
 
69
    ch = 0;
-
 
70
    return ch;
-
 
71
}
-
 
72
 
-
 
73
 
-
 
74
static chardev_t kbrd;
-
 
75
static chardev_operations_t ops = {
-
 
76
    .suspend = cuda_suspend,
-
 
77
    .resume = cuda_resume,
-
 
78
    .read = key_read
-
 
79
};
-
 
80
 
52
#include <print.h>
81
#include <print.h>
53
static void cuda_irq(int n, istate_t *istate)
82
static void cuda_irq(int n, istate_t *istate)
54
{
83
{
55
    printf("Got cuda msg\n");
84
    printf("Got cuda msg\n");
56
}
85
}
57
 
86
 
58
void cuda_init(void)
87
void cuda_init(void)
59
{
88
{
60
    int_register(CUDA_IRQ, "cuda", cuda_irq);
89
    int_register(CUDA_IRQ, "cuda", cuda_irq);
61
    pic_enable_interrupt(CUDA_IRQ);
90
    pic_enable_interrupt(CUDA_IRQ);
-
 
91
   
-
 
92
    chardev_initialize("cuda_kbd", &kbrd, &ops);
-
 
93
    stdin = &kbrd;
62
}
94
}
63
 
95
 
64
 
96
 
65
void cuda_packet(const __u8 data)
97
void cuda_packet(const __u8 data)
66
{
98
{