Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MPL3115A2 by
Diff: MPL3115A2.h
- Revision:
- 3:a2f1752add9a
- Parent:
- 2:a2fcfb7ff611
- Child:
- 4:fdf14a259af8
diff -r a2fcfb7ff611 -r a2f1752add9a MPL3115A2.h --- a/MPL3115A2.h Wed May 29 05:57:15 2013 +0000 +++ b/MPL3115A2.h Wed May 29 11:56:52 2013 +0000 @@ -3,15 +3,15 @@ #include "mbed.h" -/* Oversampling */ -#define OVERSAMPLE_RATIO_1 0 -#define OVERSAMPLE_RATIO_2 1 -#define OVERSAMPLE_RATIO_4 2 -#define OVERSAMPLE_RATIO_8 3 -#define OVERSAMPLE_RATIO_16 4 -#define OVERSAMPLE_RATIO_32 5 -#define OVERSAMPLE_RATIO_64 6 -#define OVERSAMPLE_RATIO_128 7 +// Oversampling value and minimum time between sample +#define OVERSAMPLE_RATIO_1 0 // 6 ms +#define OVERSAMPLE_RATIO_2 1 // 10 ms +#define OVERSAMPLE_RATIO_4 2 // 18 ms +#define OVERSAMPLE_RATIO_8 3 // 34 ms +#define OVERSAMPLE_RATIO_16 4 // 66 ms +#define OVERSAMPLE_RATIO_32 5 // 130 ms +#define OVERSAMPLE_RATIO_64 6 // 258 ms +#define OVERSAMPLE_RATIO_128 7 // 512 ms /* Mode */ #define ALTIMETER_MODE 1 @@ -143,6 +143,14 @@ * @return none */ void DataReady( void(*fptr)(void), unsigned char OS); + + /** + * Configure the sensor to streaming data using Interrupt + * + * @param user functin callback, oversampling values. See MPL3115A2.h + * @return none + */ + void AltitudeTrigger( void(*fptr)(void), unsigned short level); /** * Soft Reset @@ -158,6 +166,7 @@ unsigned char MPL3115A2_mode; unsigned char MPL3115A2_oversampling; void DataReady_IRQ( void); + void AltitudeTrg_IRQ( void); /** Set the device in active mode */