欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: stm8分享源碼 [打印本頁]

作者: duaijun    時間: 2018-4-28 18:43
標題: stm8分享源碼
/****************** (C) COPYRIGHT  風馳iCreate嵌入式開發工作室 *****************
* 文件名  :main.c
* 描述    :按鍵掃描     
* 實驗平臺:iCreate STM8開發板
* 庫版本  :V2.1.0
* 作者    :風馳  QQ:779814207
* 博客    :
* 修改時間 :2011-12-20
*******************************************************************************/

/* Includes ------------------------------------------------------------------*/
#include "stm8s.h"
#include "led.h"
#include "key_scan.h"
#include "sysclock.h"

/* Private defines -----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/

int main(void)
{
       
        /* 設置外部24M晶振為系統主時鐘 */
        SystemClock_Init(HSE_Clock);

        Key_Init();
        LED_Init();
        //LED_Operation(LED_1, ON);
       
        while (1)
        {
                /*  添加你的代碼 */
                if (!Key_State_Check(KEY_1)) {

                        LED_Reverse(LED_2);
                }
               
                if (!Key_State_Check(KEY_2)) {
                        LED_Reverse(LED_3);
                }
        }
}




#ifdef USE_FULL_ASSERT

/**
  * @brief  Reports the name of the source file and the source line number
  *   where the assert_param error has occurred.
  * @param file: pointer to the source file name
  * @param line: assert_param error line source number
  * @retval : None
  */
void assert_failed(u8* file, u32 line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/******************* (C) COPYRIGHT 風馳iCreate嵌入式開發工作室 *****END OF FILE****/







歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1