mirror of
https://github.com/firebase/nanopb
synced 2026-11-11 22:45:58 +05:45
For brevity, it is nice to use short names like "UENUM" in the FIELDLIST definition in .pb.h files. To avoid conflict with macro names defined by the platform we must add a PB_ namespace prefix on the first level of macro expansion in pb.h.
14 lines
419 B
Python
14 lines
419 B
Python
# Regression test for #522:
|
|
# Compile Errors when using UENUM on atmega32u4
|
|
|
|
Import('env')
|
|
|
|
env2 = env.Clone()
|
|
env2.Append(CPPDEFINES = {'UENUM': '_SFR_MEM8', 'BOOL': 'foobar_bool_t',
|
|
'INT32': '1234', 'OPTIONAL': 'xyz_t',
|
|
'REPEATED': '0', 'STATIC': 'static',
|
|
'CALLBACK': '9999'})
|
|
env2.NanopbProto("uenum.proto")
|
|
env2.Object(["uenum.pb.c"])
|
|
|