mbed library sources. Supersedes mbed-src.

Fork of mbed-dev by mbed official

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?

UserRevisionLine numberNew contents of line
<> 149:156823d33999 1 /**************************************************************************//**
<> 149:156823d33999 2 * @file wwdt.c
<> 149:156823d33999 3 * @version V3.00
<> 149:156823d33999 4 * $Revision: 4 $
<> 149:156823d33999 5 * $Date: 15/08/11 10:26a $
<> 149:156823d33999 6 * @brief M451 series WWDT driver source file
<> 149:156823d33999 7 *
<> 149:156823d33999 8 * @note
<> 149:156823d33999 9 * Copyright (C) 2013~2015 Nuvoton Technology Corp. All rights reserved.
<> 149:156823d33999 10 *****************************************************************************/
<> 149:156823d33999 11 #include "M451Series.h"
<> 149:156823d33999 12
<> 149:156823d33999 13
<> 149:156823d33999 14 /** @addtogroup Standard_Driver Standard Driver
<> 149:156823d33999 15 @{
<> 149:156823d33999 16 */
<> 149:156823d33999 17
<> 149:156823d33999 18 /** @addtogroup WWDT_Driver WWDT Driver
<> 149:156823d33999 19 @{
<> 149:156823d33999 20 */
<> 149:156823d33999 21
<> 149:156823d33999 22 /** @addtogroup WWDT_EXPORTED_FUNCTIONS WWDT Exported Functions
<> 149:156823d33999 23 @{
<> 149:156823d33999 24 */
<> 149:156823d33999 25
<> 149:156823d33999 26 /**
<> 149:156823d33999 27 * @brief Open WWDT and start counting
<> 149:156823d33999 28 *
<> 149:156823d33999 29 * @param[in] u32PreScale Pre-scale setting of WWDT counter. Valid values are:
<> 149:156823d33999 30 * - \ref WWDT_PRESCALER_1
<> 149:156823d33999 31 * - \ref WWDT_PRESCALER_2
<> 149:156823d33999 32 * - \ref WWDT_PRESCALER_4
<> 149:156823d33999 33 * - \ref WWDT_PRESCALER_8
<> 149:156823d33999 34 * - \ref WWDT_PRESCALER_16
<> 149:156823d33999 35 * - \ref WWDT_PRESCALER_32
<> 149:156823d33999 36 * - \ref WWDT_PRESCALER_64
<> 149:156823d33999 37 * - \ref WWDT_PRESCALER_128
<> 149:156823d33999 38 * - \ref WWDT_PRESCALER_192
<> 149:156823d33999 39 * - \ref WWDT_PRESCALER_256
<> 149:156823d33999 40 * - \ref WWDT_PRESCALER_384
<> 149:156823d33999 41 * - \ref WWDT_PRESCALER_512
<> 149:156823d33999 42 * - \ref WWDT_PRESCALER_768
<> 149:156823d33999 43 * - \ref WWDT_PRESCALER_1024
<> 149:156823d33999 44 * - \ref WWDT_PRESCALER_1536
<> 149:156823d33999 45 * - \ref WWDT_PRESCALER_2048
<> 149:156823d33999 46 * @param[in] u32CmpValue Setting the window compared value. Valid values are between 0x0 to 0x3F.
<> 149:156823d33999 47 * @param[in] u32EnableInt Enable WWDT time-out interrupt function. Valid values are TRUE and FALSE.
<> 149:156823d33999 48 *
<> 149:156823d33999 49 * @return None
<> 149:156823d33999 50 *
<> 149:156823d33999 51 * @details This function makes WWDT module start counting with different counter period by pre-scale setting and compared window value.
<> 149:156823d33999 52 * @note This WWDT_CTL register can be write only one time after chip is powered on or reset.
<> 149:156823d33999 53 */
<> 149:156823d33999 54 void WWDT_Open(uint32_t u32PreScale,
<> 149:156823d33999 55 uint32_t u32CmpValue,
<> 149:156823d33999 56 uint32_t u32EnableInt)
<> 149:156823d33999 57 {
<> 149:156823d33999 58 WWDT->CTL = u32PreScale |
<> 149:156823d33999 59 (u32CmpValue << WWDT_CTL_CMPDAT_Pos) |
<> 149:156823d33999 60 ((u32EnableInt == TRUE) ? WWDT_CTL_INTEN_Msk : 0) |
<> 149:156823d33999 61 WWDT_CTL_WWDTEN_Msk;
<> 149:156823d33999 62 return;
<> 149:156823d33999 63 }
<> 149:156823d33999 64
<> 149:156823d33999 65 /*@}*/ /* end of group WWDT_EXPORTED_FUNCTIONS */
<> 149:156823d33999 66
<> 149:156823d33999 67 /*@}*/ /* end of group WWDT_Driver */
<> 149:156823d33999 68
<> 149:156823d33999 69 /*@}*/ /* end of group Standard_Driver */
<> 149:156823d33999 70
<> 149:156823d33999 71 /*** (C) COPYRIGHT 2013~2015 Nuvoton Technology Corp. ***/