STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1#pragma once
2#include <stddef.h>
3#include <stdint.h>
4
5// ---------- ADC config ----------
6inline uint8_t neg_pin = 0x0A; // AINCOM
7inline float vRef = 2.5f;
8inline float adcScale = 2147483648.0f; // 2^31, signed full-scale
9
10// ---------- Channels ----------
11inline uint8_t adc_channels[] = {2, 3};
12inline size_t num_channels = sizeof(adc_channels) / sizeof(adc_channels[0]);
13
14// Channels for actuator
15// actuator1_channels[] = {(name, 1), (OUP, 2)}
16// actuator2_channels[]
17
18/*
19Old (Module 8) defines were duplicate/conflicting:
20 #define DOUT 41 // MISO
21 #define DIN 5 // MOSI
22 #define SCLK 13
23 #define CS 37
24 #define START 43
25Use the constants above instead. If you must keep them for legacy code:
26
27#ifdef DOUT
28#undef DOUT
29#endif
30#define DOUT MISO
31
32#ifdef DIN
33#undef DIN
34#endif
35#define DIN MOSI
36*/
uint8_t neg_pin
Definition constants.h:6
float adcScale
Definition constants.h:8
uint8_t adc_channels[]
Definition constants.h:11
float vRef
Definition constants.h:7
size_t num_channels
Definition constants.h:12