Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 3367c26

Browse files
author
qiutongs
authored
Initial merge of Common IO libraries and tests (#1551)
1 parent 70b046f commit 3367c26

25 files changed

+9284
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
afr_module(INTERFACE)
2+
3+
set(inc_dir "${CMAKE_CURRENT_LIST_DIR}/include")
4+
set(test_dir "${CMAKE_CURRENT_LIST_DIR}/test")
5+
6+
afr_module_sources(
7+
${AFR_CURRENT_MODULE}
8+
INTERFACE
9+
"${inc_dir}/iot_i2c.h"
10+
"${inc_dir}/iot_uart.h"
11+
"${inc_dir}/iot_spi.h"
12+
)
13+
14+
afr_module_include_dirs(
15+
${AFR_CURRENT_MODULE}
16+
INTERFACE "${inc_dir}"
17+
)
18+
19+
afr_module_dependencies(
20+
${AFR_CURRENT_MODULE}
21+
INTERFACE AFR::common_io::mcu_port
22+
)
23+
24+
# Common I/O tests
25+
afr_test_module()
26+
afr_module_sources(
27+
${AFR_CURRENT_MODULE}
28+
INTERFACE
29+
"${test_dir}/iot_test_common_io.c"
30+
"${test_dir}/test_iot_i2c.c"
31+
"${test_dir}/test_iot_uart.c"
32+
"${test_dir}/test_iot_spi.c"
33+
)
34+
35+
afr_module_include_dirs(
36+
${AFR_CURRENT_MODULE}
37+
INTERFACE "${test_dir}"
38+
)
39+
40+
afr_module_dependencies(
41+
${AFR_CURRENT_MODULE}
42+
INTERFACE AFR::common_io
43+
)

0 commit comments

Comments
 (0)