It is modified accordingly to work with sparkfun dmp library under mbed platform
Dependents: MPU9250-dmp-bluepill MPU9250-dmp
Fork of MotionDriver_6_1 by
Diff: mdcompat.h
- Revision:
- 1:a6c3f8680fe0
- Child:
- 4:f395d9cc57c4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mdcompat.h Mon Aug 07 13:49:51 2017 +0000 @@ -0,0 +1,49 @@ +#ifndef MY_I2C_H_INCLUDED +#define MY_I2C_H_INCLUDED + +/** + * Compatiblity Declarations + */ +#define PI 3.1415926536 +void imu_init(void); +unsigned short constrain(unsigned short x,unsigned short a, unsigned short b); + +#ifdef __cplusplus +extern "C" { +#endif + +int mbed_i2c_write( + unsigned char slave_addr, + unsigned char reg_addr, + unsigned char length, + char const *data); + +int mbed_i2c_read( + unsigned char slave_addr, + unsigned char reg_addr, + unsigned char length, + char *data); + +int delay_ms( + unsigned long num_ms); + +int get_ms( + unsigned long *count); + +int reg_int_cb( + void (*cb)(void), + unsigned char port, + unsigned char pin); + +long labs(long x); + +float fabsf(float x); + +int min(int a, int b); + + +#ifdef __cplusplus +} +#endif + +#endif // MY_I2C_H_INCLUDED