* @brief Closes the active port and releases its handle. */
| 101 | * @brief Closes the active port and releases its handle. |
| 102 | */ |
| 103 | IO::Drivers::UART::~UART() |
| 104 | { |
| 105 | if (port()) { |
| 106 | if (port()->isOpen()) |
| 107 | port()->close(); |
| 108 | |
| 109 | port()->deleteLater(); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | //-------------------------------------------------------------------------------------------------- |
| 114 | // HAL-driver implementation |