LibJuno 0.1.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
macros.h
Go to the documentation of this file.
1#ifndef JUNO_MACROS_H
2#define JUNO_MACROS_H
3
4#include "juno/status.h"
5#include <stdint.h>
6
7#define DECLARE_FAILURE_HANDLER \
8JUNO_FAILURE_HANDLER_T pfcnFailureHandler;\
9JUNO_USER_DATA_T *pvUserData
10
11#define ASSERT_EXISTS(ptr) \
12if(!ptr) \
13{ \
14 return JUNO_STATUS_NULLPTR_ERROR; \
15}
16
17#define ASSERT_SUCCESS(tStatus, failOp) if(tStatus != JUNO_STATUS_SUCCESS) \
18{ \
19 failOp; \
20}
21
22
23#endif // JUNO_MACROS_H