<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic consoleprint in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569859#M19880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by myudkovich on Tue Mar 22 06:57:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]Hello Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I&amp;nbsp; checked the Function consoleprint([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Hello World\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); and this is working very good . [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]My question is , Do we have a function to receive data from Console, process and then printf ? [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:30:33 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:30:33Z</dc:date>
    <item>
      <title>consoleprint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569859#M19880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by myudkovich on Tue Mar 22 06:57:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]Hello Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I&amp;nbsp; checked the Function consoleprint([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Hello World\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); and this is working very good . [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]My question is , Do we have a function to receive data from Console, process and then printf ? [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:30:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569859#M19880</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: consoleprint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569860#M19881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Tue Mar 22 08:33:40 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The question has been answered previously in [B]&lt;/SPAN&gt;&lt;A href="http://http://knowledgebase.nxp.com/showthread.php?p=5292"&gt;this thread&lt;/A&gt;&lt;SPAN&gt;[/B] :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:30:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569860#M19881</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: consoleprint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569861#M19882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Tue Mar 22 09:43:39 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;For an easier way to use consoleprint see this post &lt;/SPAN&gt;&lt;A href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://knowledgebase.nxp.com/showpost.php?p=2300&amp;amp;postcount=4&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Add cr_fast_printf.c, consoleprint.h and consoleprint.c to your project and use it in a similar way as this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/*
===============================================================================
 Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : main.c
 Author&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : $(author)
 Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :
 Copyright&amp;nbsp;&amp;nbsp; : $(copyright)
 Description : main definition
===============================================================================
*/
#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif
#include &amp;lt;cr_section_macros.h&amp;gt;
#include &amp;lt;NXP/crp.h&amp;gt;
// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;
#include &amp;lt;stdio.h&amp;gt;
extern int cr_fast_printf(const char *fmt, ...);
#define MESSAGE cr_fast_printf
 
 
int main(void) {
 
 MESSAGE("Hello World\n");
 
 // Enter an infinite loop, just incrementing a counter
 volatile static int i = 0 ;
 while(1) {
&amp;nbsp; i++ ;
 }
 return 0 ;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Le'itraot&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:30:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569861#M19882</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: consoleprint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569862#M19883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Tue Mar 22 10:33:11 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually after looking over the above code we probably don't need to define BUF_SIZE or buffer as cr_fast_printf() dynamically allocates memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody want to confirm this?&amp;nbsp; I have meetings until afternoon and won't be able to check until then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Larry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:30:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569862#M19883</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: consoleprint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569863#M19884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Tue Mar 22 10:47:43 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I modified the example above because it had contained a definition for BUF_SIZE and char array buffer.&amp;nbsp; These were not necessary as cr_fast_printf allocates memory for us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just for clarification the following is what I&amp;nbsp; removed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
extern int consoleprint(char *cpstring);
#define BUF_SIZE 80
char buffer[BUF_SIZE]; // Character buffer to hold string for consoleprint
// Make sure this is big enough !!!
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:30:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569863#M19884</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: consoleprint</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569864#M19885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Mar 22 11:51:52 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: myudkovich&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;[SIZE=2]My question is , Do we have a function to receive data from Console, process and then printf ? [/SIZE]&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;scanf?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.cplusplus.com/reference/clibrary/cstdio/scanf/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that as jharwood's post intimates, there is no way of getting an "instant" response to a key press on the host PC. scanf will require you to enter some text, and then press &amp;lt;enter&amp;gt; in order to submit it back to your application code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:30:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/consoleprint/m-p/569864#M19885</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:30:36Z</dc:date>
    </item>
  </channel>
</rss>

