• Stefan Popa's avatar
    iio:adxl372: Add sampling frequency support · 5e605a4d
    Stefan Popa authored
    This patch adds the option for the user to select the sampling frequency.
    Also, the user can read the available frequencies and read the currently
    set frequency via the read_raw function. The frequency can be set via the
    write_raw function.
    
    When the frequency is set, the bandwidth is also checked and ensured
    that it is constrained to at most half of the sampling frequency. Also, the
    activity and inactivity timers have to be updated because they depend on
    the selected ODR.
    Signed-off-by: default avatarStefan Popa <stefan.popa@analog.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    5e605a4d
adxl372.c 24.3 KB