BayEOSArduino Library
Public Member Functions | List of all members
SDI12Timer Class Reference

The class used to define the processor timer for the SDI-12 serial emulation. More...

#include <SDI12_boards.h>

Public Member Functions

 SDI12Timer ()
 Construct a new SDI12Timer.
 
void configSDI12TimerPrescale (void)
 Set the processor timer prescaler such that the 10 bits of an SDI-12 character are divided into the rollover time of the timer. More...
 
void resetSDI12TimerPrescale (void)
 Reset the processor timer prescaler to whatever it was prior to being adjusted for this library. More...
 

Detailed Description

The class used to define the processor timer for the SDI-12 serial emulation.

Member Function Documentation

◆ configSDI12TimerPrescale()

void SDI12Timer::configSDI12TimerPrescale ( void  )

Set the processor timer prescaler such that the 10 bits of an SDI-12 character are divided into the rollover time of the timer.

Note
The ESP32 and ESP8266 are fast enough processors that they can take the time to read the core 'micros()' function still complete the other processing needed on the serial bits. All of the other processors using the Arduino core also have the micros function, but the rest are not fast enough to waste the processor cycles to use the micros function and must manually configure the processor timer and use the faster assembly macros to read that processor timer directly.

◆ resetSDI12TimerPrescale()

void SDI12Timer::resetSDI12TimerPrescale ( void  )

Reset the processor timer prescaler to whatever it was prior to being adjusted for this library.

Note
The prescaler is NOT set back to initial values for SAMD boards! On those processors, generic clock generator 4 will remain configured for SDI-12 until it is reset outside of this library.

The documentation for this class was generated from the following files: