blob: a8e342e4b8228ed8c6a4bda31c33918630288f39 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
This file is part of ChibiOS.
ChibiOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
ChibiOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file tsdaemonskels.h
* @brief Common skeletons daemon macros and structures.
*
*/
#ifndef TSDAEMONSKELS_H
#define TSDAEMONSKELS_H
#include "ch.h"
#include "ccportab.h"
#include "tscommon.h"
/*===========================================================================*/
/* Module constants. */
/*===========================================================================*/
#define N_MAX_SKEL_REQS 4
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
/*===========================================================================*/
/* Module data structures and types. */
/*===========================================================================*/
typedef struct skel_ctx {
objects_fifo_t skel_req_fifo;
msg_t skel_req_msgs[N_MAX_SKEL_REQS];
skel_req_t skel_reqs[N_MAX_SKEL_REQS];
eventflags_t skel_eventflag;
ts_service_t stub_svc;
mutex_t stub_svc_mtx;
const char *stub_svc_name;
} skel_ctx_t;
/*===========================================================================*/
/* Module macros. */
/*===========================================================================*/
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
#ifdef __cplusplus
extern "C" {
#endif
void paramsInFromRemote(skel_req_t *skreqp);
void returnToRemote(skel_req_t *skreqp, uint32_t res);
THD_FUNCTION(TsSkelsDaemon, arg);
#ifdef __cplusplus
}
#endif
/*===========================================================================*/
/* Module inline functions. */
/*===========================================================================*/
#endif /* TSDAEMONSKELS_H */
|