xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/hal/rtl8821c/sdio/rtl8821cs_led.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 2017 Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  *****************************************************************************/
15 #define _RTL8821CS_LED_C_
16 
17 #include <drv_types.h>		/* PADAPTER */
18 #include <hal_data.h>		/* PHAL_DATA_TYPE */
19 #include <hal_com_led.h>	/* PLED_SDIO */
20 #ifdef CONFIG_RTW_SW_LED
21 
22 /*
23 * =============================================================================
24 * LED object.
25 * =============================================================================
26 */
27 
28 
29 /*
30 * =============================================================================
31 *	Prototype of protected function.
32 * =============================================================================
33 */
34 
35 /*
36 * =============================================================================
37 * LED routines.
38 * =============================================================================
39 */
40 
41 /*
42 * Description:
43 *	Turn on LED according to LedPin specified.
44 */
swledon(PADAPTER adapter,PLED_SDIO led)45 void swledon(PADAPTER adapter, PLED_SDIO led)
46 {
47 	u8 LedCfg;
48 	PHAL_DATA_TYPE hal = GET_HAL_DATA(adapter);
49 
50 	if (RTW_CANNOT_RUN(adapter))
51 		return;
52 
53 	led->bLedOn = _TRUE;
54 }
55 
56 
57 /*
58  * Description:
59  *	Turn off LED according to LedPin specified.
60 */
swledoff(PADAPTER adapter,PLED_SDIO led)61 void swledoff(PADAPTER adapter, PLED_SDIO led)
62 {
63 	u8 LedCfg;
64 	PHAL_DATA_TYPE hal = GET_HAL_DATA(adapter);
65 
66 	if (RTW_CANNOT_RUN(adapter))
67 		goto exit;
68 
69 exit:
70 	led->bLedOn = _FALSE;
71 }
72 
73 /*
74 * =============================================================================
75 * Interface to manipulate LED objects.
76 * =============================================================================
77 */
78 
79 /*
80 * =============================================================================
81 * Default LED behavior.
82 * =============================================================================
83 */
84 
85 /*
86 * Description:
87 *	Initialize all LED_871x objects.
88 */
rtl8821cs_initswleds(PADAPTER adapter)89 void rtl8821cs_initswleds(PADAPTER adapter)
90 {
91 }
92 
93 /*
94 * Description:
95 * DeInitialize all LED_819xUsb objects.
96 */
rtl8821cs_deinitswleds(PADAPTER adapter)97 void rtl8821cs_deinitswleds(PADAPTER adapter)
98 {
99 }
100 #endif
101