1 /******************************************************************************
\r
3 * Copyright(c) 2007 - 2012 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 _RTL8723BS_LED_C_
\r
22 #include "rtl8723b_hal.h"
\r
24 //================================================================================
\r
26 //================================================================================
\r
29 //================================================================================
\r
30 // Prototype of protected function.
\r
31 //================================================================================
\r
33 //================================================================================
\r
34 // LED_819xUsb routines.
\r
35 //================================================================================
\r
39 // Turn on LED according to LedPin specified.
\r
48 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
\r
50 if( (padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
\r
55 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) || ( padapter->bDriverStopped == _TRUE))
\r
79 pLed->bLedOn = _FALSE;
\r
83 //================================================================================
\r
84 // Interface to manipulate LED objects.
\r
85 //================================================================================
\r
87 //================================================================================
\r
88 // Default LED behavior.
\r
89 //================================================================================
\r
93 // Initialize all LED_871x objects.
\r
96 rtl8723bs_InitSwLeds(
\r
101 struct led_priv *pledpriv = &(padapter->ledpriv);
\r
103 pledpriv->LedControlHandler = LedControlSDIO;
\r
105 pledpriv->SwLedOn = SwLedOn_8723BS;
\r
106 pledpriv->SwLedOff = SwLedOff_8723BS;
\r
108 InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
\r
110 InitLed871x(padapter,&(pledpriv->SwLed1), LED_PIN_LED1);
\r
117 // DeInitialize all LED_819xUsb objects.
\r
120 rtl8723bs_DeInitSwLeds(
\r
125 struct led_priv *ledpriv = &(padapter->ledpriv);
\r
127 DeInitLed871x( &(ledpriv->SwLed0) );
\r
128 DeInitLed871x( &(ledpriv->SwLed1) );
\r