Merge branch 'master' of epagris.com:epagris/EtherLib
This commit is contained in:
commit
22c260e9dc
@ -1,7 +1,13 @@
|
|||||||
target_sources(
|
cmake_minimum_required(VERSION 3.15)
|
||||||
${CMAKE_PROJECT_NAME}
|
|
||||||
PUBLIC
|
|
||||||
|
|
||||||
|
set(ETHERLIB_TARGET etherlib)
|
||||||
|
|
||||||
|
if (ETHERLIB_TARGET_TAG)
|
||||||
|
set(ETHERLIB_TARGET "${ETHERLIB_TARGET}_${ETHERLIB_TARGET_TAG}")
|
||||||
|
message("Custom EtherLib target: ${ETHERLIB_TARGET}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(ETHERLIB_SRC
|
||||||
apps/http_server.c
|
apps/http_server.c
|
||||||
apps/http_server.h
|
apps/http_server.h
|
||||||
apps/ftp_server.c
|
apps/ftp_server.c
|
||||||
@ -89,3 +95,18 @@ target_sources(
|
|||||||
utils.c
|
utils.c
|
||||||
utils.h
|
utils.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_library(${ETHERLIB_TARGET} STATIC ${ETHERLIB_SRC})
|
||||||
|
target_include_directories(${ETHERLIB_TARGET} PRIVATE ${ETHERLIB_INCLUDES})
|
||||||
|
target_compile_options(${ETHERLIB_TARGET} PRIVATE
|
||||||
|
${ETHERLIB_CPU_PARAMS}
|
||||||
|
-Wall
|
||||||
|
-Wextra
|
||||||
|
#-Wpedantic
|
||||||
|
-Wno-unused-parameter
|
||||||
|
|
||||||
|
$<$<COMPILE_LANGUAGE:ASM>:-x assembler-with-cpp -MMD -MP>
|
||||||
|
$<$<CONFIG:Debug>:-O0 -g3 -ggdb>
|
||||||
|
$<$<CONFIG:Release>:-Og -g0>
|
||||||
|
)
|
||||||
|
target_compile_definitions(${ETHERLIB_TARGET} PRIVATE ${ETHERLIB_COMPILE_DEFS})
|
@ -122,15 +122,16 @@ static ThreadReturnType task_ethintf(ThreadParamType param) {
|
|||||||
} else { // if link is off
|
} else { // if link is off
|
||||||
dhcp_stop(intf->dhcp);
|
dhcp_stop(intf->dhcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print generic message
|
||||||
|
MSG("ETH LINK: %s%s", (ls ? (ANSI_COLOR_BGREEN "UP ") : (ANSI_COLOR_BRED "DOWN\n")), ANSI_COLOR_RESET);
|
||||||
|
|
||||||
|
// print link properties
|
||||||
|
if (ls) {
|
||||||
|
MSG("(%u Mbps, %s duplex)\n", speed, duplex ? "FULL" : "HALF");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// print generic message
|
|
||||||
MSG("ETH LINK: %s%s", (ls ? (ANSI_COLOR_BGREEN "UP ") : (ANSI_COLOR_BRED "DOWN\n")), ANSI_COLOR_RESET);
|
|
||||||
|
|
||||||
// print link properties
|
|
||||||
if (ls) {
|
|
||||||
MSG("(%u Mbps, %s duplex)\n", speed, duplex ? "FULL" : "HALF");
|
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
case ETH_IIE_TRANSMIT_NOTIFY: {
|
case ETH_IIE_TRANSMIT_NOTIFY: {
|
||||||
intf->ioDef->llTxTrigger(intf->ioDef, intf->txQ);
|
intf->ioDef->llTxTrigger(intf->ioDef, intf->txQ);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user