Enable/Disable debug from argument of constructor

pull/4667/head
Yuguo Zou 2017-07-12 17:40:24 +08:00
parent c7111c429e
commit b435ff4a16
2 changed files with 3 additions and 3 deletions

View File

@ -85,14 +85,14 @@ static rtw_result_t scan_result_handler( rtw_scan_handler_result_t* malloced_sca
return RTW_SUCCESS;
}
RTWInterface::RTWInterface()
RTWInterface::RTWInterface(bool debug)
: _dhcp(true), _ip_address(), _netmask(), _gateway()
{
emac_interface_t *emac;
int ret;
extern u32 GlobalDebugEnable;
GlobalDebugEnable = 0;
GlobalDebugEnable = debug?1:0;
emac = wlan_emac_init_interface();
if (!emac) {
printf("Error init RTWInterface!\r\n");

View File

@ -34,7 +34,7 @@ class RTWInterface: public WiFiInterface
public:
/** RTWWlanInterface lifetime
*/
RTWInterface();
RTWInterface(bool debug=false);
~RTWInterface();
/** Set a static IP address