- Notifications
You must be signed in to change notification settings - Fork1k
Stm32 ethernet lib#38
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
a5c56b71bd6f3ed8a765852983676763911d0b5d2005f707aef961473cbfe2dd2023c4cabab9b5a48f79e4515a3c741a80656680bf3526cb17535b20442f1f80b70aaad53a28bb77db0File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -45,6 +45,9 @@ int main( void ) | ||
| for (;;) | ||
| { | ||
| // Define by Ethernet library. It is defined as __weak. | ||
| stm32_eth_scheduler(); | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. why doing it here in the core rather than in the loop ? Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This is the idle task for handle timer and data reception. It must be called as much as possible. Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. The same would happen if you put this call in the loop, so this does not answer my question. Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This function is defined as weak in ethernet.c, when the library NativeEthernet is not included, this function is empty. Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. OK - this is maybe acceptable if this has no impact when the library is not included. This may be explained as well in the comments Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Will this break if freertos or the arduino Scheduler library is used in combination with this library? Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I don't know because I didn't study the LwIP stack in case of an "operating system". The NativeEthernet is oriented single threaded core. I refer you to the LwIP wiki or freertos example using the LwIP stack. | ||
| loop(); | ||
| if (serialEventRun) serialEventRun(); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /** | ||
| ****************************************************************************** | ||
| * @file ethernet.h | ||
| * @author WI6LABS | ||
| * @version V1.0.0 | ||
| * @date 14-June-2017 | ||
| * @brief Header for ethernet background task for LwIP stack. | ||
| ****************************************************************************** | ||
| * @attention | ||
| * | ||
| * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> | ||
| * | ||
| * Redistribution and use in source and binary forms, with or without modification, | ||
| * are permitted provided that the following conditions are met: | ||
| * 1. Redistributions of source code must retain the above copyright notice, | ||
| * this list of conditions and the following disclaimer. | ||
| * 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| * this list of conditions and the following disclaimer in the documentation | ||
| * and/or other materials provided with the distribution. | ||
| * 3. Neither the name of STMicroelectronics nor the names of its contributors | ||
| * may be used to endorse or promote products derived from this software | ||
| * without specific prior written permission. | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
| * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| * | ||
| ****************************************************************************** | ||
| */ | ||
| /* Define to prevent recursive inclusion -------------------------------------*/ | ||
| #ifndef __ETHERNET_H | ||
| #define __ETHERNET_H | ||
| /* Includes ------------------------------------------------------------------*/ | ||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
| /* Exported types ------------------------------------------------------------*/ | ||
| /* Exported constants --------------------------------------------------------*/ | ||
| /* Exported macro ------------------------------------------------------------*/ | ||
| /* Exported functions ------------------------------------------------------- */ | ||
| /* This function is defined by the NativeEthernet library and it is used as | ||
| background task inside the main loop. */ | ||
| __weak void stm32_eth_scheduler(void) | ||
| { | ||
| /* NOTE : This function should not be modified. It is defined in the Ethernet | ||
| library. | ||
| */ | ||
| } | ||
| void stm32_eth_scheduler(void); | ||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
| #endif /* __ETHERNET_H */ | ||
| /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
Uh oh!
There was an error while loading.Please reload this page.