Beispiel #1
0
/* MAX3421 state change task and interrupt handler */
byte MAX3421E::Task( void )
{
 byte rcode = 0;
 byte pinvalue;

    pinvalue = digitalRead( _int_pin );    
    if( pinvalue  == LOW ) {
        rcode = IntHandler();
    }
//    pinvalue = digitalRead( MAX_GPX );
//    if( pinvalue == LOW ) {
//        GpxHandler();
//    }
//    usbSM();                                //USB state machine                            
    return( rcode );   
}   
/* MAX3421 state change task and interrupt handler */
byte MAX3421E::Task( void )
{
    byte rcode = 0;
    byte pinvalue;
    //Serial.print("Vbus state: ");
    //Serial.println( vbusState, HEX );
    pinvalue = readINT();
    if( pinvalue  == LOW ) {
        rcode = IntHandler();
    }
    pinvalue = readGPX();
    if( pinvalue == LOW ) {
        GpxHandler();
    }
//    usbSM();                                //USB state machine                            
    return( rcode );   
}