ECE4760 - Laser Projector (ipb7, jcc384, pfc38)  1
Raster Laser Projection
color.c
Go to the documentation of this file.
1 
9 #include "color.h"
10 
11 /*******************************/
12 /* LOCAL Macro Definitions */
13 /*******************************/
15 
17 
18 /********************************/
19 /* LOCAL Type(def) Declarations */
20 /********************************/
22 
24 
25 /*******************************/
26 /* LOCAL Variable Definitions */
27 /*******************************/
29 
30 struct color const color_blank = {0};
31 
32 struct color const color_purest_red = {
33  .red = 3,
34  .green = 0,
35  .blue = 0
36 };
37 
38 struct color const color_purest_green = {
39  .red = 0,
40  .green = 3,
41  .blue = 0
42 };
43 
44 struct color const color_purest_blue = {
45  .red = 0,
46  .green = 0,
47  .blue = 3
48 };
49 
51 
52 /*******************************/
53 /* LOCAL Function Declarations */
54 /*******************************/
56 
58 
59 /*******************************/
60 /* GLOBAL Variable Definitions */
61 /*******************************/
63 
65 
66 /*******************************/
67 /* GLOBAL Function Definitions */
68 /*******************************/
70 
71 bool color_equal(struct color const a,
72  struct color const b) {
73  return (a.red == b.red) && (a.green == b.green) && (a.blue == b.blue);
74 }
75 
77 
78 /*******************************/
79 /* ISR Definitions */
80 /*******************************/
82 
84 
85 /*******************************/
86 /* LOCAL Function Definitions */
87 /*******************************/
89 
struct color const color_purest_blue
Maximum intensity blue, no other colors.
Definition: color.c:44
char blue
Definition: color.h:43
char red
Definition: color.h:42
struct color const color_blank
Definition: color.c:30
Definition: color.h:41
bool color_equal(struct color const a, struct color const b)
Return true if a and b represent exactly the same color.
Definition: color.c:71
struct color const color_purest_green
Maximum intensity green, no other colors.
Definition: color.c:38
char green
Definition: color.h:44
Color types and utilities.
struct color const color_purest_red
Maximum intensity red, no other colors.
Definition: color.c:32