mbed-os

Fork of mbed-os by erkin yucel

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 #ifdef REVD
elessair 0:f269e3021894 2 /**
elessair 0:f269e3021894 3 ******************************************************************************
elessair 0:f269e3021894 4 * @file pad.h
elessair 0:f269e3021894 5 * @brief PAD Power management support code
elessair 0:f269e3021894 6 * @internal
elessair 0:f269e3021894 7 * @author ON Semiconductor
elessair 0:f269e3021894 8 * $Rev: 2848 $
elessair 0:f269e3021894 9 * $Date: 2014-04-01 22:48:18 +0530 (Tue, 01 Apr 2014) $
elessair 0:f269e3021894 10 ******************************************************************************
elessair 0:f269e3021894 11 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
elessair 0:f269e3021894 12 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
elessair 0:f269e3021894 13 * under limited terms and conditions. The terms and conditions pertaining to the software
elessair 0:f269e3021894 14 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
elessair 0:f269e3021894 15 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
elessair 0:f269e3021894 16 * if applicable the software license agreement. Do not use this software and/or
elessair 0:f269e3021894 17 * documentation unless you have carefully read and you agree to the limited terms and
elessair 0:f269e3021894 18 * conditions. By using this software and/or documentation, you agree to the limited
elessair 0:f269e3021894 19 * terms and conditions.
elessair 0:f269e3021894 20 *
elessair 0:f269e3021894 21 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
elessair 0:f269e3021894 22 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
elessair 0:f269e3021894 23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
elessair 0:f269e3021894 24 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
elessair 0:f269e3021894 25 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
elessair 0:f269e3021894 26 * @endinternal
elessair 0:f269e3021894 27 *
elessair 0:f269e3021894 28 * @ingroup pad
elessair 0:f269e3021894 29 *
elessair 0:f269e3021894 30 * @details
elessair 0:f269e3021894 31 */
elessair 0:f269e3021894 32
elessair 0:f269e3021894 33 #ifndef _PAD_H_
elessair 0:f269e3021894 34 #define _PAD_H_
elessair 0:f269e3021894 35
elessair 0:f269e3021894 36 /*************************************************************************************************
elessair 0:f269e3021894 37 * *
elessair 0:f269e3021894 38 * Header files *
elessair 0:f269e3021894 39 * *
elessair 0:f269e3021894 40 *************************************************************************************************/
elessair 0:f269e3021894 41
elessair 0:f269e3021894 42 #include "types.h"
elessair 0:f269e3021894 43 #include "memory_map.h"
elessair 0:f269e3021894 44 #include "gpio_map.h"
elessair 0:f269e3021894 45 #include "pad_map.h"
elessair 0:f269e3021894 46 #include "crossbar.h"
elessair 0:f269e3021894 47 #include "clock.h"
elessair 0:f269e3021894 48
elessair 0:f269e3021894 49 /**************************************************************************************************
elessair 0:f269e3021894 50 * *
elessair 0:f269e3021894 51 * Type definitions *
elessair 0:f269e3021894 52 * *
elessair 0:f269e3021894 53 **************************************************************************************************/
elessair 0:f269e3021894 54
elessair 0:f269e3021894 55
elessair 0:f269e3021894 56
elessair 0:f269e3021894 57 #define CROSS_REG_ADRS_BYTE_SIZE 4
elessair 0:f269e3021894 58
elessair 0:f269e3021894 59 #define PAD_REG_ADRS_BYTE_SIZE 4
elessair 0:f269e3021894 60
elessair 0:f269e3021894 61
elessair 0:f269e3021894 62 /*************************************************************************************************
elessair 0:f269e3021894 63 * *
elessair 0:f269e3021894 64 * Functions *
elessair 0:f269e3021894 65 * *
elessair 0:f269e3021894 66 *************************************************************************************************/
elessair 0:f269e3021894 67
elessair 0:f269e3021894 68 /**
elessair 0:f269e3021894 69 * @brief
elessair 0:f269e3021894 70 * Configures the PAD IO for desired behavior
elessair 0:f269e3021894 71 */
elessair 0:f269e3021894 72 extern void fPadInit();
elessair 0:f269e3021894 73
elessair 0:f269e3021894 74 /**
elessair 0:f269e3021894 75 * @brief
elessair 0:f269e3021894 76 * Set ouptput drive strength, output drive type & pull type for PAD IO
elessair 0:f269e3021894 77 *
elessair 0:f269e3021894 78 * @param PadNum Pad number
elessair 0:f269e3021894 79 * @param OutputDriveStrength Ouput drive strength. Ref Table: O/p drive strength
elessair 0:f269e3021894 80 * @param OutputDriveType Push/pull: 0; opern dran: 1
elessair 0:f269e3021894 81 * @param PullType Pull down active: 0; no pull active:1 or 2; pull up active: 3
elessair 0:f269e3021894 82 *
elessair 0:f269e3021894 83 * @return true for success; false for invalid parameters
elessair 0:f269e3021894 84 */
elessair 0:f269e3021894 85 extern boolean fPadIOCtrl(uint8_t, uint8_t, uint8_t, uint8_t);
elessair 0:f269e3021894 86
elessair 0:f269e3021894 87 #endif //_PAD_H_
elessair 0:f269e3021894 88 #endif /* REVD */