資源簡介
stm8s MPU6050封裝好的庫函數,直接加入自己的工程,直接調用函數即可!!!!十分之方便快捷,簡化開發。
代碼片段和文件信息
#include?“MPU6050.h“
#include?“stm8s.h“
#include?
#include?“stdarg.h“
void?InitializeSystemClock()?{
CLK->ICKR?=?0;???????????????????????//??Reset?the?Internal?Clock?Register.
CLK->ICKR?=?CLK_ICKR_HSIEN;???????????????//??Enable?the?HSI.
CLK->ECKR?=?0;???????????????????????//??Disable?the?external?clock.
while?((CLK->ICKR?&?CLK_ICKR_HSIRDY)?==?0);???????//??Wait?for?the?HSI?to?be?ready?for?use.
CLK->CKDIVR?=?0;?????????????????????//??Ensure?the?clocks?are?running?at?full?speed.
CLK->PCKENR1?=?0xff;?????????????????//??Enable?all?peripheral?clocks.
CLK->PCKENR2?=?0xff;?????????????????//??Ditto.
CLK->CCOR?=?0;???????????????????????//??Turn?off?CCO.
CLK->HSITRIMR?=?0;???????????????????//??Turn?off?any?HSIU?trimming.
CLK->SWIMCCR?=?0;???????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7194??2019-12-24?16:21??MPU6050.c
?????文件???????1497??2019-12-24?16:17??MPU6050.h
-----------?---------??----------?-----??----
?????????????????8691????????????????????2
- 上一篇:Argis 地圖標點畫圖 繪制
- 下一篇:8路呼叫器仿真文件.rar
評論
共有 條評論