Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
targets/TARGET_ONSEMI/TARGET_NCS36510/pad.h@1:f30bdcd2b33b, 2017-02-27 (annotated)
- Committer:
- jacobjohnson
- Date:
- Mon Feb 27 17:45:05 2017 +0000
- Revision:
- 1:f30bdcd2b33b
- Parent:
- 0:098463de4c5d
changed the inputscale from 1 to 7 in analogin_api.c. This will need to be changed later, and accessed from the main level, but for now this allows the adc to read a value from 0 to 3.7V, instead of just up to 1V.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
group-onsemi | 0:098463de4c5d | 1 | /** |
group-onsemi | 0:098463de4c5d | 2 | ****************************************************************************** |
group-onsemi | 0:098463de4c5d | 3 | * @file pad.h |
group-onsemi | 0:098463de4c5d | 4 | * @brief PAD Power management support code |
group-onsemi | 0:098463de4c5d | 5 | * @internal |
group-onsemi | 0:098463de4c5d | 6 | * @author ON Semiconductor |
group-onsemi | 0:098463de4c5d | 7 | * $Rev: 2848 $ |
group-onsemi | 0:098463de4c5d | 8 | * $Date: 2014-04-01 22:48:18 +0530 (Tue, 01 Apr 2014) $ |
group-onsemi | 0:098463de4c5d | 9 | ****************************************************************************** |
group-onsemi | 0:098463de4c5d | 10 | * Copyright 2016 Semiconductor Components Industries LLC (d/b/a ON Semiconductor). |
group-onsemi | 0:098463de4c5d | 11 | * All rights reserved. This software and/or documentation is licensed by ON Semiconductor |
group-onsemi | 0:098463de4c5d | 12 | * under limited terms and conditions. The terms and conditions pertaining to the software |
group-onsemi | 0:098463de4c5d | 13 | * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf |
group-onsemi | 0:098463de4c5d | 14 | * (ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software) and |
group-onsemi | 0:098463de4c5d | 15 | * if applicable the software license agreement. Do not use this software and/or |
group-onsemi | 0:098463de4c5d | 16 | * documentation unless you have carefully read and you agree to the limited terms and |
group-onsemi | 0:098463de4c5d | 17 | * conditions. By using this software and/or documentation, you agree to the limited |
group-onsemi | 0:098463de4c5d | 18 | * terms and conditions. |
group-onsemi | 0:098463de4c5d | 19 | * |
group-onsemi | 0:098463de4c5d | 20 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
group-onsemi | 0:098463de4c5d | 21 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
group-onsemi | 0:098463de4c5d | 22 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
group-onsemi | 0:098463de4c5d | 23 | * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, |
group-onsemi | 0:098463de4c5d | 24 | * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
group-onsemi | 0:098463de4c5d | 25 | * @endinternal |
group-onsemi | 0:098463de4c5d | 26 | * |
group-onsemi | 0:098463de4c5d | 27 | * @ingroup pad |
group-onsemi | 0:098463de4c5d | 28 | * |
group-onsemi | 0:098463de4c5d | 29 | * @details |
group-onsemi | 0:098463de4c5d | 30 | */ |
group-onsemi | 0:098463de4c5d | 31 | |
group-onsemi | 0:098463de4c5d | 32 | #ifndef _PAD_H_ |
group-onsemi | 0:098463de4c5d | 33 | #define _PAD_H_ |
group-onsemi | 0:098463de4c5d | 34 | |
group-onsemi | 0:098463de4c5d | 35 | /************************************************************************************************* |
group-onsemi | 0:098463de4c5d | 36 | * * |
group-onsemi | 0:098463de4c5d | 37 | * Header files * |
group-onsemi | 0:098463de4c5d | 38 | * * |
group-onsemi | 0:098463de4c5d | 39 | *************************************************************************************************/ |
group-onsemi | 0:098463de4c5d | 40 | |
group-onsemi | 0:098463de4c5d | 41 | #include "types.h" |
group-onsemi | 0:098463de4c5d | 42 | #include "memory_map.h" |
group-onsemi | 0:098463de4c5d | 43 | #include "gpio_map.h" |
group-onsemi | 0:098463de4c5d | 44 | #include "pad_map.h" |
group-onsemi | 0:098463de4c5d | 45 | #include "crossbar.h" |
group-onsemi | 0:098463de4c5d | 46 | #include "clock.h" |
group-onsemi | 0:098463de4c5d | 47 | |
group-onsemi | 0:098463de4c5d | 48 | /************************************************************************************************** |
group-onsemi | 0:098463de4c5d | 49 | * * |
group-onsemi | 0:098463de4c5d | 50 | * Type definitions * |
group-onsemi | 0:098463de4c5d | 51 | * * |
group-onsemi | 0:098463de4c5d | 52 | **************************************************************************************************/ |
group-onsemi | 0:098463de4c5d | 53 | |
group-onsemi | 0:098463de4c5d | 54 | |
group-onsemi | 0:098463de4c5d | 55 | |
group-onsemi | 0:098463de4c5d | 56 | #define CROSS_REG_ADRS_BYTE_SIZE 4 |
group-onsemi | 0:098463de4c5d | 57 | |
group-onsemi | 0:098463de4c5d | 58 | #define PAD_REG_ADRS_BYTE_SIZE 4 |
group-onsemi | 0:098463de4c5d | 59 | |
group-onsemi | 0:098463de4c5d | 60 | |
group-onsemi | 0:098463de4c5d | 61 | /************************************************************************************************* |
group-onsemi | 0:098463de4c5d | 62 | * * |
group-onsemi | 0:098463de4c5d | 63 | * Functions * |
group-onsemi | 0:098463de4c5d | 64 | * * |
group-onsemi | 0:098463de4c5d | 65 | *************************************************************************************************/ |
group-onsemi | 0:098463de4c5d | 66 | |
group-onsemi | 0:098463de4c5d | 67 | /** |
group-onsemi | 0:098463de4c5d | 68 | * @brief |
group-onsemi | 0:098463de4c5d | 69 | * Configures the PAD IO for desired behavior |
group-onsemi | 0:098463de4c5d | 70 | */ |
group-onsemi | 0:098463de4c5d | 71 | extern void fPadInit(); |
group-onsemi | 0:098463de4c5d | 72 | |
group-onsemi | 0:098463de4c5d | 73 | /** |
group-onsemi | 0:098463de4c5d | 74 | * @brief |
group-onsemi | 0:098463de4c5d | 75 | * Set ouptput drive strength, output drive type & pull type for PAD IO |
group-onsemi | 0:098463de4c5d | 76 | * |
group-onsemi | 0:098463de4c5d | 77 | * @param PadNum Pad number |
group-onsemi | 0:098463de4c5d | 78 | * @param OutputDriveStrength Ouput drive strength. Ref Table: O/p drive strength |
group-onsemi | 0:098463de4c5d | 79 | * @param OutputDriveType Push/pull: 0; opern dran: 1 |
group-onsemi | 0:098463de4c5d | 80 | * @param PullType Pull down active: 0; no pull active:1 or 2; pull up active: 3 |
group-onsemi | 0:098463de4c5d | 81 | * |
group-onsemi | 0:098463de4c5d | 82 | * @return true for success; false for invalid parameters |
group-onsemi | 0:098463de4c5d | 83 | */ |
group-onsemi | 0:098463de4c5d | 84 | extern boolean fPadIOCtrl(uint8_t, uint8_t, uint8_t, uint8_t); |
group-onsemi | 0:098463de4c5d | 85 | |
group-onsemi | 0:098463de4c5d | 86 | #endif //_PAD_H_ |