diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-07-31 12:55:09 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-07-31 12:55:09 +0000 |
commit | 3959290bc77ae26772bc107128b0a4edd3930361 (patch) | |
tree | fefcf27423aeb7fd100b52802f5c519def3a8cc7 /generator/nanopb.proto | |
parent | f8364310d3ca85d2cf59019bb4bc5e9ff4c52dc3 (diff) |
First version of header generator
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9
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; +} + |