Project

General

Profile

Revision 1132

Cleanup/Documentation

View differences:

lights.h
41 41
#ifndef _LIGHTS_H_
42 42
#define _LIGHTS_H_
43 43

  
44

  
45 44
/**
46 45
 * @addtogroup orbs
47 46
 * @{
48 47
 **/
49 48

  
50
// ORB Colors
49
// ***** Predefined colors *****
51 50
/** @brief Red **/
52 51
#define RED       0xE0
53 52
/** @brief Orange **/
......
74 73
#define ORB_OFF   0x00
75 74

  
76 75

  
76

  
77 77
// ***** Initialization *****
78 78

  
79
/** @brief Enables the orbs **/
79
/** @brief Enables the orbs in default mode **/
80 80
void orb_init(void);
81 81

  
82
/** @brief Enables the orbs in binary mode **/
83
void orb_init_binary (void);
82 84

  
85
/** @brief Enables the orbs in PWM mode **/
86
void orb_init_pwm (void);
83 87

  
88

  
89

  
90
// ***** Mode setting *****
91

  
92
/** Specification of the orb mode **/
93
typedef uint8_t orb_mode_t;
94

  
95
/** @brief PWM mode **/
96
#define orb_mode_pwm 0
97

  
98
/** @brief Binary mode **/
99
#define orb_mode_binary 1
100

  
101

  
102
/** @brief Switches the orbs to the specified mode **/
103
void orb_set_mode (orb_mode_t mode);
104

  
105
/** @brief Disables the orb timer, but does not change the mode **/
106
void orb_disable_timer (void);
107

  
108
/** @brief Enables the orb timer, but does not change the mode **/
109
void orb_enable_timer (void);
110

  
111

  
112

  
84 113
// ***** Setting RGB colors *****
85 114

  
115
/** @brief set the specified orb to a specified color **/
116
void orb_n_set (uint8_t num, uint8_t red, uint8_t green, uint8_t blue);
117

  
86 118
/** @brief Set both orbs to a specified color **/
87 119
void orb_set(uint8_t red, uint8_t green, uint8_t blue);
88 120

  
......
95 127
void orbs_set (uint8_t red1, uint8_t green1, uint8_t blue1, uint8_t red2, uint8_t green2, uint8_t blue2);
96 128

  
97 129

  
130

  
98 131
// ***** Settings predefined colors *****
99 132

  
100
/** @brief Set both orbs to a specified color **/
101
void orb_set_color(uint8_t col);
133
/** @brief set the specified orb to the specified color **/
134
void orb_n_set_color(uint8_t num, uint8_t col);
102 135

  
103 136
/** @brief Set orb1 to a specified color **/
104 137
void orb1_set_color(uint8_t col);
......
106 139
/** @brief Set orb2 to a specified color **/
107 140
void orb2_set_color(uint8_t col);
108 141

  
142
/** @brief set the orbs to specified colors **/
109 143
void orbs_set_color(uint8_t col1, uint8_t col2);
110 144

  
145
/** @brief Set both orbs to a specified color **/
146
void orb_set_color(uint8_t col);
111 147

  
112
// ***** Mode setting *****
113 148

  
114
typedef uint8_t orb_mode_t;
115
#define orb_mode_pwm 0
116
#define orb_mode_binary 1
117 149

  
118
void orb_set_mode (orb_mode_t mode);
119

  
120

  
121
// ***** Initialization *****
122

  
123
void orb_init_binary (void);
124
void orb_init_pwm (void);
125
void orb_init (void);
126

  
127 150
/** @} **/ //end addtogroup
128 151

  
129

  
130 152
#endif
131

  

Also available in: Unified diff