ad9912: fix frequency_to_ftw

This commit is contained in:
Sebastien Bourdeauducq 2021-11-19 12:42:08 +08:00
parent f4acf04405
commit cc1080e055
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class AD9912:
"""Returns the 48-bit frequency tuning word corresponding to the given
frequency.
"""
return int64(round(self.ftw_per_hz * frequency)) & (
return round64(self.ftw_per_hz * frequency) & (
(int64(1) << int64(48)) - int64(1))
@portable