https://github.com/gsurkov/ucprintf
Minimal printf for microcontrollers
https://github.com/gsurkov/ucprintf
microcontroller printf stm32
Last synced: 4 months ago
JSON representation
Minimal printf for microcontrollers
- Host: GitHub
- URL: https://github.com/gsurkov/ucprintf
- Owner: gsurkov
- License: mit
- Created: 2020-05-12T15:36:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-05T14:49:23.000Z (over 3 years ago)
- Last Synced: 2024-12-07T05:10:36.599Z (6 months ago)
- Topics: microcontroller, printf, stm32
- Language: C
- Size: 23.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ucprintf
## Minimal printf for microcontrollersContains a minimal printf implementation.
Format string: `%(+)(width).(precision)(size)[specifier]`
Supported specifiers: `s, d, u, x, X, f, o`
Supported size modifiers: `hh, h, l, ll`
## Usage
Add `ucprintf.c` and `.h` to your project. The application must implement `void _putchar(char)` function, which is used to send characters to the output device. Additionnaly, `void _flush(void)` can be implemented to trigger buffered transfers.## TODO
- [ ] Support for scientific float notation (`e, E`)
- [ ] Refactoring, code cleanup & optimization (In progress)
- [ ] scanf() counterpart