Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_TOSHIBA/TARGET_TMPM066/Periph_Driver/inc/tx00_common.h
- Revision:
- 172:7d866c31b3c5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/TARGET_TOSHIBA/TARGET_TMPM066/Periph_Driver/inc/tx00_common.h Thu Aug 31 17:27:04 2017 +0100 @@ -0,0 +1,47 @@ +/** + ******************************************************************************* + * @file tx00_common.h + * @brief All common macro and definition for TX00 peripheral drivers + * @version V2.1.1 + * @date 2014/11/22 + * + * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved + ******************************************************************************* + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TX00_COMMON_H +#define __TX00_COMMON_H + +typedef enum { + SUCCESS = 0U, + ERROR = 1U +} Result; + +typedef enum { + BUSY = 0U, + DONE = 1U +} WorkState; + +typedef enum { + DISABLE = 0U, + ENABLE = 1U +} FunctionalState; +#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE)) + +#define IS_POINTER_NOT_NULL(param) ((void*)(param) != (void*)0) + +/* + * To report the name of the source file and source line number where the + * assert_param error has occurred, "DEBUG" must be defined. And detailed + * definition of assert_failed() is needed to be implemented, which can be + * done, for example, in the main.c file. + */ +#ifdef DEBUG +void assert_failed(char *file, int32_t line); +#define assert_param(expr) ((expr) ? (void)0 : assert_failed((char *)__FILE__, __LINE__)) +#else +#define assert_param(expr) +#endif /* DEBUG */ + +#endif /* __TX00_COMMON_H */