Minor changes : added the static keyword to some global variables to at least limit their scope to the file
This commit is contained in:
parent
dd5ab56bc0
commit
34bf170dee
@ -69,7 +69,7 @@ typedef enum gadget_bridge_parser_fsm
|
|||||||
} gadget_bridge_parser_fsm_e;
|
} gadget_bridge_parser_fsm_e;
|
||||||
|
|
||||||
/* Internal variable definition */
|
/* Internal variable definition */
|
||||||
struct
|
static struct
|
||||||
{
|
{
|
||||||
char buffer[GADGET_BRIDGE_PARSER_BUFFER_SIZE + 1]; // The +1 is for the string termination character.
|
char buffer[GADGET_BRIDGE_PARSER_BUFFER_SIZE + 1]; // The +1 is for the string termination character.
|
||||||
uint16_t buffer_content_size; // Without counting the string termination character.
|
uint16_t buffer_content_size; // Without counting the string termination character.
|
||||||
@ -86,7 +86,7 @@ struct
|
|||||||
.event_data = { .event_type = GADGET_BRIDGE_EVENT_TYPE_NONE},
|
.event_data = { .event_type = GADGET_BRIDGE_EVENT_TYPE_NONE},
|
||||||
};
|
};
|
||||||
|
|
||||||
time_t _unix_timestamp = 0;
|
static time_t _unix_timestamp = 0;
|
||||||
|
|
||||||
/* Internal function definition */
|
/* Internal function definition */
|
||||||
static const char *_gadget_bridge_toast_type_2_str(gadget_bridge_toast_type_e toast_type);
|
static const char *_gadget_bridge_toast_type_2_str(gadget_bridge_toast_type_e toast_type);
|
||||||
|
@ -72,7 +72,7 @@ typedef enum gadget_bridge_parser_fsm
|
|||||||
} gadget_bridge_parser_fsm_e;
|
} gadget_bridge_parser_fsm_e;
|
||||||
|
|
||||||
/* Internal variable definition */
|
/* Internal variable definition */
|
||||||
struct
|
static struct
|
||||||
{
|
{
|
||||||
char buffer[GADGET_BRIDGE_PARSER_BUFFER_SIZE + 1]; // The +1 is for the string termination character.
|
char buffer[GADGET_BRIDGE_PARSER_BUFFER_SIZE + 1]; // The +1 is for the string termination character.
|
||||||
uint16_t buffer_content_size; // Without counting the string termination character.
|
uint16_t buffer_content_size; // Without counting the string termination character.
|
||||||
@ -89,7 +89,7 @@ struct
|
|||||||
.event_data = { .event_type = GADGET_BRIDGE_EVENT_TYPE_NONE},
|
.event_data = { .event_type = GADGET_BRIDGE_EVENT_TYPE_NONE},
|
||||||
};
|
};
|
||||||
|
|
||||||
time_t _unix_timestamp = 0;
|
static time_t _unix_timestamp = 0;
|
||||||
|
|
||||||
/* Internal function definition */
|
/* Internal function definition */
|
||||||
static const char *_gadget_bridge_toast_type_2_str(gadget_bridge_toast_type_e toast_type);
|
static const char *_gadget_bridge_toast_type_2_str(gadget_bridge_toast_type_e toast_type);
|
||||||
|
@ -50,3 +50,20 @@
|
|||||||
<stdlib.h>
|
<stdlib.h>
|
||||||
<string.h>
|
<string.h>
|
||||||
|
|
||||||
|
1696357704 source:d:\users\think\documents\w800_smart_watch\src\gadget_bridge_parser\gadget_bridge.c
|
||||||
|
"gadget_bridge.h"
|
||||||
|
<stdio.h>
|
||||||
|
<stdlib.h>
|
||||||
|
<string.h>
|
||||||
|
|
||||||
|
1695293778 d:\users\think\documents\w800_smart_watch\src\gadget_bridge_parser\gadget_bridge.h
|
||||||
|
<stdint.h>
|
||||||
|
<stdbool.h>
|
||||||
|
<time.h>
|
||||||
|
|
||||||
|
1695293778 source:d:\users\think\documents\w800_smart_watch\src\gadget_bridge_parser\main.c
|
||||||
|
<stdio.h>
|
||||||
|
<stdlib.h>
|
||||||
|
<string.h>
|
||||||
|
"gadget_bridge.h"
|
||||||
|
|
||||||
|
@ -7,14 +7,14 @@
|
|||||||
<Cursor1 position="11119" topLine="337" />
|
<Cursor1 position="11119" topLine="337" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="gadget_bridge.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="gadget_bridge.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="61086" topLine="1211" />
|
<Cursor1 position="4063" topLine="0" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="gadget_bridge.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="gadget_bridge.c" open="1" top="1" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="4063" topLine="120" />
|
<Cursor1 position="2213" topLine="94" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
</CodeBlocks_layout_file>
|
</CodeBlocks_layout_file>
|
||||||
|
Loading…
Reference in New Issue
Block a user