Skip to content

Instantly share code, notes, and snippets.

@mattheweshleman
Last active April 27, 2020 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattheweshleman/4edf489c72aedf3543f813ac9bf18e51 to your computer and use it in GitHub Desktop.
Save mattheweshleman/4edf489c72aedf3543f813ac9bf18e51 to your computer and use it in GitHub Desktop.
Hw Lock Ctrl Driver Interface
/**
* @brief HwLockCtrlSelfTestResult enumerates possible self test results.
*/
typedef enum HwLockCtrlSelfTestResult
{
HW_LOCK_CTRL_SELF_TEST_PASSED,
HW_LOCK_CTRL_SELF_TEST_FAILED_POWER,
HW_LOCK_CTRL_SELF_TEST_FAILED_MOTOR,
} HwLockCtrlSelfTestResultT;
/**
* @brief HwLockCtrlInit initializes the driver. Lock state is undefined.
* @return true - initialization completed successfully. false - some error.
*/
bool HwLockCtrlInit();
/**
* @brief HwLockCtrlLock locks the lock.
* @return true - lock operation completed successfully. false - some error.
*/
bool HwLockCtrlLock();
/**
* @brief HwLockCtrlUnlock unlocks the lock.
* @return true - unlock operation completed successfully. false - some error.
*/
bool HwLockCtrlUnlock();
/**
* @brief HwLockCtrlSelfTest executes a self test. When completed, the Lock is always LOCKED.
* @arg outResult: [out] output the self test results
* @return true - self test completed and results are available in 'outResult'
* false - self test failed to execute.
*/
bool HwLockCtrlSelfTest(HwLockCtrlSelfTestResultT* outResult);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment