99 *
1010 * \brief Enables access to the on-board status LED(s)
1111 *
12- * Boards usually have access to an on-board status LEDs which are configured via the board header (\see PICO_DEFAULT_LED_PIN and \see PICO_DEFAULT_WS2812_PIN)
13- * This library hides the details so you can use the status LEDs for all boards without changing your code.
12+ * Boards usually have access to one or two on-board status LEDs which are configured via the board header (PICO_DEFAULT_LED_PIN, CYW43_WL_GPIO_LED_PIN and/or PICO_DEFAULT_WS2812_PIN).
13+ * This library hides the low-level details so you can use the status LEDs for all boards without changing your code.
14+ * \note If your board has both a single-color LED and a colored LED, you can independently control the single-color LED with the `status_led_` APIs, and the colored LED with the `colored_status_led_` APIs
1415 */
1516
1617#ifndef _PICO_STATUS_LED_H
@@ -28,7 +29,7 @@ struct async_context;
2829extern "C" {
2930#endif
3031
31- // PICO_CONFIG: PICO_STATUS_LED_AVAILABLE, Indicate whether a non-colored status LED is available, type=bool, default=1 if PICO_DEFAULT_LED_PIN or CYW43_WL_GPIO_LED_PIN is defined; may be set by the user to 0 to not use either even if they are available, group=pico_status_led
32+ // PICO_CONFIG: PICO_STATUS_LED_AVAILABLE, Indicate whether a single-color status LED is available, type=bool, default=1 if PICO_DEFAULT_LED_PIN or CYW43_WL_GPIO_LED_PIN is defined; may be set by the user to 0 to not use either even if they are available, group=pico_status_led
3233#ifndef PICO_STATUS_LED_AVAILABLE
3334#if defined(PICO_DEFAULT_LED_PIN ) || defined(CYW43_WL_GPIO_LED_PIN )
3435#define PICO_STATUS_LED_AVAILABLE 1
@@ -66,7 +67,7 @@ extern "C" {
6667/*! \brief Generate an WRGB color value for \ref colored_status_led_set_on_with_color
6768 * \ingroup pico_status_led
6869 *
69- * \note: If your hardware does not support a white pixel, the white component is ignored
70+ * \note If your hardware does not support a white pixel, the white component is ignored
7071 */
7172#ifndef PICO_COLORED_STATUS_LED_COLOR_FROM_WRGB
7273#define PICO_COLORED_STATUS_LED_COLOR_FROM_WRGB (w , r , g , b ) (((w) << 24) | ((r) << 16) | ((g) << 8) | (b))
@@ -92,7 +93,7 @@ extern "C" {
9293 * If the application already has an async context (e.g. created by cyw43_arch_init) you should use \ref
9394 * status_led_init_with_context instead and pass it the \ref async_context already created by your application
9495 *
95- * \note: You must call this function (or \ref status_led_init_with_context) before using any other pico_status_led functions.
96+ * \note You must call this function (or \ref status_led_init_with_context) before using any other pico_status_led functions.
9697 *
9798 * \return Returns true if the LED was initialized successfully, otherwise false on failure
9899 * \sa status_led_init_with_context
@@ -104,7 +105,7 @@ bool status_led_init(void);
104105 *
105106 * Initialize the status LED(s) and the resources they need before use.
106107 *
107- * \note: You must call this function (or \ref status_led_init) before using any other pico_status_led functions.
108+ * \note You must call this function (or \ref status_led_init) before using any other pico_status_led functions.
108109 *
109110 * \param context An \ref async_context used to communicate with the status LED (e.g. on Pico W or Pico 2 W)
110111 * \return Returns true if the LED was initialized successfully, otherwise false on failure
@@ -122,19 +123,20 @@ static inline bool colored_status_led_supported(void) {
122123 return PICO_COLORED_STATUS_LED_AVAILABLE ;
123124}
124125
125- /*! \brief Determine if the colored status LED is being used for the non-colored `status_led_` APIs
126+ /*! \brief Determine if the colored status LED is being used for the single-color `status_led_` APIs
126127 * \ingroup pico_status_led
127- * \return true if the olored status LED is being used for the non-colored `status_led_` API
128+ * \return true if the colored status LED is being used for the single-color `status_led_` API
128129 * \sa PICO_STATUS_LED_VIA_COLORED_STATUS_LED
129130 */
130131static inline bool status_led_via_colored_status_led (void ) {
131132 return PICO_STATUS_LED_VIA_COLORED_STATUS_LED ;
132133}
133134
134- /*! \brief Determine if the non-colored `status_led_` APIs are supported (i.e. if there is a regular LED, and its
135+ /*! \brief Determine if the single-color `status_led_` APIs are supported (i.e. if there is a regular LED, and its
135136 * use isn't disabled via \ref PICO_STATUS_LED_AVAILABLE being set to 0, or if the colored status LED is being used for
137+ * the single-color `status_led_` APIs
136138 * \ingroup pico_status_led
137- * \return true if the non-colored status LED API is available and expected to produce visible results
139+ * \return true if the single-color status LED API is available and expected to produce visible results
138140 * \sa PICO_STATUS_LED_AVAILABLE
139141 * \sa PICO_STATUS_LED_VIA_COLORED_STATUS_LED
140142 */
@@ -148,7 +150,7 @@ static inline bool status_led_supported(void) {
148150/*! \brief Set the colored status LED on or off
149151 * \ingroup pico_status_led
150152 *
151- * \note: If your hardware does not support a colored status LED (\see PICO_DEFAULT_WS2812_PIN), this function does nothing and returns false.
153+ * \note If your hardware does not support a colored status LED (PICO_DEFAULT_WS2812_PIN), this function does nothing and returns false.
152154 *
153155 * \param led_on true to turn the colored LED on. Pass false to turn the colored LED off
154156 * \return true if the colored status LED could be set, otherwise false
@@ -158,7 +160,7 @@ bool colored_status_led_set_state(bool led_on);
158160/*! \brief Get the state of the colored status LED
159161 * \ingroup pico_status_led
160162 *
161- * \note: If your hardware does not support a colored status LED (\see PICO_DEFAULT_WS2812_PIN), this function returns false.
163+ * \note If your hardware does not support a colored status LED (PICO_DEFAULT_WS2812_PIN), this function returns false.
162164 *
163165 * \return true if the colored status LED is on, or false if the colored status LED is off
164166 */
@@ -167,17 +169,17 @@ bool colored_status_led_get_state(void);
167169/*! \brief Ensure the colored status LED is on, with the specified color
168170 * \ingroup pico_status_led
169171 *
170- * \note: If your hardware does not support a colored status LED (\see PICO_DEFAULT_WS2812_PIN), this function does nothing and returns false.
172+ * \note If your hardware does not support a colored status LED (PICO_DEFAULT_WS2812_PIN), this function does nothing and returns false.
171173 *
172174 * \param color The color to use for the colored status LED when it is on, in 0xWWRRGGBB format
173- * \return true if the coloured status LED could be set, otherwise false on failure
175+ * \return true if the colored status LED could be set, otherwise false on failure
174176 */
175177bool colored_status_led_set_on_with_color (uint32_t color );
176178
177179/*! \brief Get the color used for the status LED value when it is on
178180 * \ingroup pico_status_led
179181 *
180- * \note: If your hardware does not support a colored status LED (\see PICO_DEFAULT_WS2812_PIN), this function always returns 0x0.
182+ * \note If your hardware does not support a colored status LED (PICO_DEFAULT_WS2812_PIN), this function always returns 0x0.
181183 *
182184* \return The color used for the colored status LED when it is on, in 0xWWRRGGBB format
183185*/
@@ -186,7 +188,7 @@ uint32_t colored_status_led_get_on_color(void);
186188/*! \brief Set the status LED on or off
187189* \ingroup pico_status_led
188190*
189- * \note: If your hardware does not support a status LED (\see PICO_DEFAULT_LED_PIN) , this function does nothing and returns false.
191+ * \note If your hardware does not support a status LED, this function does nothing and returns false.
190192*
191193* \param led_on true to turn the LED on. Pass false to turn the LED off
192194* \return true if the status LED could be set, otherwise false
@@ -213,7 +215,7 @@ static inline bool status_led_set_state(bool led_on) {
213215/*! \brief Get the state of the status LED
214216 * \ingroup pico_status_led
215217 *
216- * \note: If your hardware does not support a status LED (\see PICO_DEFAULT_LED_PIN) , this function always returns false.
218+ * \note If your hardware does not support a status LED, this function always returns false.
217219 *
218220 * \return true if the status LED is on, or false if the status LED is off
219221 */
0 commit comments