Commit Graph

6 Commits

Author SHA1 Message Date
Hector Bujanda de9db29af7 adc: detect error when sampling
Avoid sample conversion after sampling error.

https://onedigi.atlassian.net/browse/DEL-7623

Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
(cherry picked from commit 6e7e975754)
2021-07-26 11:49:22 +02:00
Hector Bujanda dfa1e51519 apix-pwm-example: apix-adc-example: improve arguments parsing
In previous implementation, if alias wanted to be used, it had to be passed twice.

https://jira.digi.com/browse/DEL-6425

Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
2020-04-02 12:39:21 -07:00
Francisco Gil 5c3834f845 adc: fix segmentation fault when exiting the application
'adc_sampling_cb_data' struct is a local variable of the 'main' function.
Sometimes, the ADC callback accesses to it once the main function has exited
(when it is out of scope), causing a segmentation fault.
To solve this issue, adc_sampling_cb_data' struct is now a global variable.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2017-12-11 14:04:03 +01:00
Francisco Gil 3b7bbdbf65 dey-examples: Rework the examples to be launch-ready
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2017-11-30 13:12:58 +01:00
Francisco Gil 58469e08da adc: rework the example to remove rms and mean value.
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2017-11-23 13:45:23 +01:00
Francisco Gil 68f3f0f815 adc_example: Add an example about how to use the adc.
This example takes periodic samples using a thread and
calculate the rms value and the mean value of the samples
taken.

https://jira.digi.com/browse/DEL-4889

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2017-11-20 17:55:40 +01:00