Microchip® Advanced Software Framework

usb_dual.c File Reference

SAM USB Dual Role driver file.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>
#include "usb_dual.h"
#include <udc.h>

Macros

#define _usb_is_id_device()   port_pin_get_input_level(USB_ID_PIN)
 
#define uhc_start(void)
 
#define uhc_stop(b_id_stop)
 

Functions

void usb_dual_disable (void)
 Deinitialize the dual role driver. More...
 
bool usb_dual_enable (void)
 Initialize the USB peripheral and set right role according to ID pin. More...
 
USB ID PAD management
static void usb_id_handler (void)
 USB ID pin change handler. More...
 
static void usb_id_config (void)
 USB ID pin configuration. More...
 

Variables

static bool _initialized = false
 

#define _usb_is_id_device ( )    port_pin_get_input_level(USB_ID_PIN)

Referenced by usb_dual_enable(), and usb_id_handler().

#define uhc_start (   void)

Referenced by usb_dual_enable(), and usb_id_handler().

#define uhc_stop (   b_id_stop)

Referenced by usb_id_handler().

static void usb_id_handler ( void  )
static

bool _initialized = false
static