-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update source code with IOC peripherals and update RTOS to use CMSISv2
- Loading branch information
Showing
22 changed files
with
5,096 additions
and
1,891 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
/** | ||
****************************************************************************** | ||
* @file LwIP/LwIP_TCP_Echo_Server/Inc/ethernetif.h | ||
* @author MCD Application Team | ||
* @brief Header for ethernetif.c module | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* Copyright (c) 2017 STMicroelectronics. | ||
* All rights reserved. | ||
* | ||
* This software is licensed under terms that can be found in the LICENSE file | ||
* in the root directory of this software component. | ||
* If no LICENSE file comes with this software, it is provided AS-IS. | ||
* | ||
****************************************************************************** | ||
*/ | ||
|
||
#ifndef __ETHERNETIF_H__ | ||
#define __ETHERNETIF_H__ | ||
|
||
#include "cmsis_os.h" | ||
#include "lwip/err.h" | ||
#include "lwip/netif.h" | ||
|
||
/* Exported types ------------------------------------------------------------*/ | ||
err_t ethernetif_init(struct netif *netif); | ||
void ethernetif_input(void *argument); | ||
void ethernet_link_thread(void *arguments); | ||
#endif | ||
/* USER CODE BEGIN Header */ | ||
/** | ||
****************************************************************************** | ||
* File Name : ethernetif.h | ||
* Description : This file provides initialization code for LWIP | ||
* middleWare. | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* Copyright (c) 2024 STMicroelectronics. | ||
* All rights reserved. | ||
* | ||
* This software is licensed under terms that can be found in the LICENSE file | ||
* in the root directory of this software component. | ||
* If no LICENSE file comes with this software, it is provided AS-IS. | ||
* | ||
****************************************************************************** | ||
*/ | ||
/* USER CODE END Header */ | ||
|
||
#ifndef __ETHERNETIF_H__ | ||
#define __ETHERNETIF_H__ | ||
|
||
#include "lwip/err.h" | ||
#include "lwip/netif.h" | ||
#include "cmsis_os.h" | ||
|
||
/* Within 'USER CODE' section, code will be kept by default at each generation */ | ||
/* USER CODE BEGIN 0 */ | ||
|
||
/* USER CODE END 0 */ | ||
|
||
/* Exported functions ------------------------------------------------------- */ | ||
err_t ethernetif_init(struct netif *netif); | ||
|
||
void ethernetif_input(void* argument); | ||
void ethernet_link_thread(void* argument ); | ||
|
||
void Error_Handler(void); | ||
u32_t sys_jiffies(void); | ||
u32_t sys_now(void); | ||
|
||
/* USER CODE BEGIN 1 */ | ||
|
||
/* USER CODE END 1 */ | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* USER CODE BEGIN Header */ | ||
/** | ||
****************************************************************************** | ||
* File Name : LWIP.h | ||
* Description : This file provides code for the configuration | ||
* of the LWIP. | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* Copyright (c) 2024 STMicroelectronics. | ||
* All rights reserved. | ||
* | ||
* This software is licensed under terms that can be found in the LICENSE file | ||
* in the root directory of this software component. | ||
* If no LICENSE file comes with this software, it is provided AS-IS. | ||
* | ||
************************************************************************* | ||
*/ | ||
/* USER CODE END Header */ | ||
/* Define to prevent recursive inclusion -------------------------------------*/ | ||
#ifndef __mx_lwip_H | ||
#define __mx_lwip_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Includes ------------------------------------------------------------------*/ | ||
#include "lwip/opt.h" | ||
#include "lwip/mem.h" | ||
#include "lwip/memp.h" | ||
#include "netif/etharp.h" | ||
#include "lwip/dhcp.h" | ||
#include "lwip/netif.h" | ||
#include "lwip/timeouts.h" | ||
#include "ethernetif.h" | ||
|
||
/* Includes for RTOS ---------------------------------------------------------*/ | ||
#if WITH_RTOS | ||
#include "lwip/tcpip.h" | ||
#endif /* WITH_RTOS */ | ||
|
||
/* USER CODE BEGIN 0 */ | ||
|
||
/* USER CODE END 0 */ | ||
|
||
/* Global Variables ----------------------------------------------------------*/ | ||
extern ETH_HandleTypeDef heth; | ||
|
||
/* LWIP init function */ | ||
void MX_LWIP_Init(void); | ||
|
||
#if !WITH_RTOS | ||
/* USER CODE BEGIN 1 */ | ||
/* Function defined in lwip.c to: | ||
* - Read a received packet from the Ethernet buffers | ||
* - Send it to the lwIP stack for handling | ||
* - Handle timeouts if NO_SYS_NO_TIMERS not set | ||
*/ | ||
void MX_LWIP_Process(void); | ||
|
||
/* USER CODE END 1 */ | ||
#endif /* WITH_RTOS */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /*__ mx_lwip_H */ | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
/** | ||
* @} | ||
*/ |
Oops, something went wrong.