GY-63_MS5611/libraries/AsyncAnalog/AsyncAnalog.h

44 lines
668 B
C
Raw Normal View History

2021-01-29 06:31:58 -05:00
#pragma once
//
// FILE: AsyncAnalog.h
// AUTHOR: Rob Tillaart
2021-12-13 13:46:42 -05:00
// VERSION: 0.1.5
2021-01-29 06:31:58 -05:00
// DATE: 2018-09-05
2021-10-19 05:14:50 -04:00
// PURPOSE: async version of analogRead for AVR
2021-01-29 06:31:58 -05:00
// URL: https://github.com/RobTillaart/AsyncAnalog
//
2021-10-19 05:14:50 -04:00
2021-01-29 06:31:58 -05:00
#if !defined(ARDUINO_ARCH_AVR)
2021-12-13 13:46:42 -05:00
#error “AsyncAnalog library only supports boards with an AVR processor .”
2021-01-29 06:31:58 -05:00
#else
// (ARDUINO_ARCH_SAM) future
#include "Arduino.h"
#include "wiring_private.h"
#include "pins_arduino.h"
2021-12-13 13:46:42 -05:00
#define ASYNCANALOG_LIB_VERSION (F("0.1.5"))
2021-10-19 05:14:50 -04:00
2021-01-29 06:31:58 -05:00
class AsyncAnalog
{
public:
2021-10-19 05:14:50 -04:00
AsyncAnalog(const uint8_t pin);
2021-01-29 06:31:58 -05:00
void start();
bool ready();
int value();
private:
uint8_t _pin;
};
#endif
// -- END OF FILE --