/* add user code begin Header */ /** ************************************************************************** * @file main.c * @brief main program ************************************************************************** * Copyright notice & Disclaimer * * The software Board Support Package (BSP) that is made available to * download from Artery official website is the copyrighted work of Artery. * Artery authorizes customers to use, copy, and distribute the BSP * software and its related documentation for the purpose of design and * development in conjunction with Artery microcontrollers. Use of the * software is governed by this copyright notice and the following disclaimer. * * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. * ************************************************************************** */ /* add user code end Header */
/* Includes ------------------------------------------------------------------*/ #include"at32f435_437_wk_config.h" #include"wk_gpio.h" #include"wk_system.h"
/* private includes ----------------------------------------------------------*/ /* add user code begin private includes */
/* add user code end private includes */
/* private typedef -----------------------------------------------------------*/ /* add user code begin private typedef */
/* add user code end private typedef */
/* private define ------------------------------------------------------------*/ /* add user code begin private define */
/* add user code end private define */
/* private macro -------------------------------------------------------------*/ /* add user code begin private macro */ #define SET_BIT(reg, bit) (reg |= (1 << bit)) #define CLEAR_BIT(reg, bit) (reg &= ~(1 << bit)) /* add user code end private macro */
/* private variables ---------------------------------------------------------*/ /* add user code begin private variables */ confirm_state led2_flag = FALSE; confirm_state led3_flag = FALSE; /* add user code end private variables */
/* private function prototypes --------------------------------------------*/ /* add user code begin function prototypes */ staticuint8_tkey_scan(); /* add user code end function prototypes */
/* private user code ---------------------------------------------------------*/ /* add user code begin 0 */
/* add user code end 0 */
/** * @brief main function. * @param none * @retval none */ intmain(void) { /* add user code begin 1 */
/* add user code end 1 */
/* system clock config. */ wk_system_clock_config();