mirror of https://github.com/ARMmbed/mbed-os.git
emac targets: fix thread cb type
parent
df821aa483
commit
4d8baa7451
|
@ -149,7 +149,7 @@ private:
|
||||||
void phy_task();
|
void phy_task();
|
||||||
static void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, void *param);
|
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 */
|
osThreadId_t thread; /**< Processing thread */
|
||||||
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
||||||
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */
|
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */
|
||||||
|
|
|
@ -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};
|
osThreadAttr_t attr = {0};
|
||||||
attr.name = threadName;
|
attr.name = threadName;
|
||||||
attr.stack_mem = malloc(stacksize);
|
attr.stack_mem = malloc(stacksize);
|
||||||
attr.cb_mem = thread_cb;
|
attr.cb_mem = thread_cb;
|
||||||
attr.stack_size = stacksize;
|
attr.stack_size = stacksize;
|
||||||
attr.cb_size = sizeof(os_thread_t);
|
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
|
||||||
attr.priority = priority;
|
attr.priority = priority;
|
||||||
return osThreadNew(thread, arg, &attr);
|
return osThreadNew(thread, arg, &attr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ private:
|
||||||
void phy_task();
|
void phy_task();
|
||||||
static void ethernet_callback(char event, void *param);
|
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 */
|
osThreadId_t thread; /**< Processing thread */
|
||||||
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
||||||
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */
|
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */
|
||||||
|
|
|
@ -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};
|
osThreadAttr_t attr = {0};
|
||||||
attr.name = threadName;
|
attr.name = threadName;
|
||||||
attr.stack_mem = malloc(stacksize);
|
attr.stack_mem = malloc(stacksize);
|
||||||
attr.cb_mem = thread_cb;
|
attr.cb_mem = thread_cb;
|
||||||
attr.stack_size = stacksize;
|
attr.stack_size = stacksize;
|
||||||
attr.cb_size = sizeof(os_thread_t);
|
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
|
||||||
attr.priority = priority;
|
attr.priority = priority;
|
||||||
return osThreadNew(thread, arg, &attr);
|
return osThreadNew(thread, arg, &attr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ private:
|
||||||
void phy_task();
|
void phy_task();
|
||||||
static void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, uint8_t channel, void *param);
|
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 */
|
osThreadId_t thread; /**< Processing thread */
|
||||||
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
||||||
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */
|
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */
|
||||||
|
|
|
@ -169,14 +169,14 @@ ETHMEM_SECTION uint8_t tx_clean_thread_stack[DEFAULT_THREAD_STACKSIZE];
|
||||||
#endif
|
#endif
|
||||||
ETHMEM_SECTION uint8_t phy_thread_stack[DEFAULT_THREAD_STACKSIZE];
|
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};
|
osThreadAttr_t attr = {0};
|
||||||
attr.name = threadName;
|
attr.name = threadName;
|
||||||
attr.stack_mem = stack_ptr;
|
attr.stack_mem = stack_ptr;
|
||||||
attr.cb_mem = thread_cb;
|
attr.cb_mem = thread_cb;
|
||||||
attr.stack_size = stacksize;
|
attr.stack_size = stacksize;
|
||||||
attr.cb_size = sizeof(os_thread_t);
|
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
|
||||||
attr.priority = priority;
|
attr.priority = priority;
|
||||||
return osThreadNew(thread, arg, &attr);
|
return osThreadNew(thread, arg, &attr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ public:
|
||||||
void update_link_status(bool up);
|
void update_link_status(bool up);
|
||||||
|
|
||||||
osThreadId_t RxThread;
|
osThreadId_t RxThread;
|
||||||
os_thread_t RxThread_cb;
|
mbed_rtos_storage_thread_t RxThread_cb;
|
||||||
rtos::Semaphore TxCleanSem;
|
rtos::Semaphore TxCleanSem;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -176,9 +176,9 @@ private:
|
||||||
uint8_t hwaddr[6];
|
uint8_t hwaddr[6];
|
||||||
|
|
||||||
osThreadId_t TxCleanThread;
|
osThreadId_t TxCleanThread;
|
||||||
os_thread_t TxCleanThread_cb;
|
mbed_rtos_storage_thread_t TxCleanThread_cb;
|
||||||
osThreadId_t PhyThread;
|
osThreadId_t PhyThread;
|
||||||
os_thread_t PhyThread_cb;
|
mbed_rtos_storage_thread_t PhyThread_cb;
|
||||||
rtos::Mutex TXLockMutex;
|
rtos::Mutex TXLockMutex;
|
||||||
rtos::Semaphore xTXDCountSem;
|
rtos::Semaphore xTXDCountSem;
|
||||||
|
|
||||||
|
|
|
@ -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};
|
osThreadAttr_t attr = {0};
|
||||||
attr.name = threadName;
|
attr.name = threadName;
|
||||||
attr.stack_mem = malloc(stacksize);
|
attr.stack_mem = malloc(stacksize);
|
||||||
attr.cb_mem = thread_cb;
|
attr.cb_mem = thread_cb;
|
||||||
attr.stack_size = stacksize;
|
attr.stack_size = stacksize;
|
||||||
attr.cb_size = sizeof(os_thread_t);
|
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
|
||||||
attr.priority = priority;
|
attr.priority = priority;
|
||||||
return osThreadNew(thread, arg, &attr);
|
return osThreadNew(thread, arg, &attr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,10 +161,10 @@ private:
|
||||||
void enable_interrupts();
|
void enable_interrupts();
|
||||||
void disable_interrupts();
|
void disable_interrupts();
|
||||||
|
|
||||||
os_thread_t thread_cb;
|
mbed_rtos_storage_thread_t thread_cb;
|
||||||
#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\
|
#if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx)\
|
||||||
|| defined (STM32F779xx)
|
|| 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 */
|
osThreadId_t rmii_watchdog_thread; /**< Watchdog processing thread */
|
||||||
#endif
|
#endif
|
||||||
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
|
||||||
|
|
Loading…
Reference in New Issue