Skip to main content

uart.disable()

Disables the UART interface

Availability

Device

Returns

Nothing

Description

Disable the target UART to save power, or before reconfiguring the pins for another role.

Module-specific Information

imp005

On the imp005, calling uart.disable() reset the RX and TX FIFO sizes back to their defaults. This behavior does not occur on any other imp and will be disabled on the imp005 in a future version of impOS™.

Example Code

The following code envisages the imp connected to a computer and an Arduino on the same bus but with different parameters. It uses uart.disable() to shut down the bus briefly before reconfiguring it for each connected device.