/*!
 * @file        main.h
 *
 * @brief       Header for main.c module
 *
 * @version     V1.0.1
 *
 * @date        2023-03-31
 *
 * @attention
 *
 *  Copyright (C) 2023 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */

/* Define to prevent recursive inclusion */
#ifndef __MAIN_H
#define __MAIN_H

/* Includes */
#include "apm32f00x.h"
#include "Board.h"
#include "apm32f00x_gpio.h"
#include "apm32f00x_misc.h"
#include "apm32f00x_usart.h"
#include "apm32f00x_rcm.h"
#include "apm32f00x_fmc.h"
#include "apm32f00x_int.h"
#include "bsp_usart.h"
#include "bsp_flash.h"
#include "common.h"
#include "ymodem.h"
#include "menu.h"

/** @addtogroup Examples
  @{
*/

/** @addtogroup BootLoader
  @{
*/

/** @defgroup BootLoader_Macros Macros
  @{
*/

#define VECT_USR_BOOT_TAB_OFFSET         0x0000

/**@} end of group BootLoader_Macros */

/** @defgroup BootLoader_Variables Variables
  @{
*/

/*!
 * @brief    function hook
 */
typedef  void (*pFunction)(void);

/* extern variables*/
extern pFunction Jump_To_Application;
extern uint32_t JumpAddress;

/**@} end of group BootLoader_Variables */

/** @defgroup BootLoader_Functions Functions
  @{
*/

/* function declaration*/
void Delay(void);
void LED_Init(void);
void Jump_to_App(uint8_t Application);

/**@} end of group BootLoader_Functions */
/**@} end of group BootLoader */
/**@} end of group Examples */

#endif
