blob: eb12272636bf4615fd58b4057f2b6173a1724319 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#include "video.h"
#include "string.h"
#include "kernel.h"
#undef DEBUG
static video_vtable_t const video_vtable = {
{
video_activate,
video_deactivate,
video_deinit,
video_print_info
}
};
void video_init( video_t *video, interrupt_t *interrupt, void *context )
{
memset( video, 0, sizeof( video_t ) );
driver_init( (driver_t *)video, DRIVER_TYPE_VIDEO, interrupt, context );
((driver_t *)video)->vtable = (driver_vtable_t *)&video_vtable;
}
void video_activate( void *obj )
{
kernel_panic( "Activating generic video driver should not be called directly." );
}
void video_deactivate( void *obj )
{
kernel_panic( "Deactivating generic video driver should not be called directly." );
}
void video_deinit( void *obj )
{
// nothing to be done
}
void video_print_info( void *obj )
{
kernel_panic( "Printing info of generic video driver should not be called directly." );
}
|