Subversion Repositories HelenOS-historic

Rev

Rev 1363 | Rev 1485 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1363 vana 1
 
2
 
3
#include <arch/types.h>
4
#include <types.h>
5
 
6
#ifndef __libc__FB_H__
7
#define __libc__FB_H__
8
 
9
#define FB_GET_VFB 1024
10
#define FB_PUTCHAR 1025
11
 
12
#define METHOD_WIDTH 16
13
#define ITEM_WIDTH 16
1366 decky 14
#define COUNT_WIDTH 16 /* Should be 8 times integer */
1363 vana 15
 
16
 
1366 decky 17
struct _fb_method {
18
    unsigned m : METHOD_WIDTH;
19
    unsigned item : ITEM_WIDTH;
20
} __attribute__((packed));
1363 vana 21
 
1366 decky 22
union fb_method {
1363 vana 23
    struct _fb_method m;
24
    __native fill;
1366 decky 25
} __attribute__((packed));
1363 vana 26
 
1366 decky 27
struct fb_call_args {
1363 vana 28
    union fb_method method;
1366 decky 29
    union {
30
        struct {
31
            unsigned count : COUNT_WIDTH;
32
            char chars[3 * sizeof(__native) - (COUNT_WIDTH >> 3)];
33
        } putchar __attribute__((packed));
34
    } data ; // __attribute__((packed));    
35
} __attribute__((packed));
1363 vana 36
 
1366 decky 37
struct fb_ipc_args {
1363 vana 38
    __native method;
39
    __native arg1;
40
    __native arg2;
41
    __native arg3;
1366 decky 42
} __attribute__((packed));
1363 vana 43
 
1366 decky 44
union fb_args {
1363 vana 45
    struct fb_call_args fb_args;
46
    struct fb_ipc_args ipc_args;
1366 decky 47
} __attribute__((packed));
1363 vana 48
 
49
typedef union fb_args fb_args_t;
50
 
51
#endif