Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for RPi-Pico time function and build configuration #439

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RPi-Pico/config/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H

#define WOLFSSL_AUTOSAR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaulting to have WOLFSSL_AUTOSAR on here is odd? Why have it enabled? The other time changes in this pull request look good though.


#ifdef __cplusplus
extern "C"
{
#endif

#include <stdio.h>
#include <time.h>
#define TARGET_EMBEDDED

extern time_t myTime(time_t *);
Expand Down
File renamed without changes.
11 changes: 8 additions & 3 deletions RPi-Pico/src/bench_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ int main(int argc, char **argv)
#include <time.h>
time_t myTime(time_t *t)
{
*t = (((2023 - 1970) * 12 + 8) * 30 * 24 * 60 * 60);
return *t;
}
time_t t_ret = (((2023 - 1970) * 365 + (8 * 30)) * 24 * 60 * 60);

if (t != NULL) {
*t = t_ret;
}

return t_ret;
}
11 changes: 8 additions & 3 deletions RPi-Pico/src/test_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ int main(int argc, char **argv)
#include <time.h>
time_t myTime(time_t *t)
{
*t = (((2023 - 1970) * 12 + 8) * 30 * 24 * 60 * 60);
return *t;
}
time_t t_ret = (((2023 - 1970) * 365 + (8 * 30)) * 24 * 60 * 60);

if (t != NULL) {
*t = t_ret;
}

return t_ret;
}
11 changes: 8 additions & 3 deletions RPi-Pico/src/tlsClient_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ void lwip_example_app_platform_assert(const char *msg, int line, const char *fil
#include <time.h>
time_t myTime(time_t *t)
{
*t = (((2023 - 1970) * 365 + (8 * 30)) * 24 * 60 * 60);
return *t;
}
time_t t_ret = (((2023 - 1970) * 365 + (8 * 30)) * 24 * 60 * 60);

if (t != NULL) {
*t = t_ret;
}

return t_ret;
}