Merge branch 'master' of epagris.com:epagris/EtherLib

This commit is contained in:
Wiesner András 2024-10-06 23:33:56 +02:00
commit 22c260e9dc
2 changed files with 33 additions and 11 deletions

View File

@ -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})

View File

@ -122,7 +122,6 @@ 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 // print generic message
MSG("ETH LINK: %s%s", (ls ? (ANSI_COLOR_BGREEN "UP ") : (ANSI_COLOR_BRED "DOWN\n")), ANSI_COLOR_RESET); MSG("ETH LINK: %s%s", (ls ? (ANSI_COLOR_BGREEN "UP ") : (ANSI_COLOR_BRED "DOWN\n")), ANSI_COLOR_RESET);
@ -131,6 +130,8 @@ static ThreadReturnType task_ethintf(ThreadParamType param) {
if (ls) { if (ls) {
MSG("(%u Mbps, %s duplex)\n", speed, duplex ? "FULL" : "HALF"); 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);