-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
2,693 additions
and
68 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
/*!\file FctERR.c | ||
** \author SMFSW | ||
** \version v0.4 | ||
** \version v0.5 | ||
** \date 2017 | ||
** \copyright MIT (c) 2017, SMFSW | ||
** \brief errors to SMFSW FctERR code | ||
**/ | ||
/****************************************************************/ | ||
/****************************************************************/ | ||
|
||
#include "FctERR.h" | ||
|
||
|
||
FctERR HALERRtoFCTERR(HAL_StatusTypeDef Status) | ||
FctERR HALERRtoFCTERR(HAL_StatusTypeDef st) | ||
{ | ||
if (Status == HAL_OK) return ERR_OK; | ||
else if (Status == HAL_ERROR) return ERR_FAULT; | ||
else if (Status == HAL_BUSY) return ERR_BUSY; | ||
else if (Status == HAL_TIMEOUT) return ERR_TIMEOUT; | ||
else return ERR_FAULT; | ||
if (st == HAL_OK) return ERR_OK; | ||
else if (st == HAL_ERROR) return ERR_FAULT; | ||
else if (st == HAL_BUSY) return ERR_BUSY; | ||
else if (st == HAL_TIMEOUT) return ERR_TIMEOUT; | ||
else return ERR_FAULT; | ||
} |
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
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
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
Binary file not shown.
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
Oops, something went wrong.