diff options
Diffstat (limited to 'generator/nanopb.proto')
-rw-r--r-- | generator/nanopb.proto | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/generator/nanopb.proto b/generator/nanopb.proto new file mode 100644 index 00000000..813d5b73 --- /dev/null +++ b/generator/nanopb.proto @@ -0,0 +1,18 @@ +// Custom options for defining: +// - Maximum size of string/bytes +// - Maximum number of elements in array +// +// These are used by nanopb to generate statically allocable structures +// for memory-limited environments. + +import "google/protobuf/descriptor.proto"; + +message NanoPBOptions { + optional int32 max_size = 1; + optional int32 max_count = 2; +} + +extend google.protobuf.FieldOptions { + optional NanoPBOptions nanopb = 52001; +} + |