Import of the watch repository from Pebble

This commit is contained in:
Matthieu Jeanson 2024-12-12 16:43:03 -08:00 committed by Katharine Berry
commit 3b92768480
10334 changed files with 2564465 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# Regression test for #631:
# Wrong initializer generation
Import("env")
env.NanopbProto("submsg_callback.proto")
t = env.Program(["test.c", "submsg_callback.pb.c", "$COMMON/pb_common.o"])
env.RunTest(t)

View file

@ -0,0 +1,22 @@
syntax = "proto2";
import 'nanopb.proto';
message SubMsg1 {
optional float number1 = 1 [default = 1];
}
message SubMsg2 {
repeated uint32 number2 = 1;
}
message SubMsgCB {
option (nanopb_msgopt).submsg_callback = true;
repeated SubMsg1 field1 = 1;
oneof data {
uint32 uint = 2;
sint32 sint = 3 [default = 3];
SubMsg2 vuint = 4;
}
}

View file

@ -0,0 +1,14 @@
#include "submsg_callback.pb.h"
SubMsg1 submsg1_zero = SubMsg1_init_zero;
SubMsg1 submsg1_def = SubMsg1_init_default;
SubMsg2 submsg2_zero = SubMsg2_init_zero;
SubMsg2 submsg2_def = SubMsg2_init_default;
SubMsgCB submsgcb_zero = SubMsgCB_init_zero;
SubMsgCB submsgcb_def = SubMsgCB_init_default;
int main()
{
return 0;
}