mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Thu Sep 18 14:00:17 2014 +0100
Revision:
324:406fd2029f23
Synchronized with git revision a73f28e6fbca9559fbed2726410eeb4c0534a4a5

Full URL: https://github.com/mbedmicro/mbed/commit/a73f28e6fbca9559fbed2726410eeb4c0534a4a5/

Extended #476, which does not break ethernet for K64F

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 324:406fd2029f23 1 /*
mbed_official 324:406fd2029f23 2 * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
mbed_official 324:406fd2029f23 3 * All rights reserved.
mbed_official 324:406fd2029f23 4 *
mbed_official 324:406fd2029f23 5 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 324:406fd2029f23 6 * are permitted provided that the following conditions are met:
mbed_official 324:406fd2029f23 7 *
mbed_official 324:406fd2029f23 8 * o Redistributions of source code must retain the above copyright notice, this list
mbed_official 324:406fd2029f23 9 * of conditions and the following disclaimer.
mbed_official 324:406fd2029f23 10 *
mbed_official 324:406fd2029f23 11 * o Redistributions in binary form must reproduce the above copyright notice, this
mbed_official 324:406fd2029f23 12 * list of conditions and the following disclaimer in the documentation and/or
mbed_official 324:406fd2029f23 13 * other materials provided with the distribution.
mbed_official 324:406fd2029f23 14 *
mbed_official 324:406fd2029f23 15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
mbed_official 324:406fd2029f23 16 * contributors may be used to endorse or promote products derived from this
mbed_official 324:406fd2029f23 17 * software without specific prior written permission.
mbed_official 324:406fd2029f23 18 *
mbed_official 324:406fd2029f23 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
mbed_official 324:406fd2029f23 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
mbed_official 324:406fd2029f23 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 324:406fd2029f23 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
mbed_official 324:406fd2029f23 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
mbed_official 324:406fd2029f23 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
mbed_official 324:406fd2029f23 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
mbed_official 324:406fd2029f23 26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed_official 324:406fd2029f23 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
mbed_official 324:406fd2029f23 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 324:406fd2029f23 29 */
mbed_official 324:406fd2029f23 30
mbed_official 324:406fd2029f23 31 #include "fsl_rcm_hal.h"
mbed_official 324:406fd2029f23 32
mbed_official 324:406fd2029f23 33 /*******************************************************************************
mbed_official 324:406fd2029f23 34 * Definitions
mbed_official 324:406fd2029f23 35 ******************************************************************************/
mbed_official 324:406fd2029f23 36
mbed_official 324:406fd2029f23 37 /*******************************************************************************
mbed_official 324:406fd2029f23 38 * Code
mbed_official 324:406fd2029f23 39 ******************************************************************************/
mbed_official 324:406fd2029f23 40
mbed_official 324:406fd2029f23 41 /*FUNCTION**********************************************************************
mbed_official 324:406fd2029f23 42 *
mbed_official 324:406fd2029f23 43 * Function Name : RCM_HAL_GetSrcStatusCmd
mbed_official 324:406fd2029f23 44 * Description : Get the reset source status
mbed_official 324:406fd2029f23 45 *
mbed_official 324:406fd2029f23 46 * This function will get the current reset source status for specified source
mbed_official 324:406fd2029f23 47 *
mbed_official 324:406fd2029f23 48 *END**************************************************************************/
mbed_official 324:406fd2029f23 49 bool RCM_HAL_GetSrcStatusCmd(uint32_t baseAddr, rcm_source_names_t srcName)
mbed_official 324:406fd2029f23 50 {
mbed_official 324:406fd2029f23 51 bool retValue = false;
mbed_official 324:406fd2029f23 52
mbed_official 324:406fd2029f23 53 assert(srcName < kRcmSrcNameMax);
mbed_official 324:406fd2029f23 54
mbed_official 324:406fd2029f23 55 switch (srcName)
mbed_official 324:406fd2029f23 56 {
mbed_official 324:406fd2029f23 57 case kRcmWakeup: /* low-leakage wakeup reset */
mbed_official 324:406fd2029f23 58 retValue = (bool)BR_RCM_SRS0_WAKEUP(baseAddr);
mbed_official 324:406fd2029f23 59 break;
mbed_official 324:406fd2029f23 60 case kRcmLowVoltDetect: /* low voltage detect reset */
mbed_official 324:406fd2029f23 61 retValue = (bool)BR_RCM_SRS0_LVD(baseAddr);
mbed_official 324:406fd2029f23 62 break;
mbed_official 324:406fd2029f23 63 case kRcmLossOfClk: /* loss of clock reset */
mbed_official 324:406fd2029f23 64 retValue = (bool)BR_RCM_SRS0_LOC(baseAddr);
mbed_official 324:406fd2029f23 65 break;
mbed_official 324:406fd2029f23 66 #if FSL_FEATURE_RCM_HAS_LOL
mbed_official 324:406fd2029f23 67 case kRcmLossOfLock: /* loss of lock reset */
mbed_official 324:406fd2029f23 68 retValue = (bool)BR_RCM_SRS0_LOL(baseAddr);
mbed_official 324:406fd2029f23 69 break;
mbed_official 324:406fd2029f23 70 #endif
mbed_official 324:406fd2029f23 71 case kRcmWatchDog: /* watch dog reset */
mbed_official 324:406fd2029f23 72 retValue = (bool)BR_RCM_SRS0_WDOG(baseAddr);
mbed_official 324:406fd2029f23 73 break;
mbed_official 324:406fd2029f23 74 case kRcmExternalPin: /* external pin reset */
mbed_official 324:406fd2029f23 75 retValue = (bool)BR_RCM_SRS0_PIN(baseAddr);
mbed_official 324:406fd2029f23 76 break;
mbed_official 324:406fd2029f23 77 case kRcmPowerOn: /* power on reset */
mbed_official 324:406fd2029f23 78 retValue = (bool)BR_RCM_SRS0_POR(baseAddr);
mbed_official 324:406fd2029f23 79 break;
mbed_official 324:406fd2029f23 80 case kRcmJtag: /* JTAG generated reset */
mbed_official 324:406fd2029f23 81 retValue = (bool)BR_RCM_SRS1_JTAG(baseAddr);
mbed_official 324:406fd2029f23 82 break;
mbed_official 324:406fd2029f23 83 case kRcmCoreLockup: /* core lockup reset */
mbed_official 324:406fd2029f23 84 retValue = (bool)BR_RCM_SRS1_LOCKUP(baseAddr);
mbed_official 324:406fd2029f23 85 break;
mbed_official 324:406fd2029f23 86 case kRcmSoftware: /* software reset */
mbed_official 324:406fd2029f23 87 retValue = (bool)BR_RCM_SRS1_SW(baseAddr);
mbed_official 324:406fd2029f23 88 break;
mbed_official 324:406fd2029f23 89 case kRcmSystem: /* system reset request bit set reset */
mbed_official 324:406fd2029f23 90 retValue = (bool)BR_RCM_SRS1_MDM_AP(baseAddr);
mbed_official 324:406fd2029f23 91 break;
mbed_official 324:406fd2029f23 92 case kRcmEzport: /* EzPort reset */
mbed_official 324:406fd2029f23 93 retValue = (bool)BR_RCM_SRS1_EZPT(baseAddr);
mbed_official 324:406fd2029f23 94 break;
mbed_official 324:406fd2029f23 95 case kRcmStopModeAckErr: /* stop mode ack error reset */
mbed_official 324:406fd2029f23 96 retValue = (bool)BR_RCM_SRS1_SACKERR(baseAddr);
mbed_official 324:406fd2029f23 97 break;
mbed_official 324:406fd2029f23 98 default:
mbed_official 324:406fd2029f23 99 retValue = false;
mbed_official 324:406fd2029f23 100 break;
mbed_official 324:406fd2029f23 101 }
mbed_official 324:406fd2029f23 102
mbed_official 324:406fd2029f23 103 return retValue;
mbed_official 324:406fd2029f23 104 }
mbed_official 324:406fd2029f23 105
mbed_official 324:406fd2029f23 106 /*******************************************************************************
mbed_official 324:406fd2029f23 107 * EOF
mbed_official 324:406fd2029f23 108 ******************************************************************************/
mbed_official 324:406fd2029f23 109