forked from xuos/xiuos
powerlink: fix msleep()
This commit is contained in:
parent
b0e6e4fe49
commit
4e4d6ce223
|
@ -29,11 +29,11 @@ $(LIBOPLKCN):
|
|||
$(call oplk_build,$(LIBOPLK_BUILD_DIR))
|
||||
|
||||
.PHONY: $(OPLK_DEMO_MN_CONSOLE)
|
||||
$(OPLK_DEMO_MN_CONSOLE):
|
||||
$(OPLK_DEMO_MN_CONSOLE): ${LIBOPLKMN}
|
||||
$(call oplk_build,$(OPLK_DEMO_MN_CONSOLE_BUILD_DIR))
|
||||
|
||||
.PHONY: $(OPLK_DEMO_CN_CONSOLE)
|
||||
$(OPLK_DEMO_CN_CONSOLE):
|
||||
$(OPLK_DEMO_CN_CONSOLE): ${LIBOPLKCN}
|
||||
$(call oplk_build,$(OPLK_DEMO_CN_CONSOLE_BUILD_DIR))
|
||||
|
||||
LIBOPLKMN := $(LIBOPLKMN:$(CUR_DIR)/%=%)
|
||||
|
|
|
@ -195,37 +195,7 @@ milliseconds has elapsed.
|
|||
//------------------------------------------------------------------------------
|
||||
void system_msleep(unsigned int milliSeconds_p)
|
||||
{
|
||||
struct timeval timeout;
|
||||
fd_set readFds;
|
||||
int maxFd;
|
||||
int selectRetVal;
|
||||
unsigned int seconds;
|
||||
unsigned int microSeconds;
|
||||
|
||||
// initialize file descriptor set
|
||||
maxFd = 0 + 1;
|
||||
FD_ZERO(&readFds);
|
||||
|
||||
// Calculate timeout values
|
||||
seconds = milliSeconds_p / 1000;
|
||||
microSeconds = (milliSeconds_p - (seconds * 1000)) * 1000;
|
||||
|
||||
// initialize timeout value
|
||||
timeout.tv_sec = seconds;
|
||||
timeout.tv_usec = microSeconds;
|
||||
|
||||
selectRetVal = select(maxFd, &readFds, NULL, NULL, &timeout);
|
||||
switch (selectRetVal)
|
||||
{
|
||||
case 0: // select timeout occurred, no packet received
|
||||
break;
|
||||
|
||||
case -1: // select error occurred
|
||||
break;
|
||||
|
||||
default: // packet available for receive
|
||||
break;
|
||||
}
|
||||
MdelayKTask(milliSeconds_p);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USE_SYNCTHREAD)
|
||||
|
@ -387,7 +357,7 @@ static void* firmwareManagerThread(void* arg)
|
|||
{
|
||||
pInstance->pfnFwmCb();
|
||||
|
||||
DelayKTask(pInstance->interval * 1000);
|
||||
MdelayKTask(pInstance->interval * 1000);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
3
APP_Framework/Framework/connection/industrial_ethernet/openPOWERLINK/stack/lib/.gitignore
vendored
Normal file
3
APP_Framework/Framework/connection/industrial_ethernet/openPOWERLINK/stack/lib/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
.*
|
||||
!.gitignore
|
|
@ -137,7 +137,7 @@ milliseconds has elapsed.
|
|||
//------------------------------------------------------------------------------
|
||||
void target_msleep(UINT32 milliSeconds_p)
|
||||
{
|
||||
DelayKTask(milliSeconds_p);
|
||||
MdelayKTask(milliSeconds_p);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
@ -177,7 +177,7 @@ tOplkError edrv_init(const tEdrvInitParam* pEdrvInitParam_p)
|
|||
return kErrorEdrvInit;
|
||||
}
|
||||
|
||||
edrvInstance_l.sock = open(ETHERNET_UART_NAME, O_RDWR);
|
||||
edrvInstance_l.sock = open("/dev/uart2_dev2", O_RDWR);
|
||||
if (edrvInstance_l.sock < 0)
|
||||
{
|
||||
DEBUG_LVL_ERROR_TRACE("%s() cannot open socket. Error = %s\n", __func__, strerror(errno));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
current_path=$(pwd)
|
||||
xizi_path=Ubiquitous/XiZi
|
||||
board=cortex-m4-emulator
|
||||
board=ok1052-c
|
||||
qemu_machine=netduinoplus2
|
||||
|
||||
run_in_docker() {
|
||||
|
|
Loading…
Reference in New Issue