This file manages the host controller, the host enumeration process and the suspend/resume host requests.
Definition in file usb_host_task.c.
#include "conf_usb.h"
#include "FreeRTOS.h"
#include "task.h"
#include "usb_drv.h"
#include "usb_task.h"
#include "usb_host_enum.h"
#include "usb_host_task.h"
Go to the source code of this file.
Functions | |
Status_t | host_get_data (U8 pipe, U16 *nb_data, void *ptr_buf) |
This function receives nb_data bytes pointed to by ptr_buf on the specified pipe. | |
Bool | host_get_data_interrupt (U8 pipe, U16 nb_data, void *ptr_buf, Pipe_handler *handler) |
This function receives nb_data bytes pointed to by ptr_buf on the specified pipe. | |
Status_t | host_send_data (U8 pipe, U16 nb_data, const void *ptr_buf) |
This function sends nb_data bytes pointed to by ptr_buf on the specified pipe. | |
Bool | host_send_data_interrupt (U8 pipe, U16 nb_data, const void *ptr_buf, Pipe_handler *handler) |
This function sends nb_data bytes pointed to by ptr_buf on the specified pipe. | |
Bool | is_any_interrupt_pipe_active (void) |
void | reset_it_pipe_str (void) |
void | usb_host_task (void *pvParameters) |
Entry point of the USB host management. | |
void | usb_host_task_init (void) |
This function initializes the USB host controller. | |
void | usb_pipe_interrupt (U8 pipe) |
USB pipe interrupt subroutine. | |
Variables | |
U8 | data_stage [SIZEOF_DATA_STAGE] |
Public: U8 data_stage[SIZEOF_DATA_STAGE] Internal RAM buffer for USB data stage content This buffer is required to setup host enumeration process It contains the device descriptors received. | |
volatile U8 | device_state |
Public: U8 device_state Its value represents the current state of the device connected to the USB host controller Value can be:
| |
volatile U8 | device_status |
volatile Bool | g_sav_int_sof_enable |
volatile S_pipe_int | it_pipe_str [MAX_PEP_NB] |
static const char | log_device_connected [] = "Device connected\n" |
static const char | log_device_enumerated [] = "Device enumerated\n" |
static const char | log_unsupported_device [] = "Unsupported device\n" |
static const char | log_usb_resumed [] = "USB resumed\n" |
static const char | log_usb_suspended [] = "USB suspended\n" |
volatile Bool | request_resume |
static U16 | sof_cnt |
As internal host Start-of-Frame counter. | |
xTaskHandle | usb_host_tsk = NULL |
Handle to the USB Host task. | |
volatile S_usb_setup_data | usb_request |
For control requests management over control pipe. |
volatile Bool g_sav_int_sof_enable |
Definition at line 78 of file usb_host_task.c.
Referenced by host_get_data_interrupt(), host_send_data_interrupt(), usb_general_interrupt_non_naked(), and usb_pipe_interrupt().
volatile S_pipe_int it_pipe_str[MAX_PEP_NB] |
Definition at line 79 of file usb_host_task.c.
const char log_device_connected[] = "Device connected\n" [static] |
const char log_device_enumerated[] = "Device enumerated\n" [static] |
const char log_unsupported_device[] = "Unsupported device\n" [static] |
const char log_usb_resumed[] = "USB resumed\n" [static] |
const char log_usb_suspended[] = "USB suspended\n" [static] |
U16 sof_cnt [static] |
As internal host Start-of-Frame counter.
Definition at line 118 of file usb_host_task.c.
Referenced by device_template_task(), device_template_task_init(), host_sof_action(), host_template_task(), host_template_task_init(), usb_host_task(), usb_host_task_init(), and usb_sof_action().
xTaskHandle usb_host_tsk = NULL |
Handle to the USB Host task.
Definition at line 122 of file usb_host_task.c.
Referenced by usb_host_task_init(), and usb_task().