Sonochan II 0.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
HW_bridge_uniprot.h
Go to the documentation of this file.
1
15 #ifndef _HW_BRIDGE_UNIPROT_H
16 #define _HW_BRIDGE_UNIPROT_H
17
18 //=================================| Options |=================================
20 #define HW_BRIDGE_UNIPROT_USED_PIPE 0
21
27 #define HW_BRIDGE_UNIPROT_SUPPORT_RTOS 1
28
29
37 #define HW_BRIDGE_UNIPROT_DEBUG 1
38
39 //=========================| Some checks of settings |=========================
40
41 //================================| Includes |=================================
42 // HW library
43 #include "HW.h"
44
45 // Universal protocol library
46 #include "uniprot.h"
47
48 // FreeRTOS stuff
49 #if HW_BRIDGE_UNIPROT_SUPPORT_RTOS != 0
50 #include "FreeRTOS.h"
51 #include "task.h"
52 #endif
53
54 //===============================| Definitions |===============================
60 #define HW_BRIDGE_UNIPROT_RX_BUFFER_SIZE 8
61
68 #define HW_BRIDGE_UNIPROT_TX_BUFFER_SIZE (26+2*GD_MAX_STRING_SIZE)
69 //===============================| Structures |================================
79 typedef enum{
80 HW_BRIDGE_UNIPROT_STATE_WAITING_FOR_REQUEST = 0,
81 HW_BRIDGE_UNIPROT_STATE_REQUEST_GET_SETTING = 1,
82 HW_BRIDGE_UNIPROT_STATE_REQUEST_SET_SETTINGS = 2,
83 HW_BRIDGE_UNIPROT_STATE_REQUEST_GET_METADATA = 3,
84 HW_BRIDGE_UNIPROT_STATE_REQUEST_GET_NUM_OF_DEV = 4,
85 HW_BRIDGE_UNIPROT_STATE_SEND_ONLY_RETURN_CODE,
86 HW_BRIDGE_UNIPROT_STATE_SEND_RETURN_CODE_AND_METADATA,
87 HW_BRIDGE_UNIPROT_STATE_SEND_RETURN_CODE_AND_SETTING,
88
89
90 /* This case never should happen, but may in debug
91 */
92 HW_BRIDGE_UNIPROT_STATE_FAILED_TO_READ_METADATA
93 } BRIDGE_STATE;
94
95 //==========================| Functions prototypes |===========================
96 void bridge_init(void);
97
98
99 #if HW_BRIDGE_UNIPROT_SUPPORT_RTOS != 0
100 void bridge_task_FreeRTOS(void *pvParameters);
101 #endif
102
103 void bridge_task(void);
104
105
106
107 #endif