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
mdcompat.h@4:f395d9cc57c4, 2017-08-10 (annotated)
- Committer:
- mbedoguz
- Date:
- Thu Aug 10 14:42:44 2017 +0000
- Revision:
- 4:f395d9cc57c4
- Parent:
- 1:a6c3f8680fe0
mdcompat is updated, mbed_i2c_write wasn't working properly, now it does)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedoguz | 1:a6c3f8680fe0 | 1 | #ifndef MY_I2C_H_INCLUDED |
mbedoguz | 1:a6c3f8680fe0 | 2 | #define MY_I2C_H_INCLUDED |
mbedoguz | 1:a6c3f8680fe0 | 3 | |
mbedoguz | 1:a6c3f8680fe0 | 4 | /** |
mbedoguz | 1:a6c3f8680fe0 | 5 | * Compatiblity Declarations |
mbedoguz | 1:a6c3f8680fe0 | 6 | */ |
mbedoguz | 1:a6c3f8680fe0 | 7 | #define PI 3.1415926536 |
mbedoguz | 4:f395d9cc57c4 | 8 | void counter(); |
mbedoguz | 1:a6c3f8680fe0 | 9 | void imu_init(void); |
mbedoguz | 4:f395d9cc57c4 | 10 | void stamper_init(void); |
mbedoguz | 1:a6c3f8680fe0 | 11 | unsigned short constrain(unsigned short x,unsigned short a, unsigned short b); |
mbedoguz | 1:a6c3f8680fe0 | 12 | |
mbedoguz | 1:a6c3f8680fe0 | 13 | #ifdef __cplusplus |
mbedoguz | 1:a6c3f8680fe0 | 14 | extern "C" { |
mbedoguz | 1:a6c3f8680fe0 | 15 | #endif |
mbedoguz | 1:a6c3f8680fe0 | 16 | |
mbedoguz | 1:a6c3f8680fe0 | 17 | int mbed_i2c_write( |
mbedoguz | 1:a6c3f8680fe0 | 18 | unsigned char slave_addr, |
mbedoguz | 1:a6c3f8680fe0 | 19 | unsigned char reg_addr, |
mbedoguz | 1:a6c3f8680fe0 | 20 | unsigned char length, |
mbedoguz | 4:f395d9cc57c4 | 21 | unsigned char *data); |
mbedoguz | 1:a6c3f8680fe0 | 22 | |
mbedoguz | 1:a6c3f8680fe0 | 23 | int mbed_i2c_read( |
mbedoguz | 1:a6c3f8680fe0 | 24 | unsigned char slave_addr, |
mbedoguz | 1:a6c3f8680fe0 | 25 | unsigned char reg_addr, |
mbedoguz | 1:a6c3f8680fe0 | 26 | unsigned char length, |
mbedoguz | 4:f395d9cc57c4 | 27 | unsigned char *data); |
mbedoguz | 1:a6c3f8680fe0 | 28 | |
mbedoguz | 1:a6c3f8680fe0 | 29 | int delay_ms( |
mbedoguz | 1:a6c3f8680fe0 | 30 | unsigned long num_ms); |
mbedoguz | 1:a6c3f8680fe0 | 31 | |
mbedoguz | 1:a6c3f8680fe0 | 32 | int get_ms( |
mbedoguz | 1:a6c3f8680fe0 | 33 | unsigned long *count); |
mbedoguz | 1:a6c3f8680fe0 | 34 | |
mbedoguz | 1:a6c3f8680fe0 | 35 | int reg_int_cb( |
mbedoguz | 1:a6c3f8680fe0 | 36 | void (*cb)(void), |
mbedoguz | 1:a6c3f8680fe0 | 37 | unsigned char port, |
mbedoguz | 1:a6c3f8680fe0 | 38 | unsigned char pin); |
mbedoguz | 1:a6c3f8680fe0 | 39 | |
mbedoguz | 1:a6c3f8680fe0 | 40 | long labs(long x); |
mbedoguz | 1:a6c3f8680fe0 | 41 | |
mbedoguz | 1:a6c3f8680fe0 | 42 | float fabsf(float x); |
mbedoguz | 1:a6c3f8680fe0 | 43 | |
mbedoguz | 1:a6c3f8680fe0 | 44 | int min(int a, int b); |
mbedoguz | 1:a6c3f8680fe0 | 45 | |
mbedoguz | 1:a6c3f8680fe0 | 46 | |
mbedoguz | 1:a6c3f8680fe0 | 47 | #ifdef __cplusplus |
mbedoguz | 1:a6c3f8680fe0 | 48 | } |
mbedoguz | 1:a6c3f8680fe0 | 49 | #endif |
mbedoguz | 1:a6c3f8680fe0 | 50 | |
mbedoguz | 1:a6c3f8680fe0 | 51 | #endif // MY_I2C_H_INCLUDED |