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
|
/**
* @file evk_lib.h
* @brief Event library -- API specifications for kernel modules
*
* @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _evk_lib_h_
#define _evk_lib_h_
#include <agldd/ev_common.h>
#include <linux/types.h>
#include <linux/ioctl.h>
/** @addtogroup EVK_in
* @{ */
#define EVK_NAME "evk"
#define EVK_DEV_NAME "/dev/agl/"EVK_NAME
#define EVK_DEV_MAJOR (1033 % 256)
#define EVK_IOC_MAGIC 0xE7
#define EVK_IOC_CREATE_FLAG _IO(EVK_IOC_MAGIC, 0x00)
#define EVK_IOC_CREATE_FLAG64 _IO(EVK_IOC_MAGIC, 0x01)
#define EVK_IOC_CREATE_MESSAGE_QUEUE _IO(EVK_IOC_MAGIC, 0x02)
#define EVK_IOC_ALLOC_FLAG_ID _IO(EVK_IOC_MAGIC, 0x03)
#define EVK_IOC_ALLOC_FLAG64_ID _IO(EVK_IOC_MAGIC, 0x04)
#define EVK_IOC_ALLOC_QUEUE_ID _IO(EVK_IOC_MAGIC, 0x05)
#define EVK_IOC_DESTROY_QUEUE _IO(EVK_IOC_MAGIC, 0x06)
#define EVK_IOC_STORE_FLAG _IO(EVK_IOC_MAGIC, 0x07)
#define EVK_IOC_STORE_FLAG64 _IO(EVK_IOC_MAGIC, 0x08)
#define EVK_IOC_STORE_MESSAGE _IO(EVK_IOC_MAGIC, 0x09)
#define EVK_IOC_SET_POLL _IO(EVK_IOC_MAGIC, 0x0a)
#define EVK_IOC_GET_EVENT _IO(EVK_IOC_MAGIC, 0x0b)
#define EVK_IOC_PEEK_EVENT _IO(EVK_IOC_MAGIC, 0x0c)
#define EVK_IOC_WAIT_EVENT _IO(EVK_IOC_MAGIC, 0x0d)
#define EVK_IOC_GET_NEXT_EVENT _IO(EVK_IOC_MAGIC, 0x0e)
#define EVK_IOC_PEEK_NEXT_EVENT _IO(EVK_IOC_MAGIC, 0x0f)
#define EVK_IOC_DEBUG_LIST _IO(EVK_IOC_MAGIC, 0x10)
typedef struct {
EV_ID queueID;/**< Queue ID */
UINT32 max_bytes;/**< Maximum number of bytes for an event */
UINT8 length;/**< Queue length */
EV_Message_Queue_Type type;/**< Type */
} EVK_Message_Queue_Request;
typedef struct {
INT32 num; /**< Number of queue ID of search */
EV_ID ids[EV_MAX_IDS_IN_PROCESS]; /**< Queue ID of search */
EV_Event ev; /**< [OUT] First event that occured */
} EVK_Next_Event_Query;
/** @} */
#endif /* !_evk_lib_h */
|