|
4 | 4 | */ |
5 | 5 | #pragma once |
6 | 6 |
|
7 | | -typedef enum |
| 7 | +typedef enum { |
| 8 | + LED_NORMAL = 1, ///< The normal mode of the led |
| 9 | + LED_SLEEP_MODE, ///< The led pulses slowly as it does in the sleep mode |
| 10 | + LED_OFF, ///< Switch off power led |
| 11 | + LED_RED, ///< Red state of the led |
| 12 | + LED_BLUE, ///< Blue state of the led |
| 13 | + LED_BLINK_RED, ///< Blinking red state of power led and notification led |
| 14 | +} powerLedState; |
| 15 | + |
| 16 | +typedef struct InfoLedPattern |
8 | 17 | { |
9 | | - LED_NORMAL = 1, ///< The normal mode of the led |
10 | | - LED_SLEEP_MODE, ///< The led pulses slowly as it does in the sleep mode |
11 | | - LED_OFF, ///< Switch off power led |
12 | | - LED_RED, ///< Red state of the led |
13 | | - LED_BLUE, ///< Blue state of the led |
14 | | - LED_BLINK_RED, ///< Blinking red state of power led and notification led |
15 | | -}powerLedState; |
| 18 | + u8 delay; ///< Delay between pattern values, 1/16th of a second (1 second = 0x10) |
| 19 | + u8 smoothing; ///< Smoothing between pattern values (higher = smoother) |
| 20 | + u8 loopDelay; ///< Delay between pattern loops, 1/16th of a second (1 second = 0x10, 0xFF = pattern is played only once) |
| 21 | + u8 blinkSpeed; ///< Blink speed, when smoothing == 0x00 |
| 22 | + u8 redPattern[32]; ///< Pattern for red component |
| 23 | + u8 greenPattern[32]; ///< Pattern for green component |
| 24 | + u8 bluePattern[32]; ///< Pattern for blue component |
| 25 | +} InfoLedPattern; |
16 | 26 |
|
17 | 27 | /// Initializes mcuHwc. |
18 | 28 | Result mcuHwcInit(void); |
@@ -66,6 +76,12 @@ Result MCUHWC_GetSoundSliderLevel(u8 *level); |
66 | 76 | */ |
67 | 77 | Result MCUHWC_SetWifiLedState(bool state); |
68 | 78 |
|
| 79 | +/** |
| 80 | + * @brief Sets the notification LED pattern |
| 81 | + * @param pattern Pattern for the notification LED. |
| 82 | + */ |
| 83 | +Result MCUHWC_SetInfoLedPattern(const InfoLedPattern* pattern); |
| 84 | + |
69 | 85 | /** |
70 | 86 | * @brief Sets Power LED state |
71 | 87 | * @param state powerLedState State of power LED. |
|
0 commit comments