Oğuz Özdemir / MotionDriver_6_1

Dependents:   MPU9250-dmp-bluepill MPU9250-dmp

Fork of MotionDriver_6_1 by Prosper Van

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mdcompat.h Source File

mdcompat.h

00001 #ifndef MY_I2C_H_INCLUDED
00002 #define MY_I2C_H_INCLUDED
00003 
00004 /**
00005  * Compatiblity Declarations
00006  */
00007 #define PI 3.1415926536
00008 void counter();
00009 void imu_init(void);
00010 void stamper_init(void);
00011 unsigned short constrain(unsigned short x,unsigned short a, unsigned short b);
00012 
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 
00017 int mbed_i2c_write(
00018     unsigned char slave_addr,
00019     unsigned char reg_addr,
00020     unsigned char length,
00021     unsigned char *data);
00022 
00023 int mbed_i2c_read(
00024     unsigned char slave_addr,
00025     unsigned char reg_addr,
00026     unsigned char length,
00027     unsigned char *data);
00028 
00029 int delay_ms(
00030     unsigned long num_ms);
00031 
00032 int get_ms(
00033     unsigned long *count);
00034 
00035 int reg_int_cb(
00036     void (*cb)(void),
00037     unsigned char port,
00038     unsigned char pin);
00039 
00040 long labs(long x);
00041 
00042 float fabsf(float x);
00043 
00044 int min(int a, int b);
00045 
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 
00051 #endif // MY_I2C_H_INCLUDED