Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USB Device Interface (UDI) for Personal Healthcare

Device Class (PHDC)

Common APIs used by high level application to use this USB class.

Modules

 
 Interface with USB Device Core (UDC)
 Structures and functions required by UDC.
 
 Implementation of UDI PHDC
 Class internal implementation.
 
 USB interface descriptors
 The following structures provide predefined USB interface descriptors.
 

Data Structures

struct  udi_phdc_metadata_t
 

Functions

bool udi_phdc_senddata (udi_phdc_metadata_t *metadata, void(*callback)(uint16_t))
 Send metadata to USB host. More...
 
void udi_phdc_senddata_abort (void)
 Abort of send metadata to USB host. More...
 
bool udi_phdc_waitdata (udi_phdc_metadata_t *metadata, void(*callback)(bool, uint16_t))
 Wait metadata from USB host. More...
 

Variables

usb_phdc_classfnct_desc_t udi_phdc_desc_t::classfnct
 
usb_ep_desc_t udi_phdc_desc_t::ep_bulk_in
 
usb_ep_desc_t udi_phdc_desc_t::ep_bulk_out
 
usb_ep_desc_t udi_phdc_desc_t::ep_int_in
 
udi_phdc_fnctext_desc_t udi_phdc_desc_t::fnctext
 
usb_phdc_fnctext_desc_t udi_phdc_fnctext_desc_t::header
 
usb_iface_desc_t udi_phdc_desc_t::iface
 
uint8_t * udi_phdc_metadata_t::metadata
 
uint16_t udi_phdc_metadata_t::metadata_size
 
uint8_t udi_phdc_metadata_t::opaque_size
 
uint8_t * udi_phdc_metadata_t::opaquedata
 
uint8_t udi_phdc_metadata_t::qos
 
usb_phdc_qos_desc_t udi_phdc_desc_t::qos_bulk_in
 
usb_phdc_qos_desc_t udi_phdc_desc_t::qos_bulk_out
 
usb_phdc_qos_desc_t udi_phdc_desc_t::qos_int_in
 
le16_t udi_phdc_fnctext_desc_t::wDevSpecializations [sizeof(tmp_wDevSpecializations)/2]
 

bool udi_phdc_senddata ( udi_phdc_metadata_t metadata,
void(*)(uint16_t)  callback 
)

Send metadata to USB host.

Parameters
metadataInformation about metadata to send
callbackFunction to call at the end of transfer.
Returns
1 if function was successfully done, otherwise 0.

References callback, cpu_irq_restore(), cpu_irq_save(), metadata, udi_phdc_metadata_t::qos, udi_phdc_in_trans, udi_phdc_preample_feature, UDI_PHDC_QOS_IN, udi_phdc_send_metadata(), udi_phdc_send_preamplemsg(), and USB_PHDC_QOS_LOW_GOOD.

Referenced by ieee11073_decode_metadata(), ieee11073_send_association(), and ieee11073_send_mesure().

void udi_phdc_senddata_abort ( void  )

Abort of send metadata to USB host.

References UDI_PHDC_EP_BULK_IN, UDI_PHDC_EP_INTERRUPT_IN, udi_phdc_in_trans, and USB_PHDC_QOS_LOW_GOOD.

bool udi_phdc_waitdata ( udi_phdc_metadata_t metadata,
void(*)(bool, uint16_t)  callback 
)

Wait metadata from USB host.

Parameters
metadataInformation about expected metadata
callbackFunction to call at the end of transfer.
Returns
1 if function was successfully done, otherwise 0.

References callback, cpu_irq_restore(), cpu_irq_save(), metadata, UDI_PHDC_EP_SIZE_BULK_OUT, udi_phdc_out_trans, udi_phdc_preample_feature, UDI_PHDC_QOS_OUT, udi_phdc_wait_metadata(), and udi_phdc_wait_preamplemsg().

Referenced by ieee11073_enable_reception().

usb_phdc_classfnct_desc_t udi_phdc_desc_t::classfnct
usb_ep_desc_t udi_phdc_desc_t::ep_bulk_in
usb_ep_desc_t udi_phdc_desc_t::ep_bulk_out
usb_ep_desc_t udi_phdc_desc_t::ep_int_in
udi_phdc_fnctext_desc_t udi_phdc_desc_t::fnctext
usb_phdc_fnctext_desc_t udi_phdc_fnctext_desc_t::header
usb_iface_desc_t udi_phdc_desc_t::iface
uint8_t* udi_phdc_metadata_t::opaquedata
usb_phdc_qos_desc_t udi_phdc_desc_t::qos_bulk_in
usb_phdc_qos_desc_t udi_phdc_desc_t::qos_bulk_out
usb_phdc_qos_desc_t udi_phdc_desc_t::qos_int_in
le16_t udi_phdc_fnctext_desc_t::wDevSpecializations[sizeof(tmp_wDevSpecializations)/2]