Microchip® Advanced Software Framework

wilc/os/source/os_hook.c File Reference

Copyright (c) 2016-2018 Microchip Technology Inc.

and its subsidiaries.

#include <os/include/os_hook.h>
#include <FreeRTOS.h>
#include <queue.h>
#include <semphr.h>
#include <task.h>
#include <lwip/tcpip.h>

Functions

uint8_t m2m_wifi_handle_events (void *p)
 Synchronous M2M event handler function. More...
 
static void os_hif_task (void *pv)
 HIF thread entry function. More...
 
uint8_t os_hook_dispatch_no_wait (wifi_task_cb handler, void *p)
 Run handler function in the netif thread context and return immediately. More...
 
void os_hook_dispatch_wait (wifi_task_cb handler, struct params_dispatch *p, void *pv)
 Run handler function in the netif thread context and wait for function return. More...
 
void os_hook_init (void)
 Initialize netif thread. More...
 
void os_hook_isr (void)
 Put interrupt request in netif queue for later processing. More...
 
void os_hook_notify (void)
 Release lock to notify calling thread that netif job is done. More...
 
void os_hook_send_start (wifi_task_cb handler, struct params_dispatch *p, void *pv)
 Start WiFi in the netif thread context and wait for function return. More...
 
void os_hook_set_handle (void *task)
 
void wilc_netif_tx_from_queue (hif_msg_t *msg)
 Send pending packets to the WILC under HIF thread context. More...
 

Variables

static uint8_t has_init = 0
 
static xSemaphoreHandle hif_notify_sem
 
xQueueHandle hif_queue = NULL
 Queue used by HIF task. More...
 
xTaskHandle hif_thread
 

static void os_hif_task ( void *  pv)
static
uint8_t os_hook_dispatch_no_wait ( wifi_task_cb  handler,
void *  p 
)

Run handler function in the netif thread context and return immediately.

void os_hook_dispatch_wait ( wifi_task_cb  handler,
struct params_dispatch p,
void *  pv 
)

Run handler function in the netif thread context and wait for function return.

void os_hook_init ( void  )

Initialize netif thread.

Referenced by os_m2m_wifi_init().

void os_hook_isr ( void  )

Put interrupt request in netif queue for later processing.

Referenced by isr().

void os_hook_notify ( void  )

Release lock to notify calling thread that netif job is done.

Referenced by os_m2m_wifi_connect_imp(), os_m2m_wifi_enable_ap_imp(), os_m2m_wifi_init_imp(), and os_m2m_wifi_set_max_tx_rate_imp().

void os_hook_send_start ( wifi_task_cb  handler,
struct params_dispatch p,
void *  pv 
)

Start WiFi in the netif thread context and wait for function return.

Referenced by os_m2m_wifi_init().

void os_hook_set_handle ( void *  task)

Referenced by os_m2m_wifi_init_imp().

void wilc_netif_tx_from_queue ( hif_msg_t msg)

uint8_t has_init = 0
static

Referenced by os_hook_init().

xSemaphoreHandle hif_notify_sem
static
xQueueHandle hif_queue = NULL

Queue used by HIF task.