Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_flash_messages.h
Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 
11 #ifndef TAF_FLASH_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_FLASH_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_flash_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_FLASH_MSG_SIZE
18 
19 // Define the message type for communicating between client and server
20 typedef struct __attribute__((packed))
21 {
22  uint32_t id;
23  uint8_t buffer[_MAX_MSG_SIZE];
24 }
26 
27 #define _MSGID_taf_flash_Init 0
28 #define _MSGID_taf_flash_MtdOpen 1
29 #define _MSGID_taf_flash_MtdClose 2
30 #define _MSGID_taf_flash_MtdInformation 3
31 #define _MSGID_taf_flash_MtdEraseBlock 4
32 #define _MSGID_taf_flash_MtdReadPage 5
33 #define _MSGID_taf_flash_MtdWritePage 6
34 #define _MSGID_taf_flash_MtdRead 7
35 #define _MSGID_taf_flash_MtdWrite 8
36 #define _MSGID_taf_flash_MtdErase 9
37 #define _MSGID_taf_flash_MtdIsBlockGood 10
38 #define _MSGID_taf_flash_UbiOpen 11
39 #define _MSGID_taf_flash_UbiClose 12
40 #define _MSGID_taf_flash_UbiInformation 13
41 #define _MSGID_taf_flash_UbiRead 14
42 #define _MSGID_taf_flash_UbiInitWrite 15
43 #define _MSGID_taf_flash_UbiWrite 16
44 
45 
46 // Define type-safe pack/unpack functions for all enums, including included types
47 
48 static inline bool taf_flash_PackOpenMode
49 (
50  uint8_t **bufferPtr,
52 )
53 {
54  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
55 }
56 
57 static inline bool taf_flash_UnpackOpenMode
58 (
59  uint8_t **bufferPtr,
60  taf_flash_OpenMode_t* valuePtr
61 )
62 {
63  bool result;
64  uint32_t value = 0;
65  result = le_pack_UnpackUint32(bufferPtr, &value);
66  if (result)
67  {
68  *valuePtr = (taf_flash_OpenMode_t)value;
69  }
70  return result;
71 }
72 
73 // Define pack/unpack functions for all structures, including included types
74 
75 
76 #endif // TAF_FLASH_MESSAGES_H_INCLUDE_GUARD
static bool taf_flash_UnpackOpenMode(uint8_t **bufferPtr, taf_flash_OpenMode_t *valuePtr)
Definition: taf_flash_messages.h:58
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
#define _MAX_MSG_SIZE
Definition: taf_flash_messages.h:17
static bool taf_flash_PackOpenMode(uint8_t **bufferPtr, taf_flash_OpenMode_t value)
Definition: taf_flash_messages.h:49
taf_flash_OpenMode_t
Definition: taf_flash_common.h:105
struct __attribute__((packed))
Definition: taf_flash_messages.h:20
_Message_t
Definition: taf_flash_messages.h:25
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205