1.. _module-pw_analog: 2 3========= 4pw_analog 5========= 6.. pigweed-module:: 7 :name: pw_analog 8 9pw_analog contains interfaces and utility functions for using the ADC. 10 11-------- 12Features 13-------- 14 15pw::analog::AnalogInput 16======================= 17The common interface for obtaining ADC samples. This interface represents 18a single analog input or channel. Users will need to supply their own ADC 19driver implementation in order to configure and enable the ADC peripheral. 20Users are responsible for managing multithreaded access to the ADC driver if the 21ADC services multiple channels. 22 23pw::analog::MicrovoltInput 24========================== 25The common interface for obtaining voltage samples in microvolts. This interface 26represents a single voltage input or channel. Users will need to supply their 27own ADC driver implementation in order to configure and enable the ADC 28peripheral in order to provide the reference voltages and to configure and 29enable the ADC peripheral where needed. Users are responsible for managing 30multithreaded access to the ADC driver if the ADC services multiple channels. 31 32pw::analog::GmockAnalogInput 33============================ 34gMock of AnalogInput used for testing and mocking out the AnalogInput. 35 36pw::analog::GmockMicrovoltInput 37=============================== 38gMock of MicrovoltInput used for testing and mocking out the MicrovoltInput. 39 40------------- 41API reference 42------------- 43 44pw::analog::AnalogInput 45======================= 46.. doxygenclass:: pw::analog::AnalogInput 47 :members: 48 49pw::analog::GmockAnalogInput 50============================ 51.. literalinclude:: public/pw_analog/analog_input_gmock.h 52 :start-after: #pragma once 53 :end-before: } // namespace pw::analog 54 55pw::analog::MicrovoltInput 56========================== 57.. doxygenclass:: pw::analog::MicrovoltInput 58 :members: 59 60pw::analog::GmockMicrovoltInput 61=============================== 62.. literalinclude:: public/pw_analog/microvolt_input_gmock.h 63 :start-after: #pragma once 64 :end-before: } // namespace pw::analog 65