1.. _module-pw_uart: 2 3======= 4pw_uart 5======= 6.. pigweed-module:: 7 :name: pw_uart 8 9``pw_uart`` defines core methods for UART communication. This serves 10as a blueprint for concrete UART implementations. You will need to write the 11backend code tailored to your specific hardware device to interact with the 12UART peripheral. 13 14----------- 15Get started 16----------- 17.. repository: https://bazel.build/concepts/build-ref#repositories 18 19.. tab-set:: 20 21 .. tab-item:: Bazel 22 23 Add ``@pigweed//pw_uart`` to the ``deps`` list in your Bazel target: 24 25 .. code-block:: 26 27 cc_library("...") { 28 # ... 29 deps = [ 30 # ... 31 "@pigweed//pw_uart", 32 # ... 33 ] 34 } 35 36 This assumes that your Bazel ``WORKSPACE`` has a `repository 37 <https://bazel.build/concepts/build-ref#repositories>`_ named ``@pigweed`` 38 that points to the upstream Pigweed repository. 39 40 .. tab-item:: GN 41 42 Add ``$dir_pw_uart`` to the ``deps`` list in your ``pw_executable()`` 43 build target: 44 45 .. code-block:: 46 47 pw_executable("...") { 48 # ... 49 deps = [ 50 # ... 51 "$dir_pw_uart", 52 # ... 53 ] 54 } 55 56 .. tab-item:: CMake 57 58 Add ``pw_uart`` to your ``pw_add_library`` or similar CMake target: 59 60 .. code-block:: 61 62 pw_add_library(my_library STATIC 63 HEADERS 64 ... 65 PRIVATE_DEPS 66 # ... 67 pw_uart 68 # ... 69 ) 70 71.. _module-pw_uart-reference: 72 73------------- 74API reference 75------------- 76.. doxygengroup:: pw_uart 77 :content-only: 78 :members: 79