Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bsSetError/setField functions #149

Open
LukeWalker-CA opened this issue Apr 4, 2024 · 0 comments
Open

Update bsSetError/setField functions #149

LukeWalker-CA opened this issue Apr 4, 2024 · 0 comments

Comments

@LukeWalker-CA
Copy link
Contributor

          Agree. From discussion we should add a new function (or rewrite the bsSetError/bsClearField/bsSetField functions) as:

bsSetField: (replaces bsSetField and bsClearField)

void bsSetField(uint32_t field, bool set)
{
  BS.boardStatus &= ~field;
  if (set)
  {
     BS.boardStatus |= field;
  }
}

bsSetError:

void bsSetError(uint32_t field, bool set)
{
  BS.boardStatus &= ~field;
  if (set)
  {
     BS.boardStatus |= (BS_ERROR_Msk | field);
  }
}

Originally posted by @matias-cphatomics in https://github.com/copenhagenatomics/CA_ElectroRefining/pull/38#discussion_r1551054829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant