mirror of
https://github.com/OpenEtherCATsociety/SOEM.git
synced 2026-09-26 20:47:18 +08:00
Added osal_task creation via task spwan, added fec driver for Freescale MAC FEC/ENET
Added osal_task creation via task spwan, Added fec driver for Freescale MAC FEC/ENET
This commit is contained in:
@@ -129,3 +129,32 @@ boolean osal_timer_is_expired (osal_timert * self)
|
||||
return is_not_yet_expired == false;
|
||||
}
|
||||
|
||||
void *osal_malloc(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void osal_free(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
int osal_thread_create(void *thandle, int stacksize, void *func, void *param)
|
||||
{
|
||||
thandle = task_spawn ("worker", func, 6,stacksize, param);
|
||||
if(!thandle)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param)
|
||||
{
|
||||
thandle = task_spawn ("worker_rt", func, 15 ,stacksize, param);
|
||||
if(!thandle)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
||||
/******************************************************************************
|
||||
* * *** ***
|
||||
* *** *** ***
|
||||
* *** **** ********** *** ***** *** **** *****
|
||||
* ********* ********** *** ********* ************ *********
|
||||
* **** *** *** *** *** **** ***
|
||||
* *** *** ****** *** *********** *** **** *****
|
||||
* *** *** ****** *** ************* *** **** *****
|
||||
* *** **** **** *** *** *** **** ***
|
||||
* *** ******* ***** ************** ************* *********
|
||||
* *** ***** *** ******* ** ** ****** *****
|
||||
* t h e r e a l t i m e t a r g e t e x p e r t s
|
||||
*
|
||||
* http://www.rt-labs.com
|
||||
* Copyright (C) 2007. rt-labs AB, Sweden. All rights reserved.
|
||||
*------------------------------------------------------------------------------
|
||||
* $Id: fec_ecat.h 91 2014-04-02 13:32:29Z rtlfrm $
|
||||
*------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup fec EtherCat Ethernet MAC driver for Frescale K60 SoCs.
|
||||
*
|
||||
* \{
|
||||
*/
|
||||
|
||||
#ifndef FEC_H
|
||||
#define FEC_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct fec_mac_address
|
||||
{
|
||||
uint8_t octet[6];
|
||||
} fec_mac_address_t;
|
||||
|
||||
int fec_ecat_init (const fec_mac_address_t * mac_address, bool phy_loopback_mode);
|
||||
|
||||
int fec_ecat_send (const void *payload, size_t tot_len);
|
||||
|
||||
int fec_ecat_recv (void * buffer, size_t buffer_length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FEC_H */
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
Reference in New Issue
Block a user