summaryrefslogtreecommitdiff
path: root/globals.h
blob: b7f9e5a71018f86019a822e56fd568e027878277 (plain)
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
#ifndef GLOBALS_H_
#define GLOBALS_H_

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "error_utils.h"


#define error_queue_length 512
#define max_commands_in_input 12
#define max_output_length 512
#define max_channels 2

typedef struct {
	float frequency;
	// this will be enlarged later
} ChannelStruct;

typedef struct {
	char* aux_error_message;
	int channels;
	char enable_avrq_extra_ampls;
	char ChanKey_frequency;
} FlashStruct;


typedef struct {
	ChannelStruct ChannelState[max_channels];
	FlashStruct Flash;
	int error_queue[error_queue_length+1];
	int number_of_errors;	/* how many errors are in the error queue */
} GlobalStruct;

extern GlobalStruct globals;

#endif