Skip to content

Commit 74a9a6d

Browse files
committed
rebuild OPTA variant
1 parent 6d45bb7 commit 74a9a6d

File tree

7 files changed

+53
-1
lines changed

7 files changed

+53
-1
lines changed

cores/arduino/mbed/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ class STM32_EMAC : public EMAC {
148148
*/
149149
virtual void set_memory_manager(EMACMemoryManager &mem_mngr);
150150

151+
/* return the status of the interface as integer */
152+
int get_interface_status() override;
153+
/* return true if the interface is in the correct state to transmit */
154+
bool is_ready_to_tx() override;
155+
/* restart only if the interface is in error state */
156+
void restart() override;
157+
151158
// Called from driver functions
152159
ETH_HandleTypeDef EthHandle;
153160
osThreadId_t thread; /**< Processing thread */

cores/arduino/mbed/connectivity/netsocket/include/netsocket/EMAC.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,17 @@ class EMAC {
176176
* @param mem_mngr Pointer to memory manager
177177
*/
178178
virtual void set_memory_manager(EMACMemoryManager &mem_mngr) = 0;
179+
180+
virtual bool is_ready_to_tx() {
181+
return true;
182+
}
183+
184+
virtual void restart() {
185+
}
186+
187+
virtual int get_interface_status() {
188+
return -1;
189+
}
179190
};
180191

181192

cores/arduino/mbed/connectivity/netsocket/include/netsocket/EMACInterface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ class EMACInterface : public virtual NetworkInterface {
8383
/** @copydoc NetworkInterface::disconnect */
8484
nsapi_error_t disconnect() override;
8585

86+
/** @copydoc NetworkInterface::get_hostname */
87+
const char *get_hostname() override;
88+
89+
/** @copydoc NetworkInterface::set_hostname */
90+
nsapi_error_t set_hostname(const char *hostname) override;
91+
8692
/** @copydoc NetworkInterface::get_mac_address */
8793
const char *get_mac_address() override;
8894

@@ -146,6 +152,8 @@ class EMACInterface : public virtual NetworkInterface {
146152
OnboardNetworkStack::Interface *_interface = nullptr;
147153
bool _dhcp = true;
148154
bool _blocking = true;
155+
bool _hostname_set = false;
156+
char _hostname[NSAPI_HOSTNAME_SIZE];
149157
bool _hw_mac_addr_set = false;
150158
char _mac_address[NSAPI_MAC_SIZE];
151159
char _ip_address[NSAPI_IPv6_SIZE] {};

cores/arduino/mbed/connectivity/netsocket/include/netsocket/NetworkInterface.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,22 @@ class NetworkInterface: public DNS {
9090
*/
9191
virtual void set_as_default();
9292

93+
/** Get hostname.
94+
*
95+
* @return Hostname if configured, null otherwise
96+
*/
97+
virtual const char *get_hostname();
98+
99+
/** Set hostname.
100+
*
101+
* @param hostname Hostname string
102+
* @retval NSAPI_ERROR_OK on success
103+
* @retval NSAPI_ERROR_UNSUPPORTED if this feature is not supported
104+
* @retval NSAPI_ERROR_PARAMETER if hostname is not valid
105+
* @retval NSAPI_ERROR_BUSY if hostname can't be set
106+
*/
107+
virtual nsapi_error_t set_hostname(const char *hostname);
108+
93109
/** Get the local MAC address.
94110
*
95111
* Provided MAC address is intended for info or debug purposes and

cores/arduino/mbed/connectivity/netsocket/include/netsocket/nsapi_types.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,16 @@ typedef enum nsapi_security {
196196
*/
197197
#define NSAPI_IP_BYTES NSAPI_IPv6_BYTES
198198

199+
/** Maximum size of hostname
200+
*
201+
* According to RFC 1034 [1], Section 3.1 "Name space specifications and
202+
* terminology", 63 is the maximum size of a hostname. +1 for the string
203+
* terminator.
204+
*
205+
* [1] https://www.rfc-editor.org/rfc/rfc1034
206+
*/
207+
#define NSAPI_HOSTNAME_SIZE 64
208+
199209
/** Maximum size of MAC address representation
200210
*/
201211
#define NSAPI_MAC_SIZE 18

variants/OPTA/defines.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
-DFEATURE_BLE=1
4545
-D__FPU_PRESENT=1
4646
-D__MBED__=1
47-
-DMBED_BUILD_TIMESTAMP=1719929630.0019104
47+
-DMBED_BUILD_TIMESTAMP=1720562782.5913384
4848
-D__MBED_CMSIS_RTOS_CM
4949
-DMBED_TICKLESS
5050
-DMBEDTLS_FS_IO

variants/OPTA/libs/libmbed.a

-9 KB
Binary file not shown.

0 commit comments

Comments
 (0)