-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.h
46 lines (40 loc) · 1.24 KB
/
configuration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#include <ctype.h>
//#include "redpitaya/rp.h"
/* configuration constants */
//#define SERVER_IP_ADDR "10.66.101.133"//"10.66.101.133"
//#define SERVER_IP_ADDR "10.66.100.101"
#define CLIENT_IP_PORT_A 12345
#define CLIENT_IP_PORT_B 12346
#define CLIENT_IP_PORT_ACK 12347
//#define ACQUISITION_LENGTH 150000 /* samples */
#define PRE_TRIGGER_LENGTH 0 /* samples */
#define DECIMATION DE_64 /* one of enum decimation */
#define TRIGGER_MODE TR_EXT_FALLING /* one of enum trigger */
#define TRIGGER_THRESHOLD 350 // 2048 750 /* ADC counts, 2048 ≃ +0.25V */
#define DELAYFORLOOP 5 // 66000
/* internal constants */
#define READ_BLOCK_SIZE 20000
#define SEND_BLOCK_SIZE 20000
#define RAM_A_ADDRESS 0x1e000000UL
#define RAM_A_SIZE 0x01000000UL
#define RAM_B_ADDRESS 0x1f000000UL
#define RAM_B_SIZE 0x01000000UL
#define ENABLE_MECOM 1
#define ENABLE_BME280 1
#define Kp 0.01
#define Ki 0
#define Kd 0
#define SW1TRIGPIN RP_DIO0_N
#define SW1STATUSPIN RP_DIO1_N
#define SW2TRIGPIN RP_DIO2_N
#define SW2STATUSPIN RP_DIO3_N