Skip to content

Conversation

@remiberthoz
Copy link

Describe the PR
Implement a printer device driver for USB Printers. The example illustrates receiving data from a host, the device driver as-is is recognized by the generic printer drivers on linux (and I assume, Windows too).

This allows sending binary data to the device, with no specific drivers, using tools like ld -o raw.

Additional context
The example compiles and works on a Pi Pico.

I am not yet sure about integration of the changes in the build toolchain. I have not yet understood if I have to manually edit all the hw/{bsp,mcu}/ file to include the device driver in cmake source lists.

if (!_printer_fifo_cfg.tx_persistent) {
tu_fifo_clear(&p_printer->tx_ff);
}
// tu_fifo_set_overwritable(&p_printer->rx_ff, true);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
I apparently made a mistake when copying/renaming this file, file
content was that of printer_device.c.
@remiberthoz
Copy link
Author

Well I apparently made (at least) one major mistake when moving the code from my local project to the repository fork. The content of printer.h and printer_device.c is the same, leading to (part of) the compilation errors. I'll work on that and the other problems raised by the CI pipeline.

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.

1 participant