FDO2 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Classes | Namespaces
fdo2.hpp File Reference

FDO2 driver: the one header to include. More...

#include <array>
#include <bit>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <span>
#include "fdo2_detail.hpp"
#include "fdo2_protocol.hpp"
#include "fdo2_types.hpp"
#include "fdo2_uart_interface.hpp"
#include "fdo2_version.h"
#include "../src/fdo2.ipp"

Go to the source code of this file.

Classes

class  fdo2::FDO2< Port >
 Driver for one FDO2-G2 or FDO2 on a platform port. More...
 

Namespaces

namespace  fdo2
 The FDO2 driver: everything it declares lives here; internals in detail.
 

Detailed Description

FDO2 driver: the one header to include.

fdo2::FDO2<Port> drives one PyroScience FDO2-G2 or FDO2 optical oxygen module through a platform port you write (see fdo2_uart_interface.hpp). The driver has no platform code, allocates nothing, throws nothing, takes no lock and is not thread-safe: give each object one owner, or guard it with one mutex.

Every operation exists in two forms over one state machine: Start*() sends the command and returns at once, Poll() advances it and reads what arrived (a super-loop or an RTOS task calls it every few milliseconds), and the blocking wrappers (MeasureOxygen() and the rest) call both with DelayUs(). Exactly one operation is in flight.