Sebastian Huber created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1600
Project:Branches: sebhub/rtems:up/bsp-output-char-flags to rtems/rtos/rtems:main Author: Sebastian Huber ## Summary Issue #5009: Add ability to drain the characters in transmission by the kernel I/O device The polled character output `BSP_output_char` takes an `int` and returns an `int`. The parameter holds the character and the flags `RTEMS_OUTPUT_CHAR_DRAIN` and `RTEMS_OUTPUT_CHAR_TRY`. A plain character is a valid request, so `rtems_putc()`, `printk()` and every other caller stays unchanged. | Commit | Content | | ------ | ------- | | `bsps: Pass flags to the polled character output` | the type, the flags, the adaptation of each BSP, the flags of the Zynq UART and the APBUART, and their tests | | `dev/ns16550: Add the polled output with flags` | `ns16550_polled_output_char()` and its test | | `bsps: Pass the output flags to the NS16550` | the BSPs which output through `ns16550_polled_putchar()` | | `bsps/shared/serial/pl011: Add output with flags` | `arm_pl011_output_char_polled()` and the BSPs which use it | | `bsps/<arch>: Implement RTEMS_OUTPUT_CHAR_TRY` | the BSPs whose output function reads a transmitter status | **Review hints:** - A BSP whose UART has no transmitter status, a framebuffer or a semihosting console, outputs the character for `RTEMS_OUTPUT_CHAR_TRY` as if the flag was cleared. Its drain returns -1. - The drivers of the APBUART, the Zynq UART, the NS16550 and the PL011 implement the drain. The other BSPs do not. - The tests of the APBUART and the NS16550 drive a register block in RAM, so they pass on a simulator which transmits at once. ## Test The build of 86 BSPs of all 13 architectures with a tool chain of RTEMS 7 ends without an error or a warning. | BSP | Simulator | `ts-validation-io-kernel` | `ts-validation-bsp-0` | | --- | --- | --- | --- | | `sparc/erc32` | SIS | F:0 | | | `sparc/leon2` | SIS | F:0 | | | `sparc/leon3` | SIS | F:0 | F:0, with the APBUART test | | `riscv/rv64imafdc` | Qemu | F:0 | F:0, with the NS16550 test | | `aarch64/a53_lp64_qemu` | Qemu | F:0 | | | `arm/xilinx_zynq_a9_qemu` | Qemu | F:0 | | | `arm/realview_pbx_a9_qemu` | Qemu | F:0 | | ## AI Details <!-- Make sure you have read our statement at https://www.rtems.org/generative-ai/ --> ### Prompt used None as a single prompt. The work was done in an interactive Claude Code session on the RTEMS tree. The task was to port the interface of the embedded brains tree to `main` and to implement `RTEMS_OUTPUT_CHAR_TRY` in the BSPs with a transmitter status. Each change was directed and reviewed. ### AI model used Claude Opus 5.5 (claude-opus-5-5), through Claude Code. ### How AI was used for the contribution - ( ) Formatting - (x) Test creation. - (x) Code comments. - ( ) The entire contribution was generated using AI - ( ) AI code completion such as Copilot in VSCode. The port, the BSP adaptations and the commit messages were produced in that session under my direction. ### Access I have not used a product which claims copyright in its output, and I have legitimate access to the one I used. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1600 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-1yrd4mi8zionbzieqjfqp7cwv-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
