Librairie adaptée au laboratoire 2
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_6180XA1 by
Revision 51:229ea522cff8, committed 2016-09-12
- Comitter:
- mapellil
- Date:
- Mon Sep 12 09:10:29 2016 +0000
- Parent:
- 50:18e064bfb156
- Child:
- 52:fca21e149934
- Commit message:
- Disabled INT generation on 6180 GPIO1 pin in case of als or range single shot polling measures.
Changed in this revision
--- a/Components/VL6180X/vl6180x_class.cpp Fri Sep 09 09:50:12 2016 +0000 +++ b/Components/VL6180X/vl6180x_class.cpp Mon Sep 12 09:10:29 2016 +0000 @@ -2702,6 +2702,7 @@ case(range_single_shot_polling): r_status=VL6180x_RangeConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_NEW_SAMPLE_READY); l_status=VL6180x_AlsConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_DISABLED); + DisableGPIOxOut(1); if((!r_status)&&(!l_status)) return RangeMeasPollSingleShot(); else @@ -2710,6 +2711,7 @@ case(als_single_shot_polling): r_status=VL6180x_AlsConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_NEW_SAMPLE_READY); l_status=VL6180x_RangeConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_DISABLED); + DisableGPIOxOut(1); if((!r_status)&&(!l_status)) return AlsMeasPollSingleShot(); else @@ -2717,7 +2719,7 @@ case(range_continuous_polling): r_status=VL6180x_RangeConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_NEW_SAMPLE_READY); - l_status=VL6180x_AlsConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_DISABLED); + l_status=VL6180x_AlsConfigInterrupt(Device, CONFIG_GPIO_INTERRUPT_DISABLED); if((!r_status)&&(!l_status)) return RangeMeasPollContinuousMode(); else
--- a/Components/VL6180X/vl6180x_class.h Fri Sep 09 09:50:12 2016 +0000 +++ b/Components/VL6180X/vl6180x_class.h Mon Sep 12 09:10:29 2016 +0000 @@ -1128,7 +1128,7 @@ int status=0; LOG_FUNCTION_START(""); status=StartMeasurement(als_single_shot_polling, NULL, NULL, NULL); - if (!status) { + if (!status) { AlsWaitDeviceReady(2000); for (status=1; status!=0;