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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1756|回復: 0
收起左側

stm8分享源碼

[復制鏈接]
ID:54014 發表于 2018-4-28 18:43 | 顯示全部樓層 |閱讀模式
/****************** (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****/


回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表