Fast AnalogIn module which asks for a single non blocking reading and causes and interrupt when done.
NbAnalogIn.h
- Committer:
- dontknowhow
- Date:
- 2017-03-27
- Revision:
- 0:058d32b78e5d
- Child:
- 1:2666729acca1
File content as of revision 0:058d32b78e5d:
#include "mbed.h" #ifndef NBANALOGIN_H #define NBANALOGIN_H /** Library for non blocking ADC operation */ class NbAnalogIn{ public: /** * Create a NbAnalogIn object, sets up ADC */ NbAnalogIn(); /** * does a single blocking read and returns a 12 bit output */ unsigned int read(); /** * sets the interrupt to fire when ADC is finished */ void readNb(); private: }; #endif