Subversion Repositories HelenOS

Rev

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

Rev 3549 Rev 3582
Line 65... Line 65...
65
    /** offset within the SGCN buffer of the input buffer read pointer */
65
    /** offset within the SGCN buffer of the input buffer read pointer */
66
    uint32_t in_rdptr;
66
    uint32_t in_rdptr;
67
   
67
   
68
    /** offset within the SGCN buffer of the input buffer write pointer */
68
    /** offset within the SGCN buffer of the input buffer write pointer */
69
    uint32_t in_wrptr;
69
    uint32_t in_wrptr;
70
 
-
 
71
    /** offset within the SGCN buffer of the output buffer start */
-
 
72
    uint32_t out_begin;
-
 
73
   
-
 
74
    /** offset within the SGCN buffer of the output buffer end */
-
 
75
    uint32_t out_end;
-
 
76
   
-
 
77
    /** offset within the SGCN buffer of the output buffer read pointer */
-
 
78
    uint32_t out_rdptr;
-
 
79
   
-
 
80
    /** offset within the SGCN buffer of the output buffer write pointer */
-
 
81
    uint32_t out_wrptr;
-
 
82
} __attribute__ ((packed)) sgcn_buffer_header_t;
70
} __attribute__ ((packed)) sgcn_buffer_header_t;
83
 
71
 
84
/*
72
/*
85
 * Returns a pointer to the object of a given type which is placed at the given
73
 * Returns a pointer to the object of a given type which is placed at the given
86
 * offset from the console buffer beginning.
74
 * offset from the console buffer beginning.
Line 123... Line 111...
123
    sram_buffer_offset = sysinfo_value("sram.buffer.offset");
111
    sram_buffer_offset = sysinfo_value("sram.buffer.offset");
124
    ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
112
    ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
125
        0, (void *) 0);
113
        0, (void *) 0);
126
}
114
}
127
 
115
 
128
 
-
 
129
 
-
 
130
/**
116
/**
131
 * Handler of the "key pressed" event. Reads codes of all the pressed keys from
117
 * Handler of the "key pressed" event. Reads codes of all the pressed keys from
132
 * the buffer.
118
 * the buffer.
133
 */
119
 */
134
void sgcn_key_pressed(void)
120
void sgcn_key_pressed(void)
Line 151... Line 137...
151
            SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr);
137
            SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr);
152
        printf("Pressed character %c.\n", c);
138
        printf("Pressed character %c.\n", c);
153
        if (c == '\r') {
139
        if (c == '\r') {
154
                        c = '\n';
140
                        c = '\n';
155
                }
141
                }
156
        //keybuffer_push(&keybuffer, c);
-
 
157
        kbd_process_no_fb(&keybuffer, c);
142
        kbd_process_no_fb(&keybuffer, c);
158
    }
143
    }
159
}
144
}
160
 
145
 
161
/** @}
146
/** @}