Kevin Zeng | 62683b6 | 2021-03-18 12:22:08 -0700 | [diff] [blame] | 1 | .. _module-pw_analog: |
| 2 | |
| 3 | --------- |
| 4 | pw_analog |
| 5 | --------- |
| 6 | |
| 7 | .. warning:: |
| 8 | This module is under construction and may not be ready for use. |
| 9 | |
| 10 | pw_analog contains interfaces and utility functions for using the ADC. |
| 11 | |
| 12 | Features |
| 13 | ======== |
| 14 | |
| 15 | pw::analog::AnalogInput |
| 16 | ----------------------- |
| 17 | The common interface for obtaining ADC samples. This interface represents |
| 18 | a single analog input or channel. Users will need to supply their own ADC |
| 19 | driver implementation in order to configure and enable the ADC peripheral. |
| 20 | Users are responsible for managing multithreaded access to the ADC driver if the |
| 21 | ADC services multiple channels. |
Kevin Zeng | c24e332 | 2021-05-04 20:20:53 -0700 | [diff] [blame] | 22 | |
| 23 | pw::analog::MicrovoltInput |
| 24 | -------------------------- |
| 25 | The common interface for obtaining voltage samples in microvolts. This interface |
| 26 | represents a single voltage input or channel. Users will need to supply their |
| 27 | own ADC driver implementation in order to configure and enable the ADC |
| 28 | peripheral in order to provide the reference voltages and to configure and |
| 29 | enable the ADC peripheral where needed. Users are responsible for managing |
| 30 | multithreaded access to the ADC driver if the ADC services multiple channels. |
Kevin Zeng | fb88887 | 2021-06-08 10:39:06 -0700 | [diff] [blame] | 31 | |
| 32 | pw::analog::GmockAnalogInput |
| 33 | ------------------------------- |
| 34 | gMock of AnalogInput used for testing and mocking out the AnalogInput. |
| 35 | |
| 36 | pw::analog::GmockMicrovoltInput |
| 37 | ------------------------------- |
| 38 | gMock of MicrovoltInput used for testing and mocking out the MicrovoltInput. |