Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit29b84df

Browse files
committed
Merge branch 'main' of github.com:arduino/ArduinoCore-mbed
2 parents0c6b337 +31f8045 commit29b84df

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

‎libraries/Ethernet/src/Ethernet.cpp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ int arduino::EthernetClass::begin(uint8_t *mac, unsigned long timeout, unsigned
88
_initializerCallback();
99
if (eth_if ==nullptr)return0;
1010
}
11+
eth_if->set_dhcp(true);
12+
_begin(mac, timeout, responseTimeout);
13+
}
1114

15+
intarduino::EthernetClass::_begin(uint8_t *mac,unsignedlong timeout,unsignedlong responseTimeout) {
1216
if (mac !=nullptr) {
1317
eth_if->get_emac().set_hwaddr(mac);
1418
}
@@ -53,7 +57,7 @@ int arduino::EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPA
5357
eth_if->set_network(_ip, _netmask, _gateway);
5458
eth_if->add_dns_server(_dnsServer1,nullptr);
5559

56-
auto ret =begin(mac, timeout, responseTimeout);
60+
auto ret =_begin(mac, timeout, responseTimeout);
5761
return ret;
5862
}
5963

‎libraries/Ethernet/src/Ethernet.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ class EthernetClass : public MbedSocketClass {
116116
constexprstaticintmaintain () {return DHCP_CHECK_NONE; }
117117

118118
private:
119+
int_begin(uint8_t *mac,unsignedlong timeout,unsignedlong responseTimeout);
120+
119121
volatile EthernetLinkStatus _currentNetworkStatus = Unknown;
120122
EthernetInterface net;
121123
EthernetInterface *eth_if = &net;

‎libraries/GSM/src/GSMDebug.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,16 @@ const char * arduino::GSMClass::getRegistrationStateString(const mbed::CellularN
188188

189189
voidarduino::GSMClass::onStatusChange(nsapi_event_t ev,intptr_t in) {
190190

191-
if(ev == CellularStateRetryEvent) {
191+
cellular_event_status event = (cellular_event_status)ev;
192+
193+
if(event == CellularStateRetryEvent) {
192194
feedWatchdog();
193195
}
194196

195197
#if GSM_DEBUG_ENABLE
196198
constcell_callback_data_t *data = (constcell_callback_data_t *)in;
197199

198-
switch(ev)
200+
switch(event)
199201
{
200202
case CellularDeviceReady:
201203
{

‎libraries/SFU/src/SFU.cpp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ int SFU::begin() {
2121
if (err) {
2222
err =getFileSystem().reformat(&bd);
2323
}
24+
return err;
2425
}
2526

2627
intSFU::download(constchar* url) {
27-
// No download at the moment, allow the user to upload a file via mass storage
28+
// No download at the moment, allow the user to upload a file via mass storage
29+
return0;
2830
}
2931

3032
intSFU::apply() {
31-
// No autoreboot
33+
// No autoreboot
34+
return0;
3235
}
3336

3437
#ifdef ADD_USB_MSD

‎libraries/WiFi/src/WiFi.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ int arduino::WiFiClass::beginAP(const char* ssid, const char* passphrase, uint8_
6969
//Set ap ssid, password and channel
7070
softAPInterface->set_network(_ip, _netmask, _gateway);
7171
nsapi_error_t result = softAPInterface->start(ssid, passphrase, NSAPI_SECURITY_WPA2, channel,true/* dhcp server*/,NULL,true/* cohexistance*/);
72+
if (result != NSAPI_ERROR_OK) {
73+
_currentNetworkStatus = WL_AP_FAILED;
74+
return _currentNetworkStatus;
75+
}
7276

7377
nsapi_error_t registrationResult;
7478
softAPInterface->unregister_event_handler();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp