这篇教程C++ GPIOIntClear函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GPIOIntClear函数的典型用法代码示例。如果您正苦于以下问题:C++ GPIOIntClear函数的具体用法?C++ GPIOIntClear怎么用?C++ GPIOIntClear使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GPIOIntClear函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ButtonHandlervoid ButtonHandler(){ uint32_t mask=GPIOIntStatus(GPIO_PORTF_BASE,false); uint8_t value=0; if(mask & GPIO_PIN_4){ //Boton izquierdo value= GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_4); if(value==0){ //boton pulsado // Activa el Timer4A (empezara a funcionar) TimerEnable(TIMER4_BASE, TIMER_A); pulsacionLarga=true; }else{ TimerDisable(TIMER4_BASE,TIMER_A); if(pulsacionLarga){ xEventGroupSetBits(xEventGroup, PilotoAutomaticoBit); if((xTaskCreate(PilAuto, (signed portCHAR *)"Piloto Auto", LED1TASKSTACKSIZE,NULL,tskIDLE_PRIORITY + 1, &PilautTaskHandle) != pdTRUE)) { while(1); } } } } if(mask & GPIO_PIN_0){ //boton derecho xEventGroupClearBits( xEventGroup, PilotoAutomaticoBit ); } GPIOIntClear(GPIO_PORTF_BASE,GPIO_PIN_0|GPIO_PIN_4);}
开发者ID:joseayebenes,项目名称:TivaFly,代码行数:35,
示例2: PortKIntHandler//*****************************************************************************////! This is the Pulse Per Second (PPS) interrupt handler.//! The updateCounter is incremented on each Pulse per second call, if equal to//! the update rate, the GPS data is parsed and logged.////*****************************************************************************void PortKIntHandler(void) { uint32_t intStatus = 0; // // Get the current interrupt status for Port K // intStatus = GPIOIntStatus(GPIO_PORTK_BASE,true); // // Clear the set interrupts for Port K // GPIOIntClear(GPIO_PORTK_BASE,intStatus); // // Execute code for PK2 interrupt // if((intStatus & GPIO_INT_PIN_2) == GPIO_INT_PIN_2){ if (updateRate == updateCounter++) { GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0x02); gpsData(); GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0x00); updateCounter = 0; // // Disable PPS interrupt after one read if in low power mode // if (lowPowerOn == 1) { IntDisable(INT_GPIOK); logComplete = 1; } } }} // End function PortKIntHandler
开发者ID:idaohang,项目名称:launchpad-gps,代码行数:40,
示例3: confGPIOvoid confGPIO(){ //Inicializa el puerto F (LEDs) --> No hace falta si usamos la libreria RGB // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); // ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3); //ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0); //LEDS APAGADOS ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3); SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_GPIOE); //Inicializa los LEDs usando libreria RGB RGBInit(1); SysCtlPeripheralSleepEnable(GREEN_TIMER_PERIPH); SysCtlPeripheralSleepEnable(BLUE_TIMER_PERIPH); RGBEnable(); //Inicializamos los botones y su interrupción SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); ButtonsInit(); GPIOIntClear(GPIO_PORTF_BASE, GPIO_INT_PIN_0|GPIO_INT_PIN_4); GPIOIntRegister(GPIO_PORTF_BASE,ButtonHandler); GPIOIntTypeSet(GPIO_PORTF_BASE,GPIO_INT_PIN_0|GPIO_INT_PIN_4, GPIO_BOTH_EDGES); GPIOIntEnable(GPIO_PORTF_BASE, GPIO_INT_PIN_0|GPIO_INT_PIN_4); SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_GPIOF);}
开发者ID:joseayebenes,项目名称:TivaFly,代码行数:29,
示例4: mode2unsetvoid mode2unset(){ GPIOIntClear(GPIO_PORTF_BASE, GPIO_PIN_4); //Clear any existing interrupts GPIOIntDisable(GPIO_PORTF_BASE, GPIO_PIN_4); //Enable the GPIO Interrupts on Port F IntDisable(INT_TIMER1A); TimerIntDisable(TIMER1_BASE,TIMER_TIMA_TIMEOUT);}
开发者ID:anshuman94,项目名称:TIVA-C-123G,代码行数:7,
示例5: PIOINT1_IRQHandler/** * @brief interrupt handler, updates timer, when fired * * */void PIOINT1_IRQHandler(void){ GPIOIntClear( TRIG_IN_PORT_1, TRIG_IN_PIN_1); /* detect change time */ timeLast1 = timeEdge1; timeEdge1 = millis();}
开发者ID:opprud,项目名称:remote_2_0,代码行数:11,
示例6: GPIO_PORTF_isr//definition of isr for PORT Fvoid GPIO_PORTF_isr(void){ uint32_t actual_GPIO_PORTF_status=((GPIO_PIN_0 | GPIO_PIN_4) & ~GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_0 | GPIO_PIN_4)); switch (actual_GPIO_PORTF_status) { case GPIO_PIN_4: //if SW1 is pressed ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, GPIO_PIN_1); //turn on RED LED UARTprintf("RED LED on/n/r"); break; case GPIO_PIN_0: //if SW2 is pressed ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_PIN_2); //turn on BLUE LED UARTprintf("BLUE LED on/n/r"); break; case (GPIO_PIN_0|GPIO_PIN_4): //either SW1 and SW2 are pressed ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_1, GPIO_PIN_2 | GPIO_PIN_1); //turn on RED & BLUE LEDs UARTprintf("RED & BLUE LEDs on/n/r"); break; default: //neither SW1 nor SW2 are pressed ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_1 , 0); //turn off RED & BLUE LEDs UARTprintf("RED & BLUE LEDs off/n/r"); break; } GPIOIntClear(GPIO_PORTF_BASE, GPIO_INT_PIN_0 | GPIO_INT_PIN_4);}
开发者ID:Lucast85,项目名称:tm4c123g-communication-expansion-board,代码行数:32,
示例7: IntHandlerGPIOPortE//*****************************************************************************//// Called by the NVIC as a result of GPIO port E interrupt event. For this// application GPIO port E pin 5 is the interrupt line for the ISL29023//// Notifies the application that light is outside of threshold limits.// Task will poll the semaphore and adjust the ranges accordingly.////*****************************************************************************voidIntHandlerGPIOPortE(void){ unsigned long ulStatus; portBASE_TYPE xHigherPriorityTaskWoken; ulStatus = GPIOIntStatus(GPIO_PORTE_BASE, true); // // Clear all the pin interrupts that are set // GPIOIntClear(GPIO_PORTE_BASE, ulStatus); if(ulStatus & GPIO_PIN_5) { // // ISL29023 has indicated that the light level has crossed outside of // the intensity threshold levels set in INT_LT and INT_HT registers. // xSemaphoreGiveFromISR(g_xISL29023AdjustRangeSemaphore, &xHigherPriorityTaskWoken); // // If the give of this semaphore causes a task to be ready then // make sure it has opportunity to run immediately upon return from // this ISR. // if(xHigherPriorityTaskWoken == pdTRUE) { portYIELD_FROM_ISR(true); } }}
开发者ID:nguyenvuhung,项目名称:TivaWare_C_Series-2.1.2.111,代码行数:42,
示例8: decodeMatrixInputvoid decodeMatrixInput() { SysCtlDelay(1000000); // debounce wait uint32_t input = GPIOPinRead(GPIO_PORTC_BASE, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7); if ((input & 0xF0) != 0xF0) // try to decode if something is pushed. { int i, row = -1, col = -1; for (i = 1; i < 5; i++) // get row { if (!(input & (8 << i))) row = i - 1; } for(i = 0; i < 4; i++) // get col { GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5, 4 << i); if (GPIOPinRead(GPIO_PORTC_BASE, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7) & (16 << row)) { col = i; break; } } if (col != -1 && row != -1) activePattern = row * 4 + col; // get the char of the button. } GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5, 0); GPIOIntClear(GPIO_PORTC_BASE, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7); SysCtlDelay(1000000); // wait to allow button to be lifted}
开发者ID:samvbeckmann,项目名称:christmas-lights,代码行数:32,
示例9: PIOINT2_IRQHandler/** * @brief interrupt handler, updates timer, when fired * * */void PIOINT2_IRQHandler(void){ GPIOIntClear( TRIG_IN_PORT_2, TRIG_IN_PIN_2); /* detect change time */ timeLast2 = timeEdge2; timeEdge2 = millis();}
开发者ID:opprud,项目名称:remote_2_0,代码行数:11,
示例10: GPIOPortMIntHandler//*****************************************************************************//// Called by the NVIC as a result of GPIO port M interrupt event. For this// application GPIO port M pin 3 is the interrupt line for the MPU9150//// For BoosterPack 2 Interface use Port M pin 7.////*****************************************************************************voidGPIOPortMIntHandler(void){ unsigned long ulStatus; // // Get the status flags to see which pin(s) caused the interrupt. // ulStatus = GPIOIntStatus(GPIO_PORTM_BASE, true); // // Clear all the pin interrupts that are set // GPIOIntClear(GPIO_PORTM_BASE, ulStatus); // // Check if this is an interrupt on the MPU9150 interrupt line. // // For BoosterPack 2 use Pin 7 instead. // if(ulStatus & GPIO_PIN_3) { // // Turn on the LED to show that transaction is starting. // LEDWrite(CLP_D3 | CLP_D4, CLP_D3); // // MPU9150 Data is ready for retrieval and processing. // MPU9150DataRead(&g_sMPU9150Inst, MPU9150AppCallback, &g_sMPU9150Inst); }}
开发者ID:peterliu2,项目名称:tivaWare,代码行数:40,
示例11: init_BtnHandler/***************************************************** * Function: init_BtnHandler * Description: Initializes button interrupt * Initializes timer for button counter * Input: NONE * Output: NONE *****************************************************/void init_BtnHandler(void){ // Unlock un-maskable pin HWREG(BTN_OVERRIDE_REG + GPIO_O_LOCK) = GPIO_LOCK_KEY; // Set up our interrupt for button presses IntMasterDisable(); // Disable all interrupts GPIOIntDisable(BTN_OVERRIDE_REG, BTN_OVERRIDE); GPIOPinTypeGPIOInput(BTN_OVERRIDE_REG, BTN_OVERRIDE); GPIOPadConfigSet(BTN_OVERRIDE_REG, BTN_OVERRIDE, GPIO_STRENGTH_4MA, GPIO_PIN_TYPE_STD_WPU); // Set Pull-up GPIOIntTypeSet(BTN_OVERRIDE_REG, BTN_OVERRIDE, GPIO_BOTH_EDGES); // Set edge to trigger on GPIOIntClear(BTN_OVERRIDE_REG, BTN_OVERRIDE); // Clear the interrupt bit GPIOIntEnable(BTN_OVERRIDE_REG, BTN_OVERRIDE); // Enable the interrupt IntEnable(INT_GPIOE); // Lock un-maskable pin HWREG(BTN_OVERRIDE_REG + GPIO_O_LOCK) = 0; // Setup timer interrupt for button pressing // This timer will run up and when it is released we will check how long it was running SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0); TimerConfigure(BTN_OVERRIDE_TIM_BASE, TIMER_CFG_PERIODIC); // Setup interrupt as 32 bit timer counting up TimerLoadSet(BTN_OVERRIDE_TIM_BASE, BTN_OVERRIDE_TIM, clockTime/1000); // Load Timer IntEnable(INT_TIMER0A); TimerIntEnable(BTN_OVERRIDE_TIM_BASE, TIMER_TIMA_TIMEOUT); // Turn the input pin to the button high GPIOPinTypeGPIOOutput(BTN_OVERRIDE_CONTROL_REG, BTN_OVERRIDE_CONTROL); GPIOPinWrite(BTN_OVERRIDE_CONTROL_REG, BTN_OVERRIDE_CONTROL, BTN_OVERRIDE_CONTROL);}
开发者ID:BooRan,项目名称:Auto_Water_TM4,代码行数:37,
示例12: mode2setvoid mode2set(){ GPIOIntClear(GPIO_PORTF_BASE, GPIO_PIN_4); //Clear any existing interrupts GPIOIntEnable(GPIO_PORTF_BASE, GPIO_PIN_4); //Enable the GPIO Interrupts on Port F TimerLoadSet(TIMER1_BASE, TIMER_A,SysCtlClockGet()/3); //Set the Max Value of the timer IntEnable(INT_TIMER1A); TimerIntEnable(TIMER1_BASE,TIMER_TIMA_TIMEOUT); //Enable Timer1 Interrupt}
开发者ID:anshuman94,项目名称:TIVA-C-123G,代码行数:8,
示例13: IntGPIOe/** Port E interrupt service routine@note Must be configured in startup_ccs.c or else will not be called.*/void IntGPIOe(void){ buttonIsr(0); // Button 0 was pressed#ifdef TIVA GPIOIntClear(GPIO_PORTE_BASE, GPIO_PIN_4); //Clear interrupts#else GPIOPinIntClear(GPIO_PORTE_BASE, GPIO_PIN_4); //Clear interrupts#endif}
开发者ID:vtoanb,项目名称:msp430lioamaintain,代码行数:12,
示例14: Interrupt_PB3Initvoid Interrupt_PB3Init(void){ GPIOIntRegister(GPIO_PORTB_BASE,Interrupt_PB3Handler); ROM_GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_3); ROM_GPIOPadConfigSet(GPIO_PORTB_BASE,GPIO_PIN_3,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU); GPIOIntDisable(GPIO_PORTB_BASE,GPIO_INT_PIN_3); GPIOIntClear(GPIO_PORTB_BASE,GPIO_INT_PIN_3); GPIOIntTypeSet(GPIO_PORTB_BASE,GPIO_INT_PIN_3,GPIO_LOW_LEVEL);}
开发者ID:lengmi,项目名称:PlasterV2_0,代码行数:9,
示例15: onButtonUpvoid onButtonUp(void) { if (GPIOIntStatus(GPIO_PORTF_BASE, false) & GPIO_PIN_4) { // PF4 was interrupt cause printf("Button Up/n"); GPIOIntRegister(GPIO_PORTF_BASE, onButtonDown); // Register our handler function for port F GPIOIntTypeSet(GPIO_PORTF_BASE, GPIO_PIN_4, GPIO_FALLING_EDGE); // Configure PF4 for falling edge trigger GPIOIntClear(GPIO_PORTF_BASE, GPIO_PIN_4); // Clear interrupt flag }}
开发者ID:jeetbuz,项目名称:embedded_lab,代码行数:9,
示例16: GPIOMotionDetectorIsr// Interrupt handler for the GPIO motion detector signalvoid GPIOMotionDetectorIsr(void) { GPIOIntClear(GPIO_PORTA_BASE, GPIO_INT_PIN_2 | GPIO_INT_PIN_5);#ifdef RUN_AS_MASTER motionDetectorTrigged = 1;#else IRIntHandler();#endif}
开发者ID:jjaas,项目名称:sparkle,代码行数:10,
示例17: POLL//Called when detect SRDY goes low first void POLL(){ //MRDY Goes LOW (assuming SRDY is LOW) MRDY_write(0); //Send POLL command to CC2530 //TODO: Check if the the Type data is also Zero uint8_t *nullByte = (uint8_t *)malloc(1); nullByte = ""; SPI_transfer(nullByte,1); //free(nullByte); //Start To Recieve Data when SRDY goes HIGH uint8_t *RX_data = malloc(254); uint16_t count = 0; while (!SRDY_read()){ SPI_receive(RX_data+count,1); count++; } //call a management function //Give the data return from function to cc2530 //Here We call the registerd function to provide dataToReturn commandPasre(RX_data); //MRDY Goes HIGH MRDY_write(1); free(RX_data); //Clear Interrupt //GPIO_PORTA_ICR_R = 0xFFFFFFFF; GPIOIntClear(GPIO_PORTA_BASE,0x00000080);/* SPI_receive(RX_data,1); length = *RX_data; free(RX_data); RX_data= malloc(sizeof(length+3)); RX_data[0] = length; SPI_receive(RX_data+1,length+2);*/}
开发者ID:hp5588,项目名称:Tiva_slave,代码行数:57,
示例18: interrupt_handlervoid interrupt_handler(void){ GPIOIntClear(GPIO_PORTB_BASE, GPIO_INT_PIN_2); if(GPIOPinRead(GPIO_PORTB_BASE, GPIO_PIN_2) == 0x0) { isr_flag = 1; }}
开发者ID:phuongtg,项目名称:micro2-1,代码行数:10,
示例19: interrupt_handlervoid interrupt_handler(void){ GPIOIntClear(GPIO_PORTF_BASE, GPIO_INT_PIN_2 | GPIO_INT_PIN_3); if(GPIOPinRead(port_F, GPIO_PIN_2) == 0x0) { display_flag = 1; } }
开发者ID:phuongtg,项目名称:micro2-1,代码行数:10,
示例20: brakeHandlervoid brakeHandler(){ GPIOIntClear(GPIO_PORTB_BASE, GPIO_INT_PIN_0); if(GPIOPinRead(GPIO_PORTB_BASE, GPIO_PIN_0) == 0x0) { enableSys = 0; }}
开发者ID:phuongtg,项目名称:micro2-1,代码行数:10,
示例21: WiFiCC3100_open/* * ======== WiFiCC3100_open ======== */WiFi_Handle WiFiCC3100_open(WiFi_Handle handle, unsigned int spiIndex, WiFi_evntCallback evntCallback, WiFi_Params *params){ unsigned int key; WiFiCC3100_Object *object = handle->object; WiFiCC3100_HWAttrs const *hwAttrs = handle->hwAttrs; union {#if !defined(MSP430WARE) Hwi_Params hwiParams;#endif Semaphore_Params semParams; } paramsUnion; key = Hwi_disable(); if (object->isOpen) { Hwi_restore(key); Log_warning0("WiFi Hwi already in use."); return (NULL); } object->isOpen = true; Hwi_restore(key); /* Construct semaphores to block read/write transactions. */ Semaphore_Params_init(&(paramsUnion.semParams)); paramsUnion.semParams.mode = Semaphore_Mode_BINARY; paramsUnion.semParams.instance->name = "WiFi.writeSemaphore"; Semaphore_construct(&(object->writeSemaphore), 0, &(paramsUnion.semParams)); paramsUnion.semParams.instance->name = "WiFi.readSemaphore"; Semaphore_construct(&(object->readSemaphore), 0, &(paramsUnion.semParams));#if !defined(MSP430WARE) Hwi_Params_init(&(paramsUnion.hwiParams)); paramsUnion.hwiParams.arg = (UArg) handle; paramsUnion.hwiParams.enableInt = false; /* Hwi_construct cannot fail, use NULL instead of an Error Block */ Hwi_construct(&(object->wifiHwi), hwAttrs->irqIntNum, WiFiCC3100_hostIntHandler, &(paramsUnion.hwiParams), NULL);#endif#if defined(MSP430WARE) || defined(MSP432WARE) MAP_GPIO_clearInterruptFlag(hwAttrs->irqPort, hwAttrs->irqPin); MAP_GPIO_enableInterrupt(hwAttrs->irqPort, hwAttrs->irqPin);#else GPIOIntClear(hwAttrs->irqPort, hwAttrs->irqPin); GPIOIntEnable(hwAttrs->irqPort, hwAttrs->irqPin);#endif /* Store SPI interface parameters */ object->spiIndex = spiIndex; object->bitRate = params->bitRate; return (handle);}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:58,
示例22: onButtonDownvoid onButtonDown(void) { if (GPIOIntStatus(GPIO_PORTF_BASE, false) & GPIO_PIN_4) { /*The GPIOIntStatus returns the value of the GPIORIS register and in this case, AND's it with the Pin 4 mask. So if the condition for the interrupt has occurred for the Pin then the if statement is true.*/ // PF4 was interrupt cause printf("Button Down/n"); GPIOIntRegister(GPIO_PORTF_BASE, onButtonUp); // Register our handler function for port F GPIOIntTypeSet(GPIO_PORTF_BASE, GPIO_PIN_4, GPIO_RISING_EDGE); // Configure PF4 for rising edge trigger GPIOIntClear(GPIO_PORTF_BASE, GPIO_PIN_4); // Clear interrupt flag }}
开发者ID:jeetbuz,项目名称:embedded_lab,代码行数:11,
示例23: PIOINT0_IRQHandlervoid PIOINT0_IRQHandler(void){ uint32_t regVal; regVal = GPIOIntStatus( PORT0, 7 ); if ( regVal ) { SingleResponseIsr(); GPIOIntClear( PORT0, 7 ); } return;}
开发者ID:izzitech,项目名称:mg-exam,代码行数:12,
示例24: interrupt_setupvoid interrupt_setup(void){ // Interrupt setuü GPIOIntDisable(GPIO_PORTF_BASE, GPIO_PIN_4); // Disable interrupt for PF4 (in case it was enabled) GPIOIntClear(GPIO_PORTF_BASE, GPIO_PIN_4); // Clear pending interrupts for PF4 GPIOIntRegister(GPIO_PORTF_BASE, onButtonDown); // Register our handler function for port F GPIOIntTypeSet(GPIO_PORTF_BASE, GPIO_PIN_4, GPIO_FALLING_EDGE); // Configure PF4 for falling edge trigger GPIOIntEnable(GPIO_PORTF_BASE, GPIO_PIN_4); // Enable interrupt for PF4}
开发者ID:jeetbuz,项目名称:embedded_lab,代码行数:12,
示例25: IntGPIOf/** Port F interrupt service routine@note Must be configured in startup_ccs.c or else will not be called.*/void IntGPIOf(void){ uint32_t buttonState = GPIOPinRead(GPIO_PORTF_BASE, ALL_BUTTONS); if ((~buttonState) & LEFT_BUTTON) buttonIsr(1); else if ((~buttonState) & RIGHT_BUTTON) buttonIsr(2);#ifdef TIVA GPIOIntClear(GPIO_PORTF_BASE, ALL_BUTTONS); //Clear interrupts#else GPIOPinIntClear(GPIO_PORTF_BASE, ALL_BUTTONS); //Clear interrupts#endif}
开发者ID:vtoanb,项目名称:msp430lioamaintain,代码行数:16,
示例26: PIOINT2_IRQHandler/******************************************************************************* Function name: PIOINT2_IRQHandler**** Descriptions: Use one GPIO pin(port2 pin1) as interrupt source**** parameters: None** Returned value: None** *****************************************************************************/void PIOINT2_IRQHandler(void){ uint32_t regVal; gpio2_counter++; regVal = GPIOIntStatus( PORT2, 1 ); if ( regVal ) { p2_1_counter++; GPIOIntClear( PORT2, 1 ); } return;}
开发者ID:m3y54m,项目名称:32bitmicro,代码行数:22,
示例27: PIOINT1_IRQHandler/******************************************************************************* Function name: PIOINT1_IRQHandler**** Descriptions: Use one GPIO pin(port1 pin1) as interrupt source**** parameters: None** Returned value: None** *****************************************************************************/void PIOINT1_IRQHandler(void){ uint32_t regVal; gpio1_counter++; regVal = GPIOIntStatus( PORT1, 4 ); if ( regVal ) { p1_1_counter++; GPIOIntClear( PORT1, 4 ); } return;}
开发者ID:junstrix,项目名称:gsoap_websevice,代码行数:22,
示例28: interrupt_handler//Button interrupt handlervoid interrupt_handler(void){ //Clear the interrupt ports GPIOIntClear(GPIO_PORTC_BASE, GPIO_INT_PIN_5 | GPIO_INT_PIN_6); if(GPIOPinRead(GPIO_PORTC_BASE, GPIO_PIN_5) == 0x20){ frequency -= 10000;} if(GPIOPinRead(GPIO_PORTC_BASE, GPIO_PIN_6) == 0x40){ frequency += 10000;} //Set new timer frequency TimerLoadSet(TIMER0_BASE, TIMER_A, frequency);}
开发者ID:phuongtg,项目名称:micro2-1,代码行数:14,
示例29: modeselect/************ FUNCTION DEFINITIONS ****************/void modeselect(void){ if(GPIOIntStatus(GPIO_PORTF_BASE,false) & GPIO_INT_PIN_0) { GPIOIntClear(GPIO_PORTF_BASE,GPIO_PIN_0); for(i=0;i<2000;i++); if (GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_0)==0) { mode++; if (mode==6) mode = 1; switch(mode) //According to mode, initialize peripherals and disable other peripherals { case 1: mode2unset(); mode3unset(); mode4unset(); mode5unset(); mode1set(); break; case 2: mode1unset(); mode3unset(); mode4unset(); mode5unset(); mode2set(); break; case 3: mode2unset(); mode1unset(); mode4unset(); mode5unset(); mode3set(); break; case 4: mode2unset(); mode1unset(); mode3unset(); mode5unset(); mode4set(); break; case 5: mode2unset(); mode1unset(); mode4unset(); mode3unset(); mode5set(); break; } } } if((GPIOIntStatus(GPIO_PORTF_BASE,false)&GPIO_INT_PIN_4)&& (mode==2||mode==5)) { GPIOIntClear(GPIO_PORTF_BASE,GPIO_PIN_4); if(!GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_4)) { mode2(); TimerLoadSet(TIMER1_BASE, TIMER_A,SysCtlClockGet()/3); //Set the Max Value of the timer TimerEnable(TIMER1_BASE,TIMER_A); //Start the timer } else { TimerDisable(TIMER1_BASE,TIMER_A); fast_flag=0; } }}
开发者ID:anshuman94,项目名称:TIVA-C-123G,代码行数:39,
示例30: PortFIntHandler/* * This is the interrupt handler for the button that changes the LEDs brightness */void PortFIntHandler(){ uint32_t status=0; status = GPIOIntStatus(GPIO_PORTF_BASE,true); GPIOIntClear(GPIO_PORTF_BASE,status); if( GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_1) == 0) Maxbrilho = 255; else Maxbrilho = 50; MudaPadrao = 1;}
开发者ID:MrPhu,项目名称:TM4C123-Launchpad-Examples,代码行数:17,
注:本文中的GPIOIntClear函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GPIOIntTypeSet函数代码示例 C++ GPIODirModeSet函数代码示例 |