|
加速度传感器型号为MMA8451
摘自CooCox,移植出来需要更改部分地方,需要的下
- Result MMA8451_Init(void);
- Result MMA8451_GetID(uint8_t * ID);
- Result MMA8451_ReadAccData_8(uint8_t Axis, int8_t * DataRecvBuf);
- Result MMA8451_ReadAccData_14(uint8_t Axis, int16_t * DataRecvBuf);
- Result MMA8451_DataStatusCheck(uint8_t Flag);
- Result MMA8451_IntStatusCheck(uint8_t Event);
- Result MMA8451_Active(void);
- Result MMA8451_Standby(void);
- Result MMA8451_IntCfg(uint64_t Cfg);
- Result MMA8451_Cfg(uint64_t Cfg);
- Result MMA8451_PLCfg(uint32_t Cfg, uint32_t Angle, uint8_t Cnt);
- Result MMA8451_FFMTStatusCheck(uint8_t Event);
- Result MMA8451_FFMTCfg(uint32_t Cfg, uint8_t ThresHold, uint8_t Cnt);
- Result MMA8451_TSStatusCheck(uint8_t Event);
- Result MMA8451_TransCfg(uint32_t Cfg, uint8_t ThresHold, uint8_t Cnt);
- Result MMA8451_PulseStatusCheck(uint8_t Event);
- Result MMA8451_PulseCfg(uint32_t Cfg);
- Result MMA8451_PulseThresHoldSet(uint8_t Axis, uint8_t ThresHold);
- Result MMA8451_PulseLimitSet(uint8_t Limit);
- Result MMA8451_PulseLatencySet(uint8_t Latency);
- Result MMA8451_PulseWindowSet(uint8_t Window);
- Result MMA8451_SleepCntSet(uint8_t Cnt);
- Result MMA8451_OffSetWrite(uint32_t Axis, uint8_t OffSet);
- Result MMA8451_RegWriteByte(uint8_t RegAddr, uint8_t Data);
- Result MMA8451_RegReadByte(uint8_t RegAddr, uint8_t * DataRecvBuf);
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|