Skip to content

Commit 5fa1273

Browse files
committed
realtek-rtl8195am-Hide_Debugging_Messages
This PR addresses the issue of #8903. A new boolean variable 'debug' is added to turn off the display of debugging message (by default). It can be turned on when needed. Description 1. Add new boolean parameter ‘debug’ in function ‘RTWInterface’ in file "RTWInterface.h". 2. Add conditional statement to enable/disable variable ‘GlobalDebugEnable’ in file "RTWInterface.h" to control whether debugging message should be displayed.
1 parent 70956ee commit 5fa1273

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ static rtw_result_t scan_result_handler( rtw_scan_handler_result_t* malloced_sca
8585
return RTW_SUCCESS;
8686
}
8787

88-
RTWInterface::RTWInterface(RTW_EMAC &get_rtw_emac, OnboardNetworkStack &get_rtw_obn_stack) :
88+
RTWInterface::RTWInterface(RTW_EMAC &get_rtw_emac, OnboardNetworkStack &get_rtw_obn_stack, bool debug) :
8989
EMACInterface(get_rtw_emac, get_rtw_obn_stack),
9090
rtw_emac(get_rtw_emac),
9191
rtw_obn_stack(get_rtw_obn_stack)
9292
{
93+
extern __u32 GlobalDebugEnable;
94+
GlobalDebugEnable = debug?1:0; //Conditional statement: display debugging message
9395
rtw_emac.power_up();
9496
}
9597

targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class RTWInterface: public WiFiInterface, public EMACInterface
4040
*/
4141
RTWInterface(
4242
RTW_EMAC &rtw_emac = RTW_EMAC::get_instance(),
43-
OnboardNetworkStack &rtw_lwip_stack = OnboardNetworkStack::get_default_instance());
43+
OnboardNetworkStack &rtw_lwip_stack = OnboardNetworkStack::get_default_instance(), bool debug=false);
4444

4545
~RTWInterface();
4646

0 commit comments

Comments
 (0)