dpp_type.h 4.32 KB
Newer Older
Reto Da Forno's avatar
initial  
Reto Da Forno committed
1
/*
Reto Da Forno's avatar
Reto Da Forno committed
2
 * Copyright (c) 2017 - 2021, ETH Zurich, Computer Engineering Group (TEC)
Reto Da Forno's avatar
initial  
Reto Da Forno committed
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
47
48
49
50
51
52
53
54
55
56
57
58
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/* 
 * dpp types 
 * MASTER file
 */

#ifndef __DPP_TYPE_H__
#define __DPP_TYPE_H__


/* dpp command types */
typedef enum {
  /* general events */
  DPP_COMMAND_INVALID    = 0,
  DPP_COMMAND_RESET      = 1,
  
  /* application specific commands */
  DPP_COMMAND_CC430      = ((uint16_t)DPP_COMPONENT_ID_CC430 << 8),
#include "types/dpp_cc430_command_type.h"
  
  DPP_COMMAND_WGPS2      = ((uint16_t)DPP_COMPONENT_ID_WGPS2 << 8),
#include "types/dpp_wgps_command_type.h"
  
  DPP_COMMAND_GEOPHONE   = ((uint16_t)DPP_COMPONENT_ID_GEOPHONE << 8),
#include "types/dpp_geophone_command_type.h"

  DPP_COMMAND_DEVBOARD   = ((uint16_t)DPP_COMPONENT_ID_DEVBOARD << 8),
#include "types/dpp_devboard_command_type.h"

59
60
  DPP_COMMAND_SX1262     = ((uint16_t)DPP_COMPONENT_ID_SX1262 << 8),
#include "types/dpp_sx1262_command_type.h"
61

62
  DPP_COMMAND_GEO3X      = ((uint16_t)DPP_COMPONENT_ID_GEO3X << 8),
63
//#include "types/dpp_geophone3x_command_type.h"
64
65
66
67
68
69

  DPP_COMMAND_GEOMINI    = ((uint16_t)DPP_COMPONENT_ID_GEOMINI << 8),
//#include "types/dpp_geomini_command_type.h"

  DPP_COMMAND_BASEBOARD  = ((uint16_t)DPP_COMPONENT_ID_BASEBOARD << 8),
#include "types/dpp_baseboard_command_type.h"
70

Reto Da Forno's avatar
initial  
Reto Da Forno committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  DPP_COMMAND_LASTID = 0xffff
} dpp_command_type_t;


/* dpp event types */
typedef enum {
  /* general events (0 - 255) */
  DPP_EVENT_INVALID      = 0,

  /* application specific events */
  DPP_EVENT_CC430        = ((uint16_t)DPP_COMPONENT_ID_CC430 << 8),
#include "types/dpp_cc430_event_type.h"
  
  DPP_EVENT_WGPS2        = ((uint16_t)DPP_COMPONENT_ID_WGPS2 << 8),
#include "types/dpp_wgps_event_type.h"
  
  DPP_EVENT_GEOPHONE     = ((uint16_t)DPP_COMPONENT_ID_GEOPHONE << 8),
#include "types/dpp_geophone_event_type.h"

  DPP_EVENT_DEVBOARD     = ((uint16_t)DPP_COMPONENT_ID_DEVBOARD << 8),
#include "types/dpp_devboard_event_type.h"
92
93
94

  DPP_EVENT_SX1262       = ((uint16_t)DPP_COMPONENT_ID_SX1262 << 8),
#include "types/dpp_sx1262_event_type.h"
95
96

  DPP_EVENT_GEO3X        = ((uint16_t)DPP_COMPONENT_ID_GEO3X << 8),
97
#include "types/dpp_geophone3x_event_type.h"
98
99
100
101
102
103

  DPP_EVENT_GEOMINI      = ((uint16_t)DPP_COMPONENT_ID_GEOMINI << 8),
//#include "types/dpp_geomini_event_type.h"

  DPP_EVENT_BASEBOARD    = ((uint16_t)DPP_COMPONENT_ID_BASEBOARD << 8),
#include "types/dpp_baseboard_event_type.h"
Reto Da Forno's avatar
initial  
Reto Da Forno committed
104
105
106
107
108
109
110
111
  
  DPP_EVENT_LASTID       = 0xffff
} dpp_event_type_t;


/* dpp fw packet types */
typedef enum {
  DPP_FW_TYPE_INVALID = 0,
112
113
114
115
116
  DPP_FW_TYPE_DATA,     /* FW data block ('data') */
  DPP_FW_TYPE_CHECK,    /* request FW verification ('info') */
  DPP_FW_TYPE_READY,    /* response to a FW validation request (header only, no payload) */
  DPP_FW_TYPE_DATAREQ,  /* request missing FW data packets ('req') */
  DPP_FW_TYPE_UPDATE,   /* initiate the FW update (header only, no payload) */
Reto Da Forno's avatar
initial  
Reto Da Forno committed
117
118
119
120
} dpp_fw_type_t;


#endif /* __DPP_TYPE_H__ */