Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Host controller states

Defines for device state coding.

usb_host_task.jpg
USB Host Task Overview

Macros

#define DEVICE_ADDRESSED   4
 
#define DEVICE_ATTACHED   1
 
#define DEVICE_CONFIGURED   5
 
#define DEVICE_DEFAULT   3
 
#define DEVICE_ERROR   7
 
#define DEVICE_POWERED   2
 
#define DEVICE_READY   6
 
#define DEVICE_SUSPENDED   8
 
#define DEVICE_UNATTACHED   0
 
#define DEVICE_WAIT_RESUME   9
 
#define Host_clear_configured()   (Clr_bits(device_status, 0x04))
 
#define Host_clear_device_ready()   (Clr_bits(device_status, 0x02))
 
#define Host_clear_device_status()   (device_status = 0x00)
 
#define Host_clear_device_supported()   (Clr_bits(device_status, 0x01))
 
#define Host_set_configured()   (Set_bits(device_status, 0x04))
 
#define Host_set_device_ready()   (Set_bits(device_status, 0x02))
 
#define Host_set_device_supported()   (Set_bits(device_status, 0x01))
 
#define Is_host_configured()   (Tst_bits(device_status, 0x04))
 
#define Is_host_device_ready()   (Tst_bits(device_status, 0x02))
 
#define Is_host_device_supported()   (Tst_bits(device_status, 0x01))
 

#define DEVICE_ADDRESSED   4
#define DEVICE_ATTACHED   1
#define DEVICE_CONFIGURED   5
#define DEVICE_DEFAULT   3
#define DEVICE_ERROR   7
#define DEVICE_POWERED   2
#define DEVICE_READY   6
#define DEVICE_SUSPENDED   8
#define DEVICE_UNATTACHED   0
#define DEVICE_WAIT_RESUME   9
#define Host_clear_configured ( )    (Clr_bits(device_status, 0x04))
#define Host_clear_device_ready ( )    (Clr_bits(device_status, 0x02))
#define Host_clear_device_status ( )    (device_status = 0x00)
#define Host_clear_device_supported ( )    (Clr_bits(device_status, 0x01))
#define Host_set_configured ( )    (Set_bits(device_status, 0x04))
#define Host_set_device_ready ( )    (Set_bits(device_status, 0x02))
#define Host_set_device_supported ( )    (Set_bits(device_status, 0x01))
#define Is_host_configured ( )    (Tst_bits(device_status, 0x04))
#define Is_host_device_ready ( )    (Tst_bits(device_status, 0x02))
#define Is_host_device_supported ( )    (Tst_bits(device_status, 0x01))