1 /******************************************************************************
\r
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
\r
5 * This program is free software; you can redistribute it and/or modify it
\r
6 * under the terms of version 2 of the GNU General Public License as
\r
7 * published by the Free Software Foundation.
\r
9 * This program is distributed in the hope that it will be useful, but WITHOUT
\r
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
14 * You should have received a copy of the GNU General Public License along with
\r
15 * this program; if not, write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
\r
19 ******************************************************************************/
\r
20 #define _RTL8189ES_LED_C_
\r
22 #include "drv_types.h"
\r
23 #include "rtl8188e_hal.h"
\r
25 //================================================================================
\r
27 //================================================================================
\r
30 //================================================================================
\r
31 // Prototype of protected function.
\r
32 //================================================================================
\r
34 //================================================================================
\r
35 // LED_819xUsb routines.
\r
36 //================================================================================
\r
40 // Turn on LED according to LedPin specified.
\r
49 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
\r
51 if( (padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
\r
56 pLed->bLedOn = _TRUE;
\r
62 // Turn off LED according to LedPin specified.
\r
71 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
\r
73 if(padapter->bSurpriseRemoved == _TRUE)
\r
79 pLed->bLedOn = _FALSE;
\r
83 //================================================================================
\r
84 // Default LED behavior.
\r
85 //================================================================================
\r
89 // Initialize all LED_871x objects.
\r
92 rtl8188es_InitSwLeds(
\r
97 struct led_priv *pledpriv = &(padapter->ledpriv);
\r
99 pledpriv->LedControlHandler = LedControlSDIO;
\r
101 pledpriv->SwLedOn = SwLedOn_8188ES;
\r
102 pledpriv->SwLedOff = SwLedOff_8188ES;
\r
104 InitLed(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
\r
106 InitLed(padapter, &(pledpriv->SwLed1), LED_PIN_LED1);
\r
113 // DeInitialize all LED_819xUsb objects.
\r
116 rtl8188es_DeInitSwLeds(
\r
121 struct led_priv *ledpriv = &(padapter->ledpriv);
\r
123 DeInitLed( &(ledpriv->SwLed0) );
\r
124 DeInitLed( &(ledpriv->SwLed1) );
\r