Revision cf1f756b source/alld_led.c
| source/alld_led.c | ||
|---|---|---|
| 31 | 31 |
{
|
| 32 | 32 |
apalDbgAssert(led != NULL); |
| 33 | 33 |
|
| 34 |
return apalControlGpioSet(&(led->gpio), (state == LED_LLD_STATE_ON) ? APAL_GPIO_ON : APAL_GPIO_OFF);
|
|
| 34 |
return apalControlGpioSet(led->gpio, (state == LED_LLD_STATE_ON) ? APAL_GPIO_ON : APAL_GPIO_OFF);
|
|
| 35 | 35 |
} |
| 36 | 36 |
|
| 37 | 37 |
/** |
| ... | ... | |
| 47 | 47 |
apalDbgAssert(state != NULL); |
| 48 | 48 |
|
| 49 | 49 |
apalControlGpioState_t gpio_state; |
| 50 |
apalExitStatus_t status = apalControlGpioGet(&led->gpio, &gpio_state);
|
|
| 50 |
apalExitStatus_t status = apalControlGpioGet(led->gpio, &gpio_state); |
|
| 51 | 51 |
*state = gpio_state == APAL_GPIO_ON ? LED_LLD_STATE_ON : LED_LLD_STATE_OFF; |
| 52 | 52 |
return status; |
| 53 | 53 |
} |
| ... | ... | |
| 62 | 62 |
{
|
| 63 | 63 |
apalDbgAssert(led != NULL); |
| 64 | 64 |
|
| 65 |
return apalGpioToggle(led->gpio.gpio);
|
|
| 65 |
return apalGpioToggle(led->gpio->gpio);
|
|
| 66 | 66 |
} |
| 67 | 67 |
|
| 68 | 68 |
#endif /* defined(AMIROLLD_CFG_USE_LED) */ |
Also available in: Unified diff