【分享】Level3奖品KE02加速度传感器库文件

2020-02-20 21:09发布

加速度传感器型号为MMA8451
摘自CooCox,移植出来需要更改部分地方,需要的下

MMA8451.zip (16.3 KB, 下载次数: 11) 2014-9-11 15:05 上传 点击文件名下载附件

  1. Result MMA8451_Init(void);
  2. Result MMA8451_GetID(uint8_t * ID);
  3. Result MMA8451_ReadAccData_8(uint8_t Axis, int8_t * DataRecvBuf);
  4. Result MMA8451_ReadAccData_14(uint8_t Axis, int16_t * DataRecvBuf);
  5. Result MMA8451_DataStatusCheck(uint8_t Flag);
  6. Result MMA8451_IntStatusCheck(uint8_t Event);
  7. Result MMA8451_Active(void);
  8. Result MMA8451_Standby(void);
  9. Result MMA8451_IntCfg(uint64_t Cfg);
  10. Result MMA8451_Cfg(uint64_t Cfg);
  11. Result MMA8451_PLCfg(uint32_t Cfg, uint32_t Angle, uint8_t Cnt);
  12. Result MMA8451_FFMTStatusCheck(uint8_t Event);
  13. Result MMA8451_FFMTCfg(uint32_t Cfg, uint8_t ThresHold, uint8_t Cnt);
  14. Result MMA8451_TSStatusCheck(uint8_t Event);
  15. Result MMA8451_TransCfg(uint32_t Cfg, uint8_t ThresHold, uint8_t Cnt);
  16. Result MMA8451_PulseStatusCheck(uint8_t Event);
  17. Result MMA8451_PulseCfg(uint32_t Cfg);
  18. Result MMA8451_PulseThresHoldSet(uint8_t Axis, uint8_t ThresHold);
  19. Result MMA8451_PulseLimitSet(uint8_t Limit);
  20. Result MMA8451_PulseLatencySet(uint8_t Latency);
  21. Result MMA8451_PulseWindowSet(uint8_t Window);
  22. Result MMA8451_SleepCntSet(uint8_t Cnt);
  23. Result MMA8451_OffSetWrite(uint32_t Axis, uint8_t OffSet);
  24. Result MMA8451_RegWriteByte(uint8_t RegAddr, uint8_t Data);
  25. Result MMA8451_RegReadByte(uint8_t RegAddr, uint8_t * DataRecvBuf);
复制代码
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。