Merge pull request #1191 from david-sawatzke/dev/doc_atomic_writes

Fix generation of documentation of `atomic_write` CSRStorage
This commit is contained in:
enjoy-digital 2022-01-31 16:48:02 +01:00 committed by GitHub
commit 0711998dab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -346,10 +346,10 @@ class DocumentedCSRRegion:
sub_name = self.name.upper() + "_" + name
bits_str = "Bits {}-{} of `{}`.".format(start, start+length, full_name)
if atomic_write:
if i == (range(len(csr.simple_csrs))-1):
bits_str += "Writing this register triggers an update of " + full_name
if i == (len(csr.simple_csrs)-1):
bits_str += " Writing this register triggers an update of `" + full_name + "`."
else:
bits_str += "The value won't take effect until `" + full_name + "0` is written."
bits_str += " The value won't take effect until `" + full_name + "0` is written."
if i == 0:
d = description
if description is None: