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
22
enum
AMBER_LED_CONTROL_OPTION
{
23
CTRL_LED_TURN_OFF
= 0x00,
24
CTRL_LED_TURN_ON
,
25
CTRL_LED_START_BLINK
,
26
CTRL_LED_STOP_BLINK
,
27
CTRL_LED_UNKNOWN
= 0xFF,
28
};
29
30
enum
AMBER_LED_STATUS
{
31
LED_STATUS_OFF
= 0x00,
32
LED_STATUS_ON
,
33
LED_STATUS_BLINK
,
34
LED_STATUS_UNKNOWN
= 0xFF,
35
};
36
37
uint8_t
get_e1s_led_gpio
(uint8_t
device_id
);
38
struct
k_timer *
get_e1s_led_timer
(uint8_t
device_id
);
39
void
stop_blink_timer
(uint8_t
device_id
);
40
void
set_e1s_amber_led
(uint8_t
device_id
, uint8_t ctrl_option);
41
uint8_t
get_e1s_amber_led_status
(uint8_t
device_id
);
42
int
control_e1s_amber_led
(uint8_t
device_id
, uint8_t ctrl_option);
AMBER_LED_CONTROL_OPTION
AMBER_LED_CONTROL_OPTION
Definition:
plat_led.h:22
CTRL_LED_TURN_OFF
@ CTRL_LED_TURN_OFF
Definition:
plat_led.h:23
CTRL_LED_STOP_BLINK
@ CTRL_LED_STOP_BLINK
Definition:
plat_led.h:26
CTRL_LED_UNKNOWN
@ CTRL_LED_UNKNOWN
Definition:
plat_led.h:27
CTRL_LED_TURN_ON
@ CTRL_LED_TURN_ON
Definition:
plat_led.h:24
CTRL_LED_START_BLINK
@ CTRL_LED_START_BLINK
Definition:
plat_led.h:25
get_e1s_amber_led_status
uint8_t get_e1s_amber_led_status(uint8_t device_id)
Definition:
plat_led.c:119
AMBER_LED_STATUS
AMBER_LED_STATUS
Definition:
plat_led.h:30
LED_STATUS_BLINK
@ LED_STATUS_BLINK
Definition:
plat_led.h:33
LED_STATUS_OFF
@ LED_STATUS_OFF
Definition:
plat_led.h:31
LED_STATUS_UNKNOWN
@ LED_STATUS_UNKNOWN
Definition:
plat_led.h:34
LED_STATUS_ON
@ LED_STATUS_ON
Definition:
plat_led.h:32
get_e1s_led_gpio
uint8_t get_e1s_led_gpio(uint8_t device_id)
Definition:
plat_led.c:57
control_e1s_amber_led
int control_e1s_amber_led(uint8_t device_id, uint8_t ctrl_option)
Definition:
plat_led.c:128
stop_blink_timer
void stop_blink_timer(uint8_t device_id)
Definition:
plat_led.c:92
get_e1s_led_timer
struct k_timer * get_e1s_led_timer(uint8_t device_id)
Definition:
plat_led.c:66
set_e1s_amber_led
void set_e1s_amber_led(uint8_t device_id, uint8_t ctrl_option)
Definition:
plat_led.c:93
device_id
device_id
Definition:
power_shell.h:28
meta-facebook
op2-op
src
platform
plat_led.h
Generated by
1.9.2