1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_uart_mcuxpresso: 2*61c4878aSAndroid Build Coastguard Worker 3*61c4878aSAndroid Build Coastguard Worker================== 4*61c4878aSAndroid Build Coastguard Workerpw_uart_mcuxpresso 5*61c4878aSAndroid Build Coastguard Worker================== 6*61c4878aSAndroid Build Coastguard Worker``pw_uart_mcuxpresso`` implements the ``pw_uart`` interface for reading 7*61c4878aSAndroid Build Coastguard Workerand writing to a UART using the NXP MCUXpresso SDK. 8*61c4878aSAndroid Build Coastguard Worker 9*61c4878aSAndroid Build Coastguard WorkerThe only implementation currently provided is ``DmaUartMcuxpresso``, which 10*61c4878aSAndroid Build Coastguard Workeruses DMA transfers to read and write to the UART, minimizing CPU utilization. 11*61c4878aSAndroid Build Coastguard Worker 12*61c4878aSAndroid Build Coastguard Worker.. note:: 13*61c4878aSAndroid Build Coastguard Worker For a simpler UART interface, see ``pw_stream_uart_mcuxpresso``. 14*61c4878aSAndroid Build Coastguard Worker 15*61c4878aSAndroid Build Coastguard WorkerSetup 16*61c4878aSAndroid Build Coastguard Worker===== 17*61c4878aSAndroid Build Coastguard WorkerThis module requires a little setup: 18*61c4878aSAndroid Build Coastguard Worker 19*61c4878aSAndroid Build Coastguard Worker1. Use ``pw_build_mcuxpresso`` to create a ``pw_source_set`` for an 20*61c4878aSAndroid Build Coastguard Worker MCUXpresso SDK. 21*61c4878aSAndroid Build Coastguard Worker2. Include the debug console component in this SDK definition. 22*61c4878aSAndroid Build Coastguard Worker3. Specify the ``pw_third_party_mcuxpresso_SDK`` GN global variable to specify 23*61c4878aSAndroid Build Coastguard Worker the name of this source set. 24*61c4878aSAndroid Build Coastguard Worker4. Use a target that calls ``pw_sys_io_mcuxpresso_Init`` in 25*61c4878aSAndroid Build Coastguard Worker ``pw_boot_PreMainInit`` or similar. 26*61c4878aSAndroid Build Coastguard Worker 27*61c4878aSAndroid Build Coastguard WorkerThe name of the SDK source set must be set in the 28*61c4878aSAndroid Build Coastguard Worker"pw_third_party_mcuxpresso_SDK" GN arg 29*61c4878aSAndroid Build Coastguard Worker 30*61c4878aSAndroid Build Coastguard WorkerUsage 31*61c4878aSAndroid Build Coastguard Worker===== 32*61c4878aSAndroid Build Coastguard Worker 33*61c4878aSAndroid Build Coastguard Worker``DmaUartMcuxpresso`` example: 34*61c4878aSAndroid Build Coastguard Worker 35*61c4878aSAndroid Build Coastguard Worker.. literalinclude:: dma_uart_example.cc 36*61c4878aSAndroid Build Coastguard Worker :language: cpp 37*61c4878aSAndroid Build Coastguard Worker :linenos: 38*61c4878aSAndroid Build Coastguard Worker :start-after: [pw_uart_mcuxpresso-DmaUartExample] 39*61c4878aSAndroid Build Coastguard Worker :end-before: [pw_uart_mcuxpresso-DmaUartExample] 40