| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
isf_ci_protocol.c
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2014, Freescale Semiconductor, Inc.
4 *
5 */
6
7 /*!
8 * @file isf_ci_protocol.c
9 * @brief Command Interpreter (CI) protocol file containing the protocol routing table.
10 *
11 */
12
13 #include "isf.h"
14 #include "isf_ci_protocol.h"
15
16
17 #include "Protocol1.h"
18
19
20 extern isf_status_t ci_mbox_init(uint8, void *);
21 extern isf_status_t ci_protocol_CB_mbox(uint32, uint8 *, uint32 *, uint8 *);
22
23 extern isf_status_t ci_stream_init(uint8, void *);
24 extern isf_status_t ci_protocol_CB_stream(uint32, uint8 *, uint32 *, uint8 *);
25
26
27
28 /*!
29 * @brief CI Receive buffer size.
30 */
31 uint32 isf_ci_get_recv_size(void)
32 {
33 /* Do not modify. */
34 return (uint32)34;
35 }
36
37
38
39 /*!
40 * @brief CI protocol user defined initialization data pointer table.
41 */
42 ci_protocol_initdata_ptr_t ci_protocol_initptr_table[] =
43 {
44 (ci_protocol_initdata_ptr_t)NULL,
45 (ci_protocol_initdata_ptr_t)NULL
46 };
47
48
49
50 /*!
51 * @brief CI protocol routing table.
52 */
53 const ci_protocol_t ci_protocol_table[] =
54 {
55
56 // Legacy mailbox protocol. Reserved, do not modify.
57 {
58 (ci_protocol_init_funcp_t*)ci_mbox_init, // Init function
59 (ci_protocol_callback_funcp_t*)ci_protocol_CB_mbox, // Callback
60 0, // Destination buffer size
61 CI_PROTOCOL_ID_MBOX // Protocol ID
62 },
63
64 {
65 (ci_protocol_init_funcp_t*)ci_stream_init,
66 (ci_protocol_callback_funcp_t*)ci_protocol_CB_stream,
67 0,
68 CI_PROTOCOL_ID_Protocol1
69 },
70
71
72 // Last element must contain NULL data.
73 {
74 NULL, // Init function
75 NULL, // Callback
76 0, // Destination buffer size
77 0, // Protocol ID
78 }
79 };
80
81
82
uint8
unsigned char uint8
This defines uint8 as unsigned char.
Definition: isf_types.h:18
ci_protocol_init_funcp_t
isf_status_t(* ci_protocol_init_funcp_t)(uint8 aprotocolID, void *apInitData)
This is a CI protocol intialization callback function pointer.
Definition: isf_ci_protocol.h:147
ci_protocol_initdata_ptr_t
void * ci_protocol_initdata_ptr_t
This is the pointer to the user defined data structure to be passed into the ci_protocol_init_funcp_t...
Definition: isf_ci_protocol.h:173
isf_ci_protocol.h
Command Interpreter (CI) Protocol header file.
isf_ci_get_recv_size
uint32 isf_ci_get_recv_size(void)
CI Receive buffer size.
Definition: isf_ci_protocol.c:31
ci_stream_init
isf_status_t ci_stream_init(uint8, void *)
This is a CI stream protocol intialization callback function pointer.
Definition: ci_protocol_stream.c:86
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
Protocol1.h
ci_protocol_initptr_table
ci_protocol_initdata_ptr_t ci_protocol_initptr_table[]
CI protocol user defined initialization data pointer table.
Definition: isf_ci_protocol.c:42
CI_PROTOCOL_ID_MBOX
Definition: isf_ci_protocol.h:31
ci_protocol_CB_mbox
isf_status_t ci_protocol_CB_mbox(uint32, uint8 *, uint32 *, uint8 *)
Definition: ci_protocol_mbox.c:795
isf.h
Main ISF header file. Contains code common to all ISF components.
ci_mbox_init
isf_status_t ci_mbox_init(uint8, void *)
Definition: ci_protocol_mbox.c:531
ci_protocol_CB_stream
isf_status_t ci_protocol_CB_stream(uint32, uint8 *, uint32 *, uint8 *)
This is a CI stream protocol callback function pointer.
Definition: ci_protocol_stream.c:1016
isf_status_t
int32 isf_status_t
ISF return status type.
Definition: isf.h:51
ci_protocol_table
const ci_protocol_t ci_protocol_table[]
CI protocol routing table.
Definition: isf_ci_protocol.c:53
CI_PROTOCOL_ID_Protocol1
Definition: isf_ci_protocol.h:33
ci_protocol_t
This structure binds a protocol ID to a set of related functions and data. When a packet is received ...
Definition: isf_ci_protocol.h:158
ci_protocol_callback_funcp_t
isf_status_t(* ci_protocol_callback_funcp_t)(uint32 anumSrcBytes, uint8 *apSrc, uint32 *apnumDestBytes, uint8 *apDest)
This is a CI protocol callback function pointer.
Definition: isf_ci_protocol.h:116
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.