samd_sercom: Reserve the sercom interface

This commit is contained in:
Desuuuu 2022-05-22 18:22:51 +02:00
parent 81629071b1
commit 53de6fb578
No known key found for this signature in database
GPG Key ID: 85943F4B2C2CE0DC
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ class SamdSERCOM:
ppins = self.printer.lookup_object("pins")
tx_pin_params = ppins.lookup_pin(self.tx_pin)
self.mcu = tx_pin_params['chip']
pin_resolver = ppins.get_pin_resolver(self.mcu.get_name())
pin_resolver.reserve_interface(self.sercom, config.get_name())
self.mcu.add_config_cmd(
"set_sercom_pin bus=%s sercom_pin_type=tx pin=%s" % (
self.sercom, tx_pin_params['pin']))