OpenBIC
OpenSource Bridge-IC
plat_led.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <stdint.h>
18
19#define AMBER_LED_BLINK_INTERVAL_MS 500
20#define UNKNOWN_LED_GPIO 0xFF
21
28};
29
35};
36
37uint8_t get_e1s_led_gpio(uint8_t device_id);
38struct k_timer *get_e1s_led_timer(uint8_t device_id);
39void stop_blink_timer(uint8_t device_id);
40void set_e1s_amber_led(uint8_t device_id, uint8_t ctrl_option);
41uint8_t get_e1s_amber_led_status(uint8_t device_id);
42int control_e1s_amber_led(uint8_t device_id, uint8_t ctrl_option);
AMBER_LED_CONTROL_OPTION
Definition: plat_led.h:22
@ CTRL_LED_TURN_OFF
Definition: plat_led.h:23
@ CTRL_LED_STOP_BLINK
Definition: plat_led.h:26
@ CTRL_LED_UNKNOWN
Definition: plat_led.h:27
@ CTRL_LED_TURN_ON
Definition: plat_led.h:24
@ CTRL_LED_START_BLINK
Definition: plat_led.h:25
uint8_t get_e1s_amber_led_status(uint8_t device_id)
Definition: plat_led.c:119
AMBER_LED_STATUS
Definition: plat_led.h:30
@ LED_STATUS_BLINK
Definition: plat_led.h:33
@ LED_STATUS_OFF
Definition: plat_led.h:31
@ LED_STATUS_UNKNOWN
Definition: plat_led.h:34
@ LED_STATUS_ON
Definition: plat_led.h:32
uint8_t get_e1s_led_gpio(uint8_t device_id)
Definition: plat_led.c:57
int control_e1s_amber_led(uint8_t device_id, uint8_t ctrl_option)
Definition: plat_led.c:128
void stop_blink_timer(uint8_t device_id)
Definition: plat_led.c:92
struct k_timer * get_e1s_led_timer(uint8_t device_id)
Definition: plat_led.c:66
void set_e1s_amber_led(uint8_t device_id, uint8_t ctrl_option)
Definition: plat_led.c:93
device_id
Definition: power_shell.h:28