-
Notifications
You must be signed in to change notification settings - Fork 163
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
FreeRTOS_GetEMACTaskHandle function added #1178
Conversation
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
… for STM32H7xx devices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @keremzorer, thank you for your interest in FreeRTOS+TCP.
You are trying to add two new features:
-
A macro
ipconfigEMAC_TASK_HOOK()
, which will be called during every loop in the functionprvEMACHandlerTask()
. -
With the new function
FreeRTOS_GetEMACTaskHandle()
, you want to give read-only access to the variable that stores the task handle:xEMACTaskHandle
.
I'd like to mention a few things:
- When you introduce a new global function, it needs a prototype in one of the header files.
- When you add a macro, we normally give it a safe default value in
FreeRTOSIPConfigDefaults.h
.
Every macro must be defined. The code will never use #ifdef
, only #if(MACRO)
.
Mind you that a user can include multiple network interfaces. However, your function and macro seem to expect a single interface.
If it is really important, we could add two new properties ( member functions ) to the type NetworkInterface_t
. By default the function pointers will be set to NULL, which means: not implemented.
@keremzorer Wondering whats the use case of exposing the EMAC task handle? |
As you mentioned, ipconfigEMAC_TASK_HOOK functionality already merged last week. I would like to add FreeRTOS_GetEMACTaskHandle function that gives the task handle for application layer, so as you said, it needs a prototype in NetworkInterface.h file. I can fix it. By getting task handle, I can easily trace wheter EMAC-Task works properly or not. Therefore, I would like to add for STM32H7xx devices. That's why I added and created pull request. |
Add FreeRTOS_GetEMACTaskHandle Function for STM32H7xx Devices
Description
Added the FreeRTOS_GetEMACTaskHandle function for STM32H7xx devices. This function provides access to the EMACTaskHandle for managing the Ethernet MAC task within the FreeRTOS environment.
Test Steps
Checklist:
Related Issue
N/A
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.