コード例 #1
0
ファイル: main.c プロジェクト: gongal/ARCap
/* Interrupt service routine triggered whenever the status of the IR emitter pushbutton changes. */
static void isr_on_ir_pushbutton( void * context) {
	// Read the state of the pushbutton and post it to the queue.
	int state = IR_PUSHBUTTON_MESSAGE + IORD_ALTERA_AVALON_PIO_DATA(IR_PUSHBUTTON_BASE);
	OSQPost(queue, (void*)state);
	// Mask to mark the end of the ISR?
	IOWR_ALTERA_AVALON_PIO_CLEAR_BITS(IR_PUSHBUTTON_BIT_CLEARING_EDGE_REGISTER, 0);
}
コード例 #2
0
//------------------------------------------------------------------------------
static void setErrorLed(BOOL fOn_p)
{
#if defined(TARGET_POWERLINK_LED_BASE)
    if (fOn_p)
        IOWR_ALTERA_AVALON_PIO_SET_BITS(TARGET_POWERLINK_LED_BASE, GPIO_ERROR_LED_BIT);
    else
        IOWR_ALTERA_AVALON_PIO_CLEAR_BITS(TARGET_POWERLINK_LED_BASE, GPIO_ERROR_LED_BIT);
#else
    UNUSED_PARAMETER(fOn_p);
#endif
}