Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:02 03 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pico CFunction header

Author Message
GerryL
Regular Member

Joined: 24/01/2019
Location: Australia
Posts: 41
Posted: 01:46am 02 Nov 2025
Copy link to clipboard 
Print this post

This one may be for disco4now or matherp, but just wondering why in PicoCFunctions.h the function,
#define putConsole(a,b)  ((void(*)(int, int)) Vector_putConsole) (a,b)
has 2 parameters of a and b.  Other platforms such as the H7 and MMPlus only have the one parameter.

Gerry
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1041
Posted: 03:06am 02 Nov 2025
Copy link to clipboard 
Print this post

The second parameter determines whether the output is flushed immediately.

This is the definition in Picomite
void (putConsole)(int c, int flush)

This bit of code does the flush.
                   if (flush)
                   {
                       fflush(stdout);
                       tud_cdc_write_flush();
                   }

Picomites use the tinyUSB library so most likely why they have the extra parameter.
F4 H7FotSF4xGT
 
GerryL
Regular Member

Joined: 24/01/2019
Location: Australia
Posts: 41
Posted: 02:04am 03 Nov 2025
Copy link to clipboard 
Print this post

thanks Gerry
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025