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

Wifi begin(), beginAP() and end() functions #52

Merged
merged 8 commits into from
Jan 29, 2025
Merged

Conversation

jaenrig-ifx
Copy link
Member

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

  • Modified main.c to run under RTOS (required by WiFi libs).
  • Added WiFi.begin(), WiFi.beginAP() and WiFi.end() functions (Test in PR Wifi begin tests arduino-core-tests#8).
  • Updated mtb-libs.a static library.
  • Updated reference to mtb-integration and arduino-core-tests submodules.

Copy link

@IFX-Anusha IFX-Anusha left a comment

Choose a reason for hiding this comment

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

looks good!

#include "time.h"

#define ARDUINO_MAIN_TASK_STACK_SIZE (4096u)
#define ARDUINO_MAIN_TASK_PRIORITY (2u)

Choose a reason for hiding this comment

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

How is the priority assigned?

Copy link
Member Author

Choose a reason for hiding this comment

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

A bit arbitrary. In principle this is the main thread, so this should have a high prio. But not necessarily the highest, as the threads from lwip need to take over (some have 0 prio), and they are not necessarily permanent.
But the thread config is not yet very thoughtfully dimensioned 😅

libraries/WiFi/library.properties Outdated Show resolved Hide resolved
libraries/WiFi/src/WiFi.cpp Show resolved Hide resolved
*/
typedef enum {
WL_NO_SHIELD = 255,
WL_NO_MODULE = 255,
Copy link
Collaborator

@ramya-subramanyam ramya-subramanyam Jan 29, 2025

Choose a reason for hiding this comment

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

Any reason to keep WL_NO_SHIELD and WL_NO_MODULE both = 255?

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently, I just copied the same enums as in the rest of the WiFi Arduino libs.
Given that there is no interface contract standard API for WiFi (as the ArduinoCore-API), I agree it is a good idea to remove them.
If the cy libs has some return code which means "no comm with the transciever" we can map to that ones. Otherwise they will be removed.

return beginAP(ssid, passphrase, 1);
}

uint8_t WiFiClass::beginAP(const char *ssid, const char* passphrase, uint8_t channel) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The documentation for APIs will be added later?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think this should be in our RTD docs as exhale-doxygen generated.

Copy link
Collaborator

@ramya-subramanyam ramya-subramanyam left a comment

Choose a reason for hiding this comment

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

Perfect!👍🙂

@jaenrig-ifx jaenrig-ifx merged commit 5bf2fe2 into wifi Jan 29, 2025
10 of 12 checks passed
@jaenrig-ifx jaenrig-ifx deleted the wifi-net-begin branch January 29, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants