Exemplo n.º 1
0
//*****************************************************************************
//
//! Festo Piece Callback.
//!
//! This function is executed when the piece enter the Festo
//! Station platform.
//!
//! \return None.
//
//*****************************************************************************
void _callback_Festo_Piece_In(void)
{
	GPIO_clearInt(Board_SENSE_SAMPLE_IN_PLACE);
 	if (GPIO_read(Board_SENSE_SAMPLE_IN_PLACE) > 0)
	{
 		Event_post(FestoEvents, FESTO_EVENT_PIECE_IN_PLACE);
	}
	else
	{
		Event_post(FestoEvents, FESTO_EVENT_PIECE_NOT_IN_PLACE);
	}
}
/*
 *  ======== gpioButtonFxn1 ========
 *  Callback function for the right button
 *
 *  It posts a message with image index 1 to display.
 */
Void gpioButtonFxn1(Void)
{
    UInt key;
    DrawMessage drawMsg;

    drawMsg.drawCommand = IMAGE;
    drawMsg.drawImageIndex = 1;

    key = Gate_enterSystem();
    /* Clear the last command */
    lastCommand[0] = 0x0;
    Gate_leaveSystem(key);

    /* Do not wait if there is no room for the new mail */
    Mailbox_post(mailboxHandle, &drawMsg, BIOS_NO_WAIT);

    GPIO_clearInt(EK_TM4C123GXL_SW2);//??
}
Exemplo n.º 3
0
//*****************************************************************************
//
//! Festo Riser Callback.
//!
//! This function is executed when the Riser reaches the top of the Festo
//! Station platform.
//!
//! \return None.
//
//*****************************************************************************
void _callback_Festo_Riser_Up(void)
{
    Event_post(FestoEvents, Event_Id_04);
    GPIO_clearInt(Board_SENSE_RISER_UP);
}
Exemplo n.º 4
0
//*****************************************************************************
//
//! Festo Riser Callback.
//!
//! This function is executed when the Riser reaches the bottom of the
//! Festo Station platform.
//!
//! \return None.
//
//*****************************************************************************
void _callback_Festo_Riser_Down(void)
{
    Event_post(FestoEvents, Event_Id_03);
    GPIO_clearInt(Board_SENSE_RISER_DOWN);
}
Exemplo n.º 5
0
//*****************************************************************************
//
//! Button Sellect Callback.
//!
//! This function is executed when the Button Sellect is pressed, which means a
//! interrupt for this pin was fired.
//!
//! \return None.
//
//*****************************************************************************
void _callback_Button_Select(void)
{
    Event_post(FestoEvents, Event_Id_02);
    GPIO_clearInt(Board_BUTTON0);
}
Exemplo n.º 6
0
//*****************************************************************************
//
//! Button Down Callback.
//!
//! This function is executed when the Button Down is pressed, which means a
//! interrupt for this pin was fired.
//!
//! \return None.
//
//*****************************************************************************
void _callback_Button_Down(void)
{
    Event_post(FestoEvents, Event_Id_01);
    GPIO_clearInt(Board_BUTTON2);
}
Exemplo n.º 7
0
//*****************************************************************************
//
//! Button Up Callback.
//!
//! This function is executed when the Button Up is pressed, which means a
//! interrupt for this pin was fired.
//!
//! \return None.
//
//*****************************************************************************
void _callback_Button_Up(void)
{
    Event_post(FestoEvents, Event_Id_00);
    GPIO_clearInt(Board_BUTTON1);
}