Skip to content

Commit b435ff4

Browse files
committed
Enable/Disable debug from argument of constructor
1 parent c7111c4 commit b435ff4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ static rtw_result_t scan_result_handler( rtw_scan_handler_result_t* malloced_sca
8585
return RTW_SUCCESS;
8686
}
8787

88-
RTWInterface::RTWInterface()
88+
RTWInterface::RTWInterface(bool debug)
8989
: _dhcp(true), _ip_address(), _netmask(), _gateway()
9090
{
9191
emac_interface_t *emac;
9292
int ret;
9393
extern u32 GlobalDebugEnable;
9494

95-
GlobalDebugEnable = 0;
95+
GlobalDebugEnable = debug?1:0;
9696
emac = wlan_emac_init_interface();
9797
if (!emac) {
9898
printf("Error init RTWInterface!\r\n");

targets/TARGET_Realtek/TARGET_AMEBA/RTWInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RTWInterface: public WiFiInterface
3434
public:
3535
/** RTWWlanInterface lifetime
3636
*/
37-
RTWInterface();
37+
RTWInterface(bool debug=false);
3838
~RTWInterface();
3939

4040
/** Set a static IP address

0 commit comments

Comments
 (0)