Project

General

Profile

Revision 333

more changes, added docs

View differences:

graph.h
17 17
#define DIRECT_1024_768_888     0x118
18 18
#define DIRECT_1280_1024_565    0x11A
19 19
#define DIRECT_1280_1024_888    0x11B
20
#define LINEAR_FRAME_BUFFER_MD  BIT(14)
21 20

  
22 21
// Colors in RBG (8 bit)
23 22
#define GRAPH_BLACK             0x000000
......
28 27
// Alpha
29 28
#define ALPHA_THRESHOLD     0x7F
30 29

  
31
// MACROS
32
#define GET_ALP(n)          (0xFF & ((n) >> 24))
33
#define GET_RED(n)          (0xFF & ((n) >> 16))
34
#define GET_GRE(n)          (0xFF & ((n) >>  8))
35
#define GET_BLU(n)          (0xFF & (n      ))
36
#define GET_COLOR(n)        (0xFFFFFF & (n))
37
#define SET_ALP(n)          (((n)&0xFF) << 24)
38
#define SET_RED(n)          (((n)&0xFF) << 16)
39
#define SET_GRE(n)          (((n)&0xFF) <<  8)
40
#define SET_BLU(n)          (((n)&0xFF)      )
41
#define SET_RGB(r,g,b)      (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
42

  
43 30
/**
44 31
 * @brief Initialize graphics.
45 32
 * @param   mode    Graphics mode to use
......
88 75
 */
89 76
void (graph_set_pixel_pos)         (unsigned pos          , uint32_t color);
90 77

  
91
// SCREEN
78
/**
79
 * @brief Clear screen, painting it black.
80
 * @return  SUCCESS if operation was successful, other value otherwise
81
 */
92 82
int (graph_clear_screen)(void);
93 83

  
94
// DRAW
84
/**
85
 * @brief Draw everything on the buffer to the screen.
86
 * @return  SUCCESS if operation was successful, other value otherwise
87
 */
95 88
int (graph_draw)(void);
96 89

  
97 90
/**

Also available in: Unified diff