Skip to content

Commit 485bdb7

Browse files
committed
Add back mbedtls_xxx for some STM32 targets
Mark them _nkweak so they will be ignored if methods are available from mbedtls port files.
1 parent 16ad0f8 commit 485bdb7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ void nf_debug(void *ctx, int level, const char *file, int line, const char *str)
4545
// this is a lightheight version with just the debug messages
4646
debug_printf("%s", str);
4747
}
48-
/*
49-
int net_would_block(const mbedtls_net_context *ctx)
48+
49+
__nfweak int net_would_block(const mbedtls_net_context *ctx)
5050
{
5151
//
5252
// Never return 'WOULD BLOCK' on a non-blocking socket
@@ -70,7 +70,7 @@ int net_would_block(const mbedtls_net_context *ctx)
7070
return (0);
7171
}
7272

73-
int mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
73+
__nfweak int mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
7474
{
7575
int32_t ret;
7676
int32_t fd = ((mbedtls_net_context *)ctx)->fd;
@@ -105,7 +105,7 @@ int mbedtls_net_recv(void *ctx, unsigned char *buf, size_t len)
105105
return ret;
106106
}
107107

108-
int mbedtls_net_send(void *ctx, const unsigned char *buf, size_t len)
108+
__nfweak int mbedtls_net_send(void *ctx, const unsigned char *buf, size_t len)
109109
{
110110
int32_t ret;
111111
int fd = ((mbedtls_net_context *)ctx)->fd;
@@ -140,7 +140,7 @@ int mbedtls_net_send(void *ctx, const unsigned char *buf, size_t len)
140140
return ret;
141141
}
142142

143-
int mbedtls_net_recv_timeout(void *ctx, unsigned char *buf, size_t len, uint32_t timeout)
143+
__nfweak int mbedtls_net_recv_timeout(void *ctx, unsigned char *buf, size_t len, uint32_t timeout)
144144
{
145145
int ret;
146146
struct timeval tv;
@@ -180,7 +180,7 @@ int mbedtls_net_recv_timeout(void *ctx, unsigned char *buf, size_t len, uint32_t
180180
}
181181

182182
// Gracefully closes the connection
183-
void mbedtls_net_free(mbedtls_net_context *ctx)
183+
__nfweak void mbedtls_net_free(mbedtls_net_context *ctx)
184184
{
185185
if (ctx->fd == -1)
186186
return;
@@ -190,7 +190,6 @@ void mbedtls_net_free(mbedtls_net_context *ctx)
190190

191191
ctx->fd = -1;
192192
}
193-
*/
194193

195194
// get Unix Epoch time from HAL SystemTime
196195
time_t nf_get_unix_epoch()

targets/ESP32/ESP32_P4/nanoCLR/nanoFramework.Graphics/Spi_To_TouchPanel.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#ifndef SPI_TO_TOUCHPANEL_CPP
99
#define SPI_TO_TOUCHPANEL_CPP
10+
1011
#include "nanoCLR_Types.h"
1112
#include <nanoPAL.h>
1213
#include <target_platform.h>
@@ -34,4 +35,4 @@ CLR_UINT8 *TouchInterface::Write_Read(
3435
return 0;
3536
}
3637

37-
#endif // SPI_TO_TOUCHPANEL_H
38+
#endif // SPI_TO_TOUCHPANEL_CPP

0 commit comments

Comments
 (0)