Armando Montanez | d2e4903 | 2019-12-06 13:06:01 -0800 | [diff] [blame] | 1 | .. _chapter-pw-dumb-io-stdio: |
| 2 | |
| 3 | .. default-domain:: cpp |
| 4 | |
| 5 | .. highlight:: sh |
| 6 | |
| 7 | ---------------- |
| 8 | pw_dumb_io_stdio |
| 9 | ---------------- |
| 10 | The ``pw_dumb_io_stdio`` backend implements the ``pw_dumb_io`` facade using |
| 11 | stdio. |
| 12 | |
| 13 | Why not just use stdio directly? |
| 14 | -------------------------------- |
| 15 | |
| 16 | The nice thing about using ``pw_dumb_io`` is that it's rather easy to get a |
| 17 | board up and running with a target-specific backend. This means when drafting |
| 18 | out a quick application you can write it against ``pw_dumb_io`` and, with some |
| 19 | care, the application will be able to run on both host and target devices. |
| 20 | |
| 21 | While it's not recommended to use ``pw_dumb_io`` for any production |
| 22 | applications, it can be rather helpful for early prototyping. |
| 23 | |
| 24 | Setup |
| 25 | ===== |
| 26 | This module requires relatively minimal setup: |
| 27 | |
| 28 | 1. Write code against the ``pw_dumb_io`` facade. |
| 29 | 2. Specify the ``dir_pw_dumb_io_backend`` GN global variable to point to this |
| 30 | backend. |
| 31 | |
| 32 | Module usage |
| 33 | ============ |
| 34 | For the most part, applications built with this backend will behave similarly |
| 35 | to an application built directly against stdio. |
| 36 | |
| 37 | Dependencies |
| 38 | ============ |
| 39 | * pw_dumb_io facade |