OpenOCD
versaloon_include.h File Reference
Include dependency graph for versaloon_include.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ERRCODE_FAILURE_OPERATION   ERROR_FAIL
 
#define ERRCODE_INVALID_BUFFER   ERROR_FAIL
 
#define ERRCODE_INVALID_PARAMETER   ERROR_FAIL
 
#define ERRCODE_NOT_ENOUGH_MEMORY   ERROR_FAIL
 
#define ERRMSG_FAILURE_OPERATION   "Fail to %s."
 
#define ERRMSG_FAILURE_OPERATION_MESSAGE   "Fail to %s, %s"
 
#define ERRMSG_INVALID_BUFFER   "Buffer %s is not valid."
 
#define ERRMSG_INVALID_INDEX   "Index %d is invalid for %s."
 
#define ERRMSG_INVALID_INTERFACE_NUM   "invalid interface %d"
 
#define ERRMSG_INVALID_PARAMETER   "Invalid parameter of %s."
 
#define ERRMSG_INVALID_TARGET   "Invalid %s"
 
#define ERRMSG_INVALID_USAGE   "Invalid usage of %s"
 
#define ERRMSG_INVALID_VALUE   "%d is invalid for %s."
 
#define ERRMSG_NOT_ENOUGH_MEMORY   "Lack of memory."
 
#define ERRMSG_NOT_SUPPORT_BY   "%s is not supported by %s."
 
#define GET_BE_U16(p)   GET_U16_MSBFIRST(p)
 
#define GET_BE_U32(p)   GET_U32_MSBFIRST(p)
 
#define GET_LE_U16(p)   GET_U16_LSBFIRST(p)
 
#define GET_LE_U32(p)   GET_U32_LSBFIRST(p)
 
#define GET_U16_LSBFIRST(p)
 
#define GET_U16_MSBFIRST(p)
 
#define GET_U32_LSBFIRST(p)
 
#define GET_U32_MSBFIRST(p)
 
#define LOG_BUG   LOG_ERROR
 
#define PARAM_CHECK   1
 
#define RESULT   int
 
#define SET_BE_U16(p, v)   SET_U16_MSBFIRST(p, v)
 
#define SET_BE_U32(p, v)   SET_U32_MSBFIRST(p, v)
 
#define SET_LE_U16(p, v)   SET_U16_LSBFIRST(p, v)
 
#define SET_LE_U32(p, v)   SET_U32_LSBFIRST(p, v)
 
#define SET_U16_LSBFIRST(p, v)
 
#define SET_U16_MSBFIRST(p, v)
 
#define SET_U32_LSBFIRST(p, v)
 
#define SET_U32_MSBFIRST(p, v)
 
#define sleep_ms(ms)   jtag_sleep((ms) * 1000)
 
#define TO_STR(name)   #name
 

Macro Definition Documentation

◆ ERRCODE_FAILURE_OPERATION

#define ERRCODE_FAILURE_OPERATION   ERROR_FAIL

Definition at line 42 of file versaloon_include.h.

◆ ERRCODE_INVALID_BUFFER

#define ERRCODE_INVALID_BUFFER   ERROR_FAIL

Definition at line 35 of file versaloon_include.h.

◆ ERRCODE_INVALID_PARAMETER

#define ERRCODE_INVALID_PARAMETER   ERROR_FAIL

Definition at line 36 of file versaloon_include.h.

◆ ERRCODE_NOT_ENOUGH_MEMORY

#define ERRCODE_NOT_ENOUGH_MEMORY   ERROR_FAIL

Definition at line 26 of file versaloon_include.h.

◆ ERRMSG_FAILURE_OPERATION

#define ERRMSG_FAILURE_OPERATION   "Fail to %s."

Definition at line 40 of file versaloon_include.h.

◆ ERRMSG_FAILURE_OPERATION_MESSAGE

#define ERRMSG_FAILURE_OPERATION_MESSAGE   "Fail to %s, %s"

Definition at line 41 of file versaloon_include.h.

◆ ERRMSG_INVALID_BUFFER

#define ERRMSG_INVALID_BUFFER   "Buffer %s is not valid."

Definition at line 34 of file versaloon_include.h.

◆ ERRMSG_INVALID_INDEX

#define ERRMSG_INVALID_INDEX   "Index %d is invalid for %s."

Definition at line 29 of file versaloon_include.h.

◆ ERRMSG_INVALID_INTERFACE_NUM

#define ERRMSG_INVALID_INTERFACE_NUM   "invalid interface %d"

Definition at line 33 of file versaloon_include.h.

◆ ERRMSG_INVALID_PARAMETER

#define ERRMSG_INVALID_PARAMETER   "Invalid parameter of %s."

Definition at line 32 of file versaloon_include.h.

◆ ERRMSG_INVALID_TARGET

#define ERRMSG_INVALID_TARGET   "Invalid %s"

Definition at line 31 of file versaloon_include.h.

◆ ERRMSG_INVALID_USAGE

#define ERRMSG_INVALID_USAGE   "Invalid usage of %s"

Definition at line 30 of file versaloon_include.h.

◆ ERRMSG_INVALID_VALUE

#define ERRMSG_INVALID_VALUE   "%d is invalid for %s."

Definition at line 28 of file versaloon_include.h.

◆ ERRMSG_NOT_ENOUGH_MEMORY

#define ERRMSG_NOT_ENOUGH_MEMORY   "Lack of memory."

Definition at line 25 of file versaloon_include.h.

◆ ERRMSG_NOT_SUPPORT_BY

#define ERRMSG_NOT_SUPPORT_BY   "%s is not supported by %s."

Definition at line 38 of file versaloon_include.h.

◆ GET_BE_U16

#define GET_BE_U16 (   p)    GET_U16_MSBFIRST(p)

Definition at line 84 of file versaloon_include.h.

◆ GET_BE_U32

#define GET_BE_U32 (   p)    GET_U32_MSBFIRST(p)

Definition at line 85 of file versaloon_include.h.

◆ GET_LE_U16

#define GET_LE_U16 (   p)    GET_U16_LSBFIRST(p)

Definition at line 82 of file versaloon_include.h.

◆ GET_LE_U32

#define GET_LE_U32 (   p)    GET_U32_LSBFIRST(p)

Definition at line 83 of file versaloon_include.h.

◆ GET_U16_LSBFIRST

#define GET_U16_LSBFIRST (   p)
Value:
(((*((uint8_t *)(p) + 0)) << 0) | \
((*((uint8_t *)(p) + 1)) << 8))

Definition at line 50 of file versaloon_include.h.

◆ GET_U16_MSBFIRST

#define GET_U16_MSBFIRST (   p)
Value:
(((*((uint8_t *)(p) + 0)) << 8) | \
((*((uint8_t *)(p) + 1)) << 0))

Definition at line 44 of file versaloon_include.h.

◆ GET_U32_LSBFIRST

#define GET_U32_LSBFIRST (   p)
Value:
(((*((uint8_t *)(p) + 0)) << 0) | \
((*((uint8_t *)(p) + 1)) << 8) | \
((*((uint8_t *)(p) + 2)) << 16) | \
((*((uint8_t *)(p) + 3)) << 24))

Definition at line 52 of file versaloon_include.h.

◆ GET_U32_MSBFIRST

#define GET_U32_MSBFIRST (   p)
Value:
(((*((uint8_t *)(p) + 0)) << 24) | \
((*((uint8_t *)(p) + 1)) << 16) | \
((*((uint8_t *)(p) + 2)) << 8) | \
((*((uint8_t *)(p) + 3)) << 0))

Definition at line 46 of file versaloon_include.h.

◆ LOG_BUG

#define LOG_BUG   LOG_ERROR

Definition at line 22 of file versaloon_include.h.

◆ PARAM_CHECK

#define PARAM_CHECK   1

Definition at line 16 of file versaloon_include.h.

◆ RESULT

#define RESULT   int

Definition at line 21 of file versaloon_include.h.

◆ SET_BE_U16

#define SET_BE_U16 (   p,
 
)    SET_U16_MSBFIRST(p, v)

Definition at line 88 of file versaloon_include.h.

◆ SET_BE_U32

#define SET_BE_U32 (   p,
 
)    SET_U32_MSBFIRST(p, v)

Definition at line 89 of file versaloon_include.h.

◆ SET_LE_U16

#define SET_LE_U16 (   p,
 
)    SET_U16_LSBFIRST(p, v)

Definition at line 86 of file versaloon_include.h.

◆ SET_LE_U32

#define SET_LE_U32 (   p,
 
)    SET_U32_LSBFIRST(p, v)

Definition at line 87 of file versaloon_include.h.

◆ SET_U16_LSBFIRST

#define SET_U16_LSBFIRST (   p,
 
)
Value:
do {\
*((uint8_t *)(p) + 0) = (((uint16_t)(v)) >> 0) & 0xFF;\
*((uint8_t *)(p) + 1) = (((uint16_t)(v)) >> 8) & 0xFF;\
} while (0)

Definition at line 69 of file versaloon_include.h.

◆ SET_U16_MSBFIRST

#define SET_U16_MSBFIRST (   p,
 
)
Value:
do {\
*((uint8_t *)(p) + 0) = (((uint16_t)(v)) >> 8) & 0xFF;\
*((uint8_t *)(p) + 1) = (((uint16_t)(v)) >> 0) & 0xFF;\
} while (0)

Definition at line 57 of file versaloon_include.h.

◆ SET_U32_LSBFIRST

#define SET_U32_LSBFIRST (   p,
 
)
Value:
do {\
*((uint8_t *)(p) + 0) = (((uint32_t)(v)) >> 0) & 0xFF;\
*((uint8_t *)(p) + 1) = (((uint32_t)(v)) >> 8) & 0xFF;\
*((uint8_t *)(p) + 2) = (((uint32_t)(v)) >> 16) & 0xFF;\
*((uint8_t *)(p) + 3) = (((uint32_t)(v)) >> 24) & 0xFF;\
} while (0)

Definition at line 74 of file versaloon_include.h.

◆ SET_U32_MSBFIRST

#define SET_U32_MSBFIRST (   p,
 
)
Value:
do {\
*((uint8_t *)(p) + 0) = (((uint32_t)(v)) >> 24) & 0xFF;\
*((uint8_t *)(p) + 1) = (((uint32_t)(v)) >> 16) & 0xFF;\
*((uint8_t *)(p) + 2) = (((uint32_t)(v)) >> 8) & 0xFF;\
*((uint8_t *)(p) + 3) = (((uint32_t)(v)) >> 0) & 0xFF;\
} while (0)

Definition at line 62 of file versaloon_include.h.

◆ sleep_ms

#define sleep_ms (   ms)    jtag_sleep((ms) * 1000)

Definition at line 18 of file versaloon_include.h.

◆ TO_STR

#define TO_STR (   name)    #name

Definition at line 19 of file versaloon_include.h.