Project

General

Profile

Revision 122

xpm pingus

View differences:

graphics.h
4 4
#include <lcom/lcf.h>
5 5
#include <stdint.h>
6 6

  
7
#define GET_RED(n) (0xFF & (n >> 16))
8
#define GET_GRE(n) (0xFF & (n >>  8))
9
#define GET_BLU(n) (0xFF & (n      ))
10
#define SET_RED(n) ((n&0xFF) << 16)
11
#define SET_GRE(n) ((n&0xFF) <<  8)
12
#define SET_BLU(n) ((n&0xFF)      )
13
#define SET_COLOR(r,g,b) (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
7
#define GET_RED(n)          (0xFF & ((n) >> 16))
8
#define GET_GRE(n)          (0xFF & ((n) >>  8))
9
#define GET_BLU(n)          (0xFF & (n      ))
10
#define SET_RED(n)          (((n)&0xFF) << 16)
11
#define SET_GRE(n)          (((n)&0xFF) <<  8)
12
#define SET_BLU(n)          (((n)&0xFF)      )
13
#define SET_COLOR(r,g,b)    (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
14
#define FAR2PHYS(n)         ((((n)>>12) & 0xFFFFFFF0) + ((n) & 0x0000FFFF))
15
#define PHYS2VIRT(n)
14 16

  
15 17
int (get_permission)(unsigned int base_addr, unsigned int size);
16 18

  

Also available in: Unified diff