Revision 656
Set color(int) is better now
branches/autonomous_recharging/code/projects/libbayboard/orb.c | ||
---|---|---|
117 | 117 |
*/ |
118 | 118 |
while(1){ |
119 | 119 |
PORTD |= 0b00010000; |
120 |
} |
|
120 |
}
|
|
121 | 121 |
return 0; |
122 | 122 |
} |
123 | 123 |
|
... | ... | |
130 | 130 |
* @see orb_init |
131 | 131 |
**/ |
132 | 132 |
|
133 |
int set_orb(int color){ |
|
133 |
int Set_orb(int color){ |
|
134 |
int red = (color>>16)&BYTEMASK; |
|
135 |
int blue = (color>>8)&BYTEMASK; |
|
136 |
int green = color&BYTEMASK; |
|
137 |
return set_orb(red, green, blue); |
|
134 | 138 |
} |
135 | 139 |
|
136 | 140 |
/** @} **/ //end group |
branches/autonomous_recharging/code/projects/libbayboard/orb.h | ||
---|---|---|
35 | 35 |
#ifndef _ORB_H_ |
36 | 36 |
#define _ORB_H_ |
37 | 37 |
|
38 |
#define BYTEMASK 0b11111111 |
|
39 |
#define PURPLE 0xFF00FF |
|
40 |
#define TEAL 0xFFFF |
|
41 |
#define WHITE 0xFFFFFF |
|
42 |
|
|
43 |
|
|
38 | 44 |
/** |
39 | 45 |
* @addtogroup orbs |
40 | 46 |
* @{ |
... | ... | |
45 | 51 |
/** @brief Set both orbs to a specified color **/ |
46 | 52 |
int set_orb (int red, int green, int blue); |
47 | 53 |
/** @brief Set orb to a specified color **/ |
48 |
int set_orb (int color);
|
|
54 |
int Set_orb (int color);
|
|
49 | 55 |
|
50 | 56 |
/** @} **/ //end addtogroup |
51 | 57 |
|
Also available in: Unified diff