Skip to content

Commit af8ab49

Browse files
committed
Avoid compilation if target doesn't support EMAC
1 parent 99e4f22 commit af8ab49

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/* Copyright (c) 2017 ARM Limited
1+
/* Copyright (c) 2017-2019 ARM Limited
2+
* Copyright (c) 2017-2019 STMicroelectronics
23
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,6 +15,8 @@
1415
* limitations under the License.
1516
*/
1617

18+
#if DEVICE_EMAC
19+
1720
#include <stdlib.h>
1821

1922
#include "cmsis_os.h"
@@ -1035,3 +1038,5 @@ void HAL_ETH_MACErrorCallback(ETH_HandleTypeDef *heth)
10351038
"Error from ethernet HAL (HAL_ETH_MACErrorCallback)\n");
10361039
}
10371040
#endif // ETH_IP_VERSION_V2
1041+
1042+
#endif /* DEVICE_EMAC */

0 commit comments

Comments
 (0)