GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Keyer/pin.h at main · hb9chm/Keyer Expand file tree/ Copy pathpin.hMore file actions 72 lines (63 loc) · 2.43 KB / Copy pathpin.hFile metadata and controls72 lines (63 loc) · 2.43 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 // // OOSMOS pin Class // // Copyright (C) 2014-2020 OOSMOS, LLC // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, version 2 of the License ("GPLv2"). // // This software may be used without the GPLv2 restrictions by entering // into a commercial license agreement with OOSMOS, LLC. // See <https://www.oosmos.com/licensing/>. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // #ifndef pin_h #define pin_h #include "oosmos.h" #include <stdbool.h> #include <stdint.h> typedef struct pinTag pin; typedef enum { pinOut = 1, pinIn, pinIn_Pullup, pinInOut } pin_eDirection; typedef enum { pinActiveLow = 1, pinActiveHigh } pin_eLogic; extern void pinOn(const pin * pPin); extern void pinOff(const pin * pPin); extern bool pinIsOn(const pin * pPin); extern bool pinIsOff(const pin * pPin); #if defined(ARDUINO) || defined(oosmos_RASPBERRY_PI) extern pin * pinNew(unsigned PinNumber, pin_eDirection, pin_eLogic Logic); extern pin * pinNew_Debounce(unsigned PinNumber, pin_eDirection, pin_eLogic Logic, uint8_t DebounceTimeMS); extern unsigned pinGetPinNumber(pin * pPin); #elif defined(__PIC32MX) extern pin * pinNew(IoPortId Port, unsigned Bit, pin_eDirection Direction, pin_eLogic Logic); extern pin * pinNew_Debounce(IoPortId Port, unsigned Bit, pin_eDirection, pin_eLogic Logic, uint8_t DebounceTimeMS); #elif defined(__MBED__) extern pin * pinNew(PinName Pin, pin_eDirection, pin_eLogic Logic); extern pin * pinNew_Debounce(PinName Pin, pin_eDirection, pin_eLogic Logic, uint8_t DebounceTimeMS); extern unsigned pinGetPinName(pin * pPin); #elif defined(__IAR_SYSTEMS_ICC__) extern pin * pinNew(GPIO_TypeDef* Port, uint16_t Pin, const pin_eDirection Direction, const pin_eLogic Logic); extern pin * pinNew_Debounce(GPIO_TypeDef* Port, const uint16_t Bit, const pin_eDirection Direction, const pin_eLogic Logic, const uint8_t DebounceTimeMS); #elif defined(_MSC_VER) extern pin * pinNew(char Key, pin_eLogic Logic); #else #error pin.h: Unsupported platform. #endif #endif |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |