Handle LoRa Basic Function

Dependents:   lora_example_miun

Committer:
biwa1400
Date:
Wed Mar 08 18:54:32 2017 +0000
Revision:
0:f8af47d9f0cd
20170308

Who changed what in which revision?

UserRevisionLine numberNew contents of line
biwa1400 0:f8af47d9f0cd 1 #ifndef _ADC_H
biwa1400 0:f8af47d9f0cd 2 #define _ADC_H
biwa1400 0:f8af47d9f0cd 3
biwa1400 0:f8af47d9f0cd 4 #include "mbed.h"
biwa1400 0:f8af47d9f0cd 5 #include "mDot.h"
biwa1400 0:f8af47d9f0cd 6
biwa1400 0:f8af47d9f0cd 7
biwa1400 0:f8af47d9f0cd 8 class ADC_class
biwa1400 0:f8af47d9f0cd 9 {
biwa1400 0:f8af47d9f0cd 10 private:
biwa1400 0:f8af47d9f0cd 11 int movBits;
biwa1400 0:f8af47d9f0cd 12 int ADCwaitTime;
biwa1400 0:f8af47d9f0cd 13 unsigned short adcDistance;
biwa1400 0:f8af47d9f0cd 14 // AnalogIn Distance();
biwa1400 0:f8af47d9f0cd 15
biwa1400 0:f8af47d9f0cd 16 bool init();
biwa1400 0:f8af47d9f0cd 17 public:
biwa1400 0:f8af47d9f0cd 18 ADC_class(){init();}
biwa1400 0:f8af47d9f0cd 19 unsigned short sample();
biwa1400 0:f8af47d9f0cd 20 unsigned short read_ADC(){return adcDistance;}
biwa1400 0:f8af47d9f0cd 21 bool sample_and_judge_result(unsigned short threshold);
biwa1400 0:f8af47d9f0cd 22 };
biwa1400 0:f8af47d9f0cd 23
biwa1400 0:f8af47d9f0cd 24 #endif