From f47410ea4b8ae43e19facd378be4cf1073e1813b Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Fri, 13 Sep 2013 12:59:31 +0300 Subject: Move examples into subfolders, add READMEs --- example_avr_double/encode_double.c | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 example_avr_double/encode_double.c (limited to 'example_avr_double/encode_double.c') diff --git a/example_avr_double/encode_double.c b/example_avr_double/encode_double.c deleted file mode 100644 index cd532d4..0000000 --- a/example_avr_double/encode_double.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Encodes a float value into a double on the wire. - * Used to emit doubles from AVR code, which doesn't support double directly. - */ - -#include -#include -#include "double_conversion.h" -#include "doubleproto.pb.h" - -int main() -{ - AVRDoubleMessage message = { - float_to_double(1234.5678f), - float_to_double(0.00001f) - }; - - uint8_t buffer[32]; - pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); - - pb_encode(&stream, AVRDoubleMessage_fields, &message); - fwrite(buffer, 1, stream.bytes_written, stdout); - - return 0; -} - -- cgit 1.2.3-korg