1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
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.
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
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
20 #define _RTL8723DS_LED_C_
22 #include "rtl8723d_hal.h"
24 /* ********************************************************************************
26 * ******************************************************************************** */
29 /* ********************************************************************************
30 * Prototype of protected function.
31 * ******************************************************************************** */
33 /* ********************************************************************************
34 * LED_819xUsb routines.
35 * ******************************************************************************** */
39 * Turn on LED according to LedPin specified.
48 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
50 if (RTW_CANNOT_RUN(padapter))
60 * Turn off LED according to LedPin specified.
69 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
71 if (RTW_CANNOT_RUN(padapter))
75 pLed->bLedOn = _FALSE;
79 /* ********************************************************************************
80 * Interface to manipulate LED objects.
81 * ******************************************************************************** */
83 /* ********************************************************************************
84 * Default LED behavior.
85 * ******************************************************************************** */
89 * Initialize all LED_871x objects.
97 struct led_priv *pledpriv = &(padapter->ledpriv);
99 pledpriv->LedControlHandler = LedControlSDIO;
101 pledpriv->SwLedOn = SwLedOn_8723DS;
102 pledpriv->SwLedOff = SwLedOff_8723DS;
104 InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
106 InitLed871x(padapter, &(pledpriv->SwLed1), LED_PIN_LED1);
113 * DeInitialize all LED_819xUsb objects.
116 rtl8723ds_DeInitSwLeds(
121 struct led_priv *ledpriv = &(padapter->ledpriv);
123 DeInitLed871x(&(ledpriv->SwLed0));
124 DeInitLed871x(&(ledpriv->SwLed1));