How to use <stdarg.h> ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-09 11:56 PM
Hi all,
I'm using USART and communicating via rs 232 protocol and trying to send formatted strings by using stdarg.h C library to use;va_list, va_start, va_arg, va_end..but I don't know which library is supposed to add.. In some examples somehow some people could use it.. Thanks, #stdarg.h- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-12 9:32 AM
Can't you just use printf() or sprintf() ... ?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-13 11:41 PM
No, I can't. In order to use these, I guess I'm supposed to add some including .h files or something like that..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-21 2:44 AM
Hi Onay,
Using printf is generally a good idea. On the Raisonance compiler toolchain, it automatically adapts to your project hence the printf size is very small.You just need to add #include <stdio.h>, then printf() is available as usual.Note that printf emits characters on the USART by default, but you can write your own putchar function that fits your needs if it was your choice (looks like it should be OK for you).Best Regards,- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-26 8:23 AM
''On the Raisonance compiler toolchain, it automatically adapts to your project hence the printf size is very small.''
When I used Raisonance (which is, admittedly, a few years ago), you had to configure this manually - has that changed, then...?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-11-28 5:20 AM
Thanks Bruno,
I have already found out the solution by the helping of your suggestion.. Best Regards,- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-10 5:52 AM
Don't bother worrying about N's negative comments.
He has been doing this all through the forum. Some kid who likes crittiquing everybody - without giving any actual helpful advice.