EasyManuals Logo

Texas Instruments MSP430 Student Guide

Texas Instruments MSP430
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #336 background imageLoading...
Page #336 background image
ABC’s of USB
C. Managing my App & Transferring Data
Main Loop USB Framework
while(1){
switch( USB_connectionState() )
{
case ST_USB_DISCONNECTED:
break;
case ST_ENUM_ACTIVE:
break;
case ST_ENUM_SUSPENDED:
break;
case ST_ENUM_IN_PROGRESS:
break;
case ST_USB_CONNECTED_NO_ENUM:
break;
case ST_NOENUM_SUSPENDED:
break;
case ST_ERROR:
break;
default:;
}
}
Execution within main loop “forks
depending on the state of USB,
creating alternate main loops
Thus, USB state becomes a central
part of managing software flow
This framework excels when the
device behaves differently in each
state!
For cases where system only cares
about one state, connectionState()
fxn could be called from IF{} stmt
Most common non-RTOS solution
it’s used in many of the USB
examples provided with the API
These three states are where
the application spends most
of its time
7 - 24 MSP430 Workshop - USB Devices

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals