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 ----------
6
inline
uint8_t
neg_pin
= 0x0A;
// AINCOM
7
inline
float
vRef
= 2.5f;
8
inline
float
adcScale
= 2147483648.0f;
// 2^31, signed full-scale
9
10
// ---------- Channels ----------
11
inline
uint8_t
adc_channels
[] = {2, 3};
12
inline
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
/*
19
Old (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
25
Use 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
*/
neg_pin
uint8_t neg_pin
Definition
constants.h:6
adcScale
float adcScale
Definition
constants.h:8
adc_channels
uint8_t adc_channels[]
Definition
constants.h:11
vRef
float vRef
Definition
constants.h:7
num_channels
size_t num_channels
Definition
constants.h:12
firmware
ADC_Testing
Noise_Characterization
src
constants.h
Generated by
1.15.0