emac targets: fix thread cb type

pull/7364/head
Martin Kojtal 2018-06-29 08:26:20 +01:00
parent df821aa483
commit 4d8baa7451
9 changed files with 16 additions and 16 deletions

View File

@ -149,7 +149,7 @@ private:
void phy_task();
static void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, void *param);
os_thread_t thread_cb;
mbed_rtos_storage_thread_t thread_cb;
osThreadId_t thread; /**< Processing thread */
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */

View File

@ -58,14 +58,14 @@ NUMAKER_EMAC::NUMAKER_EMAC() : thread(0), hwaddr()
{
}
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, os_thread_t *thread_cb)
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, mbed_rtos_storage_thread_t *thread_cb)
{
osThreadAttr_t attr = {0};
attr.name = threadName;
attr.stack_mem = malloc(stacksize);
attr.cb_mem = thread_cb;
attr.stack_size = stacksize;
attr.cb_size = sizeof(os_thread_t);
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
attr.priority = priority;
return osThreadNew(thread, arg, &attr);
}

View File

@ -146,7 +146,7 @@ private:
void phy_task();
static void ethernet_callback(char event, void *param);
os_thread_t thread_cb;
mbed_rtos_storage_thread_t thread_cb;
osThreadId_t thread; /**< Processing thread */
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */

View File

@ -60,14 +60,14 @@ LPC546XX_EMAC::LPC546XX_EMAC() : xTXDCountSem(ENET_TX_RING_LEN, ENET_TX_RING_LEN
{
}
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, os_thread_t *thread_cb)
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, mbed_rtos_storage_thread_t *thread_cb)
{
osThreadAttr_t attr = {0};
attr.name = threadName;
attr.stack_mem = malloc(stacksize);
attr.cb_mem = thread_cb;
attr.stack_size = stacksize;
attr.cb_size = sizeof(os_thread_t);
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
attr.priority = priority;
return osThreadNew(thread, arg, &attr);
}

View File

@ -149,7 +149,7 @@ private:
void phy_task();
static void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, uint8_t channel, void *param);
os_thread_t thread_cb;
mbed_rtos_storage_thread_t thread_cb;
osThreadId_t thread; /**< Processing thread */
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */

View File

@ -169,14 +169,14 @@ ETHMEM_SECTION uint8_t tx_clean_thread_stack[DEFAULT_THREAD_STACKSIZE];
#endif
ETHMEM_SECTION uint8_t phy_thread_stack[DEFAULT_THREAD_STACKSIZE];
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, void *stack_ptr, int stacksize, osPriority_t priority, os_thread_t *thread_cb)
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, void *stack_ptr, int stacksize, osPriority_t priority, mbed_rtos_storage_thread_t *thread_cb)
{
osThreadAttr_t attr = {0};
attr.name = threadName;
attr.stack_mem = stack_ptr;
attr.cb_mem = thread_cb;
attr.stack_size = stacksize;
attr.cb_size = sizeof(os_thread_t);
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
attr.priority = priority;
return osThreadNew(thread, arg, &attr);
}

View File

@ -151,7 +151,7 @@ public:
void update_link_status(bool up);
osThreadId_t RxThread;
os_thread_t RxThread_cb;
mbed_rtos_storage_thread_t RxThread_cb;
rtos::Semaphore TxCleanSem;
private:
@ -176,9 +176,9 @@ private:
uint8_t hwaddr[6];
osThreadId_t TxCleanThread;
os_thread_t TxCleanThread_cb;
mbed_rtos_storage_thread_t TxCleanThread_cb;
osThreadId_t PhyThread;
os_thread_t PhyThread_cb;
mbed_rtos_storage_thread_t PhyThread_cb;
rtos::Mutex TXLockMutex;
rtos::Semaphore xTXDCountSem;

View File

@ -89,14 +89,14 @@ STM32_EMAC::STM32_EMAC()
{
}
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, os_thread_t *thread_cb)
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, mbed_rtos_storage_thread_t *thread_cb)
{
osThreadAttr_t attr = {0};
attr.name = threadName;
attr.stack_mem = malloc(stacksize);
attr.cb_mem = thread_cb;
attr.stack_size = stacksize;
attr.cb_size = sizeof(os_thread_t);
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
attr.priority = priority;
return osThreadNew(thread, arg, &attr);
}

View File

@ -161,10 +161,10 @@ private:
void enable_interrupts();
void disable_interrupts();
os_thread_t thread_cb;
mbed_rtos_storage_thread_t thread_cb;
#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\
|| defined (STM32F779xx)
os_thread_t rmii_watchdog_thread_cb;
mbed_rtos_storage_thread_t rmii_watchdog_thread_cb;
osThreadId_t rmii_watchdog_thread; /**< Watchdog processing thread */
#endif
rtos::Mutex TXLockMutex;/**< TX critical section mutex */