/**
 *******************************************************************************
 * @file        MG32_RST_Init.h
 *
 * @brief       The RST initial code h file
 *
 * MG32 remote controller
 * @version     V1.19
 * @date        2024/12/11
 * @author      Megawin Software Center
 * @copyright   Copyright (c) 2020 Megawin Technology Co., Ltd.
 *              All rights reserved.
 *
 *******************************************************************************
 * @par         Disclaimer
 * The Demo software is provided "AS IS" without any warranty, either
 * expressed or implied, including, but not limited to, the implied warranties
 * of merchantability and fitness for a particular purpose. The author will
 * not be liable for any special, incidental, consequential or indirect
 * damages due to loss of data or any other reason.
 * These statements agree with the world wide and local dictated laws about
 * authorship and violence against these laws.
 *******************************************************************************
 *******************************************************************************
 */ 
 
#include "MG32.h"
#include "MG32_RST.h"



#ifndef _MG32_RST_INIT_H
/*!< _MG32_RST_INIT_H */ 
#define _MG32_RST_INIT_H


/**
 ******************************************************************************
 *
 * @struct      RST_InitConfig[]
 *              RST initial configuration array
 *
 ******************************************************************************
 */
//*** <<< Use Configuration Wizard in Context Menu >>> ***

//  <h> Configure RST Module
//      <h> IO State Kept After Warm Reset
//          <q.8>  PA[3:0] pins
            #define CONF_RST_CR0_PA_DIS0    0 
//          <q.12> PC[3:0] pins
            #define CONF_RST_CR0_PC_DIS0    0
//      </h>
    
//      <h> Cold Reset Source Configuration
//          <q.1>  Software Reset
            #define CONF_RST_CE_SW          0
//          <q.2>  External Reset Pin
            #define CONF_RST_CE_EX          4
//          <q.3>  CPU SYSRESETREQ Bit
            #define CONF_RST_CE_CPU         0
//          <q.5>  BOD1
            #define CONF_RST_CE_BOD1        0
//          <q.6>  Low Power STOP Mode
            #define CONF_RST_CE_LPM         0
//          <q.10> Flash Memory Read/Write/Erase Error
            #define CONF_RST_CE_MEM         0
//          <q.11> IWDT
            #define CONF_RST_CE_IWDT        0
//      </h>

//      <h> Warm Reset Source Configuration
//          <q.1>  Software Reset
            #define CONF_RST_WE_SW          2
//          <q.2>  External Reset Pin
            #define CONF_RST_WE_EX          0
//          <q.3>  CPU SYSRESETREQ Bit
            #define CONF_RST_WE_CPU         8
//          <q.5>  BOD1
            #define CONF_RST_WE_BOD1        0
//          <q.6>  Low Power STOP Mode
            #define CONF_RST_WE_LPM         0
//          <q.10> Flash Memory Read/Write/Erase Error
            #define CONF_RST_WE_MEM         0
//          <q.11> IWDT
            #define CONF_RST_WE_IWDT        0
//      </h>
//  </h>

#define CONF_RST_STA    0x00000000
#define CONF_RST_INT    0x00000000
#define CONF_RST_KEY    0x00000000
#define CONF_RST_CR0    CONF_RST_CR0_PA_DIS0 | CONF_RST_CR0_PC_DIS0
#define CONF_RST_CE     CONF_RST_CE_SW | CONF_RST_CE_EX | CONF_RST_CE_CPU | CONF_RST_CE_BOD1 | CONF_RST_CE_LPM | CONF_RST_CE_MEM | CONF_RST_CE_IWDT
#define CONF_RST_WE     CONF_RST_WE_SW | CONF_RST_WE_EX | CONF_RST_WE_CPU | CONF_RST_WE_BOD1 | CONF_RST_WE_LPM | CONF_RST_WE_MEM | CONF_RST_WE_IWDT
#define CONF_RST_AHB    0x00000000
#define CONF_RST_APB0   0x00000000
#define CONF_RST_APB1   0x00000000
//*** <<< end of configuration section >>>    ***

static const unsigned int CONF_RST_InitConfig[] =
{
    CONF_RST_STA,   // RST_STA 0 not use
    CONF_RST_INT,   // RST_INT 1 not use
    CONF_RST_KEY,   // RST_KEY 2 not use
    CONF_RST_CR0,   // RST_CR0 3
    CONF_RST_CE,    // RST_CE 4
    CONF_RST_WE,    // RST_WE 5
    CONF_RST_AHB,   // RST_AHB 6
    CONF_RST_APB0,  // RST_APB0 7
    CONF_RST_APB1,  // RST_APB1 8
};


/**
 * @name	Function announce
 *   		
 */
///@{  
void RST_Init (void);
///@}

#endif  // _MG32_RST_INIT_H
