Created
August 25, 2018 15:42
-
-
Save mfe5003/215d231a1b7c90f31b2b4e5f52a3b49b to your computer and use it in GitHub Desktop.
additions to CPLD code for ad9910 profile support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CFG configuration register bit masks | |
CFG_PROF_MASK = 7 << CFG_PROFILE | |
@kernel | |
def change_profile(self, profile): | |
"""Change the DDS profile for all channels in the configuration register. | |
:param profile: profile number between 0 and 7 | |
""" | |
self.cfg_write((self.cfg_reg & ~CFG_PROF_MASK) | ((profile & 7) << CFG_PROFILE)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment