mbed library sources. With a patch for the can_api
Fork of mbed-dev by
targets/TARGET_ONSEMI/TARGET_NCS36510/gpio.h@149:156823d33999, 2016-10-28 (annotated)
- Committer:
- <>
- Date:
- Fri Oct 28 11:17:30 2016 +0100
- Revision:
- 149:156823d33999
This updates the lib to the mbed lib v128
NOTE: This release includes a restructuring of the file and directory locations and thus some
include paths in your code may need updating accordingly.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 149:156823d33999 | 1 | /** |
<> | 149:156823d33999 | 2 | ****************************************************************************** |
<> | 149:156823d33999 | 3 | * @file gpio.h |
<> | 149:156823d33999 | 4 | * @brief (API) Public header of GPIO driver |
<> | 149:156823d33999 | 5 | * @internal |
<> | 149:156823d33999 | 6 | * @author ON Semiconductor |
<> | 149:156823d33999 | 7 | * $Rev: 3724 $ |
<> | 149:156823d33999 | 8 | * $Date: 2015-09-14 14:35:42 +0530 (Mon, 14 Sep 2015) $ |
<> | 149:156823d33999 | 9 | ****************************************************************************** |
<> | 149:156823d33999 | 10 | * Copyright 2016 Semiconductor Components Industries LLC (d/b/a ON Semiconductor). |
<> | 149:156823d33999 | 11 | * All rights reserved. This software and/or documentation is licensed by ON Semiconductor |
<> | 149:156823d33999 | 12 | * under limited terms and conditions. The terms and conditions pertaining to the software |
<> | 149:156823d33999 | 13 | * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf |
<> | 149:156823d33999 | 14 | * (ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software) and |
<> | 149:156823d33999 | 15 | * if applicable the software license agreement. Do not use this software and/or |
<> | 149:156823d33999 | 16 | * documentation unless you have carefully read and you agree to the limited terms and |
<> | 149:156823d33999 | 17 | * conditions. By using this software and/or documentation, you agree to the limited |
<> | 149:156823d33999 | 18 | * terms and conditions. |
<> | 149:156823d33999 | 19 | * |
<> | 149:156823d33999 | 20 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
<> | 149:156823d33999 | 21 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
<> | 149:156823d33999 | 22 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
<> | 149:156823d33999 | 23 | * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, |
<> | 149:156823d33999 | 24 | * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
<> | 149:156823d33999 | 25 | * @endinternal |
<> | 149:156823d33999 | 26 | * |
<> | 149:156823d33999 | 27 | * @ingroup gpio |
<> | 149:156823d33999 | 28 | * |
<> | 149:156823d33999 | 29 | * @details |
<> | 149:156823d33999 | 30 | * |
<> | 149:156823d33999 | 31 | * <h1> General description </h1> |
<> | 149:156823d33999 | 32 | * <p> |
<> | 149:156823d33999 | 33 | * The APB GPIO is a configurable module allowing the use of 14 I/O lines. |
<> | 149:156823d33999 | 34 | * Each line can be configured independently. |
<> | 149:156823d33999 | 35 | * The GPIO module supports a wide variety of features concerning interrupts, |
<> | 149:156823d33999 | 36 | * which can be triggered by a low level, high level, positive or negative edge, |
<> | 149:156823d33999 | 37 | * or both edges. |
<> | 149:156823d33999 | 38 | * </p> |
<> | 149:156823d33999 | 39 | * |
<> | 149:156823d33999 | 40 | */ |
<> | 149:156823d33999 | 41 | |
<> | 149:156823d33999 | 42 | #ifndef GPIO_H_ |
<> | 149:156823d33999 | 43 | #define GPIO_H_ |
<> | 149:156823d33999 | 44 | |
<> | 149:156823d33999 | 45 | #ifdef __cplusplus |
<> | 149:156823d33999 | 46 | extern "C" { |
<> | 149:156823d33999 | 47 | #endif |
<> | 149:156823d33999 | 48 | |
<> | 149:156823d33999 | 49 | #include "memory_map.h" |
<> | 149:156823d33999 | 50 | #include "gpio_map.h" |
<> | 149:156823d33999 | 51 | #include "pad_map.h" |
<> | 149:156823d33999 | 52 | #include "crossbar.h" |
<> | 149:156823d33999 | 53 | #include "clock.h" |
<> | 149:156823d33999 | 54 | #include "pad.h" |
<> | 149:156823d33999 | 55 | |
<> | 149:156823d33999 | 56 | |
<> | 149:156823d33999 | 57 | /** output configuration push/pull */ |
<> | 149:156823d33999 | 58 | #define PAD_OUTCFG_PUSHPULL (uint8_t)0x00 |
<> | 149:156823d33999 | 59 | |
<> | 149:156823d33999 | 60 | /** output configuration open drain */ |
<> | 149:156823d33999 | 61 | #define PAD_OOUTCFG_OPENDRAIN (uint8_t)0x01 |
<> | 149:156823d33999 | 62 | |
<> | 149:156823d33999 | 63 | /** no pull up nor pull down */ |
<> | 149:156823d33999 | 64 | #define PAD_PULL_NONE (uint8_t)0x01 |
<> | 149:156823d33999 | 65 | |
<> | 149:156823d33999 | 66 | /** pull down */ |
<> | 149:156823d33999 | 67 | #define PAD_PULL_DOWN (uint8_t)0x00 |
<> | 149:156823d33999 | 68 | |
<> | 149:156823d33999 | 69 | /** pull up */ |
<> | 149:156823d33999 | 70 | #define PAD_PULL_UP (uint8_t)0x03 |
<> | 149:156823d33999 | 71 | |
<> | 149:156823d33999 | 72 | /* Number of DIO lines supported by NCS36510 */ |
<> | 149:156823d33999 | 73 | #define NUMBER_OF_GPIO ((uint8_t)0x12) |
<> | 149:156823d33999 | 74 | |
<> | 149:156823d33999 | 75 | /* All DIO lines set to 1 */ |
<> | 149:156823d33999 | 76 | #define IO_ALL ((uint32_t)0x3FFFF) |
<> | 149:156823d33999 | 77 | #define IO_NONE ((uint32_t)0x00000) |
<> | 149:156823d33999 | 78 | |
<> | 149:156823d33999 | 79 | /* Gpio handler */ |
<> | 149:156823d33999 | 80 | void fGpioHandler(void); |
<> | 149:156823d33999 | 81 | |
<> | 149:156823d33999 | 82 | #ifdef __cplusplus |
<> | 149:156823d33999 | 83 | } |
<> | 149:156823d33999 | 84 | #endif |
<> | 149:156823d33999 | 85 | |
<> | 149:156823d33999 | 86 | #endif /* GPIO_H_ */ |