1 /******************************************************************************
2 *
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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 * 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
17 *
18 *
19 ******************************************************************************/
20 //#include "drv_types.h"
21 #include "rtl8723b_hal.h"
22
23 //================================================================================
24 // LED object.
25 //================================================================================
26
27
28 //================================================================================
29 // Prototype of protected function.
30 //================================================================================
31
32 //================================================================================
33 // LED_819xUsb routines.
34 //================================================================================
35
36 //
37 // Description:
38 // Turn on LED according to LedPin specified.
39 //
40 void
SwLedOn_8723BU(_adapter * padapter,PLED_USB pLed)41 SwLedOn_8723BU(
42 _adapter *padapter,
43 PLED_USB pLed
44 )
45 {
46 u8 LedCfg;
47 //HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
48
49 if (RTW_CANNOT_RUN(padapter))
50 return;
51
52 pLed->bLedOn = _TRUE;
53
54 }
55
56
57 //
58 // Description:
59 // Turn off LED according to LedPin specified.
60 //
61 void
SwLedOff_8723BU(_adapter * padapter,PLED_USB pLed)62 SwLedOff_8723BU(
63 _adapter *padapter,
64 PLED_USB pLed
65 )
66 {
67 u8 LedCfg;
68 //HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
69
70 if (RTW_CANNOT_RUN(padapter))
71 goto exit;
72
73 exit:
74 pLed->bLedOn = _FALSE;
75
76 }
77
78 //================================================================================
79 // Interface to manipulate LED objects.
80 //================================================================================
81
82 //================================================================================
83 // Default LED behavior.
84 //================================================================================
85
86 //
87 // Description:
88 // Initialize all LED_871x objects.
89 //
90 void
rtl8723bu_InitSwLeds(_adapter * padapter)91 rtl8723bu_InitSwLeds(
92 _adapter *padapter
93 )
94 {
95 struct led_priv *pledpriv = &(padapter->ledpriv);
96
97 pledpriv->LedControlHandler = LedControlUSB;
98
99 pledpriv->SwLedOn = SwLedOn_8723BU;
100 pledpriv->SwLedOff = SwLedOff_8723BU;
101
102 InitLed(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
103
104 InitLed(padapter, &(pledpriv->SwLed1), LED_PIN_LED1);
105 }
106
107
108 //
109 // Description:
110 // DeInitialize all LED_819xUsb objects.
111 //
112 void
rtl8723bu_DeInitSwLeds(_adapter * padapter)113 rtl8723bu_DeInitSwLeds(
114 _adapter *padapter
115 )
116 {
117 struct led_priv *ledpriv = &(padapter->ledpriv);
118
119 DeInitLed( &(ledpriv->SwLed0) );
120 DeInitLed( &(ledpriv->SwLed1) );
121 }
122
123