Uploaded image for project: 'Mynewt'
  1. Mynewt
  2. MYNEWT-881

SensorAPI: Add sensor_clear_low/high_thresh() API and LIS2DH12 set threshold cb fix

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • v1_3_0_rel
    • v1_4_0_rel
    • Drivers, Sensor Framework
    • Security Level: Public (Viewable by anyone)
    • ruuvitag-revb2

    Description

      • There are two issues for calling the lis2dh12_sensor_set_trigger_thresh() :

      1. gpio irq was not being released before doing a re-initialization
      2. srec was malloced and calling the function multiple times would have malloced additional memory without freeing it.

      Solution:
      1. Release the gpio irq
      2. Remove the malloc and add a ptr for the sensor in each type trait so that a sensor read could be performed in the irq handler.

      Also, sensor_unset_thresh() API was added to unset thresholds triggers/interrupts.

      • Add sensor_clear_low_thresh() and sensor_clear_high_thresh() APIs

      Attachments

        Issue Links

          Activity

            People

              vrahane Vipul Rahane
              vrahane Vipul Rahane
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: