
Version of the IKS01A1 library for this coursework
Dependencies: X_NUCLEO_COMMON
Fork of X_NUCLEO_IKS01A1 by
Revision 86:c5e05108d07b, committed 2016-06-01
- Comitter:
- Wolfgang Betz
- Date:
- Wed Jun 01 16:58:00 2016 +0200
- Parent:
- 85:cb636b531652
- Parent:
- 82:97e3e1cffcfd
- Child:
- 87:f4fa3dad9ec4
- Commit message:
- Merge branch 'master' of hg::http://wobetz@developer.mbed.org/teams/ST/code/X_NUCLEO_IKS01A1 into iks01a1-split
Changed in this revision
x_nucleo_iks01a1.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/x_nucleo_iks01a1.h Wed Jun 01 16:52:28 2016 +0200 +++ b/x_nucleo_iks01a1.h Wed Jun 01 16:58:00 2016 +0200 @@ -124,6 +124,16 @@ PinName ff_irq_pin = IKS01A1_PIN_FF); static X_NUCLEO_IKS01A1* Instance(PinName sda, PinName scl, PinName ff_irq_pin = NC); + /** + * @brief Destructor + */ + ~X_NUCLEO_IKS01A1(){ + //if(dev_i2c!=NULL){ delete dev_i2c; dev_i2c=0; } how to understand if dev_i2c is locally allocated (so it must be deleted) or comes from constructors args? + if(ht_sensor!=NULL){ delete ht_sensor; ht_sensor=NULL; } + if(magnetometer!=NULL){ delete magnetometer; magnetometer=NULL; } + if(pt_sensor!=NULL){ delete pt_sensor; pt_sensor=NULL; } + } + DevI2C *dev_i2c; HTS221 *ht_sensor;