REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
daq.h
Go to the documentation of this file.
1// Copyright (c) 2024 anabrid GmbH
2// Contact: https://www.anabrid.com/licensing/
3// SPDX-License-Identifier: MIT OR GPL-2.0-or-later
4
5#pragma once
6
7#include <FlexIO_t4.h>
8#include <array>
9
10#include "utils/error.h"
11#include <daq/base.h>
12#include <daq/daq.h>
13
14namespace carrier {
15
16// Forward declaration for calibration
17class Carrier;
18
19} // namespace carrier
20
21using status = utils::status;
22
40namespace daq {
41
42namespace details {
43
44constexpr uint8_t PIN_CNVST = 7;
45constexpr uint8_t PIN_CLK = 6;
46constexpr uint8_t PIN_GATE = 32;
47constexpr std::array<uint8_t, NUM_CHANNELS> PINS_MISO = {34, 35, 36, 37, 11, 10, 9, 8};
48
49namespace flexio {
50
51static constexpr uint8_t _gated_timer_idx = 0;
52static constexpr uint8_t _sample_timer_idx = 1;
53static constexpr uint8_t _cnvst_timer_idx = 2;
54static constexpr uint8_t _delay_timer_idx = 3;
55static constexpr uint8_t _clk_timer_idx = 4;
56
57inline FlexIOHandler *get_flexio() { return FlexIOHandler::flexIOHandler_list[1]; }
58
59status _init_once();
60void _init_timers();
61void _init_shifters();
62
63} // namespace flexio
64
65} // namespace details
66
67} // namespace daq
utils::status status
Definition daq.h:21
Definition daq.h:14
Routines for data acquisition (DAQ) using the internal analog-to-digital converters (ADC).
Definition daq.cpp:16