GCC Code Coverage Report


Directory: components/
File: power_signal_processing/src/power_signal_processing.c
Date: 2025-10-25 23:12:34
Coverage Exec Excl Total
Lines: 100.0% 6 0 6
Functions: 100.0% 1 0 1
Branches: 100.0% 4 0 4

Line Branch Exec Source
1 /**
2 * @file power_signal_processing.c
3 * @brief Module responsible for processing power signals based on key presses.
4 */
5
6 #include "power_signal_processing.h"
7 #include "rte.h"
8
9 /**
10 *
11 * ```{impl} Power signal processing
12 * :id: SWIMPL_PSP-001
13 * :implements: SWDD_PSP-001, SWDD_PSP-002, SWDD_PSP-003
14 * ```
15 */
16 18 void powerSignalProcessing(void)
17 {
18 // Check if "P" key was pressed
19
2/2
✓ Branch 3 → 4 taken 7 times.
✓ Branch 3 → 8 taken 11 times.
18 if (RteGetPowerKeyPressedEvent())
20 {
21 // Toggle power state
22
2/2
✓ Branch 5 → 6 taken 5 times.
✓ Branch 5 → 7 taken 2 times.
7 if (RteGetPowerState() == POWER_STATE_OFF)
23 {
24 5 RteSetPowerState(POWER_STATE_ON);
25 }
26 else
27 {
28 2 RteSetPowerState(POWER_STATE_OFF);
29 }
30 }
31 18 }
32