# serial.close

## 功能

关闭已打开串口。

## 语法

```bt
device.open(config).close()
```

## 参数

无参数。

## 返回值

| 类型 | 说明 |
| ------ | ------ |
| Bool | 关闭成功返回 true。 |

## 示例

```bt
port = device.open({type: 'serial', port: 'COM3'})
result = port.close()

// 输出：true
print result
```

## 注意事项

- 关闭后句柄仍是 Device 值，但底层端口已关闭。
