From b663909fb6e86f0ae0f450523e72fb7fbfb719ab Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 8 Aug 2013 20:05:30 +0300 Subject: [PATCH] Document PB_SYSTEM_HEADER --- docs/index.rst | 2 ++ docs/reference.rst | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 897f5529..cb7a201f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -103,6 +103,8 @@ Nanopb should compile with most ansi-C compatible compilers. It however requires If these header files do not come with your compiler, you should be able to find suitable replacements online. Mostly the requirements are very simple, just a few basic functions and typedefs. +Alternatively, you can define *PB_SYSTEM_HEADER*, which should be the name of a single header file including all the necessary definitions. + Debugging and testing ===================== Extensive unittests are included under the *tests* folder. Just type *make* there to run the tests. diff --git a/docs/reference.rst b/docs/reference.rst index 42f4864f..6c38f6b4 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -49,6 +49,11 @@ PB_BUFFER_ONLY Disables the support for custom streams. Only PB_OLD_CALLBACK_STYLE Use the old function signature (void\* instead of void\*\*) for callback fields. This was the default until nanopb-0.2.1. +PB_SYSTEM_HEADER Replace the standard header files with a single + header file. It should define all the required + functions and typedefs listed on the + `overview page`_. Value must include quotes, + for example *#define PB_SYSTEM_HEADER "foo.h"*. ============================ ================================================ The PB_MAX_REQUIRED_FIELDS, PB_FIELD_16BIT and PB_FIELD_32BIT settings allow @@ -56,7 +61,7 @@ raising some datatype limits to suit larger messages. Their need is recognized automatically by C-preprocessor #if-directives in the generated .pb.h files. The default setting is to use the smallest datatypes (least resources used). - +.. _`overview page`: index.html#compiler-requirements Proto file options -- 2.16.6