Skip to content

Commit 56e84ee

Browse files
committed
samples: an example of supporting multiple version
Just a sample. Signed-off-by: Yong Cong Sin <[email protected]>
1 parent 584c6c0 commit 56e84ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

boards/arm/arty/board.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
6+
#include <version.h>
77
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
88
#include <zephyr/device.h>
99
#include <zephyr/devicetree.h>
@@ -60,7 +60,11 @@ bool board_daplink_is_fitted(void)
6060
return !NVIC_GetPendingIRQ(DT_IRQN(DAPLINK_QSPI_MUX_NODE));
6161
}
6262

63+
#if ZEPHYR_VERSION_CODE < ZEPHYR_VERSION(3, 4 , 0)
64+
static int board_init(const struct device *arg)
65+
#else
6366
static int board_init(void)
67+
#endif
6468
{
6569

6670
/*

0 commit comments

Comments
 (0)