feat: Add missing macro to check for errors

Other parts of core have this already, align
as these are useful to make the code more
readable.
This commit is contained in:
icex2 2024-08-15 11:34:31 +02:00
parent 71e6b1e29f
commit 87fb71d769
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,9 @@
typedef struct bt_core_config bt_core_config_t;
#define BT_CORE_CONFIG_RESULT_IS_ERROR(x) \
(x > BT_CORE_CONFIG_RESULT_SUCCESS)
typedef enum bt_core_config_result {
BT_CORE_CONFIG_RESULT_SUCCESS = 0,
BT_CORE_CONFIG_RESULT_ERROR_INTERNAL = 1,

View File

@ -3,6 +3,9 @@
#include <stdint.h>
#define BT_CORE_THREAD_RESULT_IS_ERROR(x) \
(x > BT_CORE_THREAD_RESULT_SUCCESS)
typedef enum bt_core_thread_result {
BT_CORE_THREAD_RESULT_SUCCESS = 0,
BT_CORE_THREAD_RESULT_ERROR_INTERNAL = 1,