加速度传感器型号为MMA8451
摘自CooCox,移植出来需要更改部分地方,需要的下
MMA8451.zip
(16.3 KB, 下载次数: 11)
2014-9-11 15:05 上传
点击文件名下载附件
- 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);
复制代码
一周热门 更多>