Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to systems without file and fprintf #14

Conversation

Christer-Ekholm
Copy link

Support small embedded systems which does not like to import FILE support from libraries.

Christer Ekholm added 3 commits January 18, 2024 12:07
…_to_systems_without_FILE_and_fprintf

# Conflicts:
#	include/cargs.h
#	src/cargs.c
#	test/option_test.c
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (82b51a3) 97.40% compared to head (953c9b0) 97.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   97.40%   97.45%   +0.04%     
==========================================
  Files           1        1              
  Lines         154      157       +3     
==========================================
+ Hits          150      153       +3     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Christer-Ekholm
Copy link
Author

And here example how my system printer callback looks like

int DLOG_vShellFPrintF(void * ctx, const char* format, ...)
{
    va_list args;
    va_start(args, format);
    char buffer[160];
    int len = vsnprintf(buffer, sizeof(buffer), format, args);
    va_end(args);

    if(len > 0)
    {
        uint32 sentBytes;
        HAL_UartSend(s_TerminalPort, (uint8*)buffer, len, &sentBytes);
    }
    return len;
}

@likle likle merged commit 50e713b into likle:master Jan 18, 2024
15 checks passed
@likle
Copy link
Owner

likle commented Jan 18, 2024

Hi @Christer-Ekholm ! That looks very cool, thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants