Go to the source code of this file.
Defines | |
#define | B_IDLE 0 |
#define | B_SRP_INIT 1 |
#define | B_PERIPHERAL 2 |
#define | B_WAIT_ACON 3 |
#define | B_HOST 4 |
#define | B_END_HNP_SUSPEND 5 |
#define | Start_session_with_srp() (otg_device_sessions |= 0x01) |
Is the current session a result of a SRP ? | |
#define | End_session_with_srp() (otg_device_sessions &= ~0x01) |
#define | Is_session_started_with_srp() (((otg_device_sessions&0x01) != 0) ? TRUE : FALSE) |
#define | Srp_sent_and_waiting_answer() (otg_device_sessions |= 0x02) |
Has a SRP been sent, and waiting for an answer. | |
#define | Ack_srp_sent_and_answer() (otg_device_sessions &= ~0x02) |
#define | Is_srp_sent_and_waiting_answer() (((otg_device_sessions&0x02) != 0) ? TRUE : FALSE) |
#define | TB_SRP_FAIL_MIN 0x0A28 |
Is the Tb_Srp counter enabled ? Cleared by timer if Tb_Srp_Fail elapsed. | |
#define | Init_tb_srp_counter() (otg_tb_srp_cpt = 0) |
#define | Is_tb_srp_counter_overflow() ((otg_tb_srp_cpt > TB_SRP_FAIL_MIN) ? TRUE : FALSE) |
Functions | |
void | usb_device_task_init (void) |
void | usb_start_device (void) |
void | usb_device_task (void) |
Variables | |
bit | usb_suspended |
Public : (bit) usb_suspended usb_suspended is set to TRUE when USB is in suspend mode usb_suspended is set to FALSE otherwise /. | |
U8 | otg_device_sessions |
Public : (U8) otg_device_sessions; Store some events and conditions specifics to OTG Devices sessions. | |
U8 | otg_b_device_state |
Public : (U8) otg_b_device_state; Store the current state of the B-Device. | |
U8 | sof_seen_in_session |
Public : (U8) sof_seen_in_session; Indicates if a SOF has been received during the current session /. | |
U16 | otg_tb_srp_cpt |
Public : (U16) otg_tb_srp_cpt; Counter used to signal a SRP fail condition (SRP fails if Tb_Srp_Fail elapsed). |
Definition in file usb_device_task.h.