- 1, {{"555-12345678", true, Person_PhoneType_MOBILE}}};
-
- /* Prepare the stream, output goes directly to stdout */
- pb_ostream_t stream = {&streamcallback, stdout, SIZE_MAX, 0};
+ 3, {{"555-12345678", true, Person_PhoneType_MOBILE},
+ {"99-2342", false, 0},
+ {"1234-5678", true, Person_PhoneType_WORK},
+ }};
+
+ uint8_t buffer[512];
+ pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer));