mbed libraries for KL25Z
Diff: InterruptIn.h
- Revision:
- 9:663789d7729f
- Parent:
- 8:c14af7958ef5
--- a/InterruptIn.h Fri Nov 09 11:33:53 2012 +0000 +++ b/InterruptIn.h Mon Feb 18 09:41:56 2013 +0000 @@ -1,5 +1,17 @@ -/* mbed Microcontroller Library - InterruptIn - * Copyright (c) 2006-2011 ARM Limited. All rights reserved. +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef MBED_INTERRUPTIN_H #define MBED_INTERRUPTIN_H @@ -50,13 +62,13 @@ */ InterruptIn(PinName pin); virtual ~InterruptIn(); - + int read(); #ifdef MBED_OPERATORS operator int(); #endif - + /** Attach a function to call when a rising edge occurs on the input * * @param fptr A pointer to a void function, or 0 to set as none @@ -64,7 +76,7 @@ void rise(void (*fptr)(void)); /** Attach a member function to call when a rising edge occurs on the input - * + * * @param tptr pointer to the object to call the member function on * @param mptr pointer to the member function to be called */ @@ -81,7 +93,7 @@ void fall(void (*fptr)(void)); /** Attach a member function to call when a falling edge occurs on the input - * + * * @param tptr pointer to the object to call the member function on * @param mptr pointer to the member function to be called */ @@ -96,13 +108,13 @@ * @param mode PullUp, PullDown, PullNone */ void mode(PinMode pull); - + static void _irq_handler(uint32_t id, gpio_irq_event event); - + protected: - gpio_object gpio; - gpio_irq_object gpio_irq; - + gpio_t gpio; + gpio_irq_t gpio_irq; + FunctionPointer _rise; FunctionPointer _fall; };