Common defines and macros for firmware developed by Nordic Semiconductor. More...
Go to the source code of this file.
| Defines | |
| #define | SWAP(x) ((((x)&0xFFU)<<8)|(((x)>>8)&0xFFU)) | 
| #define | MSB(a) (((a) & 0xFF00U) >> 8) | 
| #define | LSB(a) (((a) & 0xFFU)) | 
| #define | MIN(a, b) ((a) < (b) ? (a) : (b)) | 
| #define | MAX(a, b) ((a) < (b) ? (b) : (a)) | 
| #define | BIT_0 0x01U | 
| #define | BIT_1 0x02U | 
| #define | BIT_2 0x04U | 
| #define | BIT_3 0x08U | 
| #define | BIT_4 0x10U | 
| #define | BIT_5 0x20U | 
| #define | BIT_6 0x40U | 
| #define | BIT_7 0x80U | 
| #define | BIT_8 0x0100U | 
| #define | BIT_9 0x0200U | 
| #define | BIT_10 0x0400U | 
| #define | BIT_11 0x0800U | 
| #define | BIT_12 0x1000U | 
| #define | BIT_13 0x2000U | 
| #define | BIT_14 0x4000U | 
| #define | BIT_15 0x8000U | 
Common defines and macros for firmware developed by Nordic Semiconductor.
Definition in file nordic_common.h.
| #define SWAP | ( | x ) | ((((x)&0xFFU)<<8)|(((x)>>8)&0xFFU)) | 
Swaps the upper byte with the lower byte in a 16 bit variable
Definition at line 24 of file nordic_common.h.
| #define MSB | ( | a ) | (((a) & 0xFF00U) >> 8) | 
The upper 8 bits of a 16 bit value
Definition at line 27 of file nordic_common.h.
| #define LSB | ( | a ) | (((a) & 0xFFU)) | 
The lower 8 bits (of a 16 bit value)
Definition at line 29 of file nordic_common.h.
| #define MIN | ( | a, | |
| b | |||
| ) | ((a) < (b) ? (a) : (b)) | 
Leaves the minimum of the two arguments
Definition at line 32 of file nordic_common.h.
| #define MAX | ( | a, | |
| b | |||
| ) | ((a) < (b) ? (b) : (a)) | 
Leaves the maximum of the two arguments
Definition at line 34 of file nordic_common.h.
| #define BIT_0 0x01U | 
The value of bit 0
Definition at line 36 of file nordic_common.h.
| #define BIT_1 0x02U | 
The value of bit 1
Definition at line 37 of file nordic_common.h.
| #define BIT_2 0x04U | 
The value of bit 2
Definition at line 38 of file nordic_common.h.
| #define BIT_3 0x08U | 
The value of bit 3
Definition at line 39 of file nordic_common.h.
| #define BIT_4 0x10U | 
The value of bit 4
Definition at line 40 of file nordic_common.h.
| #define BIT_5 0x20U | 
The value of bit 5
Definition at line 41 of file nordic_common.h.
| #define BIT_6 0x40U | 
The value of bit 6
Definition at line 42 of file nordic_common.h.
| #define BIT_7 0x80U | 
The value of bit 7
Definition at line 43 of file nordic_common.h.
| #define BIT_8 0x0100U | 
The value of bit 8
Definition at line 44 of file nordic_common.h.
| #define BIT_9 0x0200U | 
The value of bit 9
Definition at line 45 of file nordic_common.h.
| #define BIT_10 0x0400U | 
The value of bit 10
Definition at line 46 of file nordic_common.h.
| #define BIT_11 0x0800U | 
The value of bit 11
Definition at line 47 of file nordic_common.h.
| #define BIT_12 0x1000U | 
The value of bit 12
Definition at line 48 of file nordic_common.h.
| #define BIT_13 0x2000U | 
The value of bit 13
Definition at line 49 of file nordic_common.h.
| #define BIT_14 0x4000U | 
The value of bit 14
Definition at line 50 of file nordic_common.h.
| #define BIT_15 0x8000U | 
The value of bit 15
Definition at line 51 of file nordic_common.h.
 1.7.2
 1.7.2