ESOS32
ESOSOn32-bitProcessors
|
Embedded Systems Operating System 32 bit (ESOS32) definitions to make ESOS32 code more generic and portable. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
union | _UINT8 |
union | _UINT16 |
union | _UINT32 |
Macros | |
#define | HELLO_MSG "\n" __FILE__ ", built on " __DATE__ " at " __TIME__ "\n" |
#define | LSB(a) |
#define | MSB(a) |
#define | LOWER_WORD(a) |
#define | UPPER_WORD(a) |
#define | LOWER_LSB(a) |
#define | LOWER_MSB(a) |
#define | UPPER_LSB(a) |
#define | UPPER_MSB(a) |
#define | OK TRUE |
#define | FAIL FALSE |
#define | ON TRUE |
#define | OFF FALSE |
#define | HIGH TRUE |
#define | LOW FALSE |
#define | ENABLE TRUE |
#define | DISABLE FALSE |
#define | NULLPTR 0 |
#define | NULLIDX 0xFF |
#define | ESOS_BIT0 0x0001 |
#define | ESOS_BIT1 0x0002 |
#define | ESOS_BIT2 0x0004 |
#define | ESOS_BIT3 0x0008 |
#define | ESOS_BIT4 0x0010 |
#define | ESOS_BIT5 0x0020 |
#define | ESOS_BIT6 0x0040 |
#define | ESOS_BIT7 0x0080 |
#define | ESOS_BIT8 0x0100 |
#define | ESOS_BIT9 0x0200 |
#define | ESOS_BIT10 0x0400 |
#define | ESOS_BIT11 0x0800 |
#define | ESOS_BIT12 0x1000 |
#define | ESOS_BIT13 0x2000 |
#define | ESOS_BIT14 0x4000 |
#define | ESOS_BIT15 0x8000 |
#define | ESOS_BIT16 0x00010000 |
#define | ESOS_BIT17 0x00020000 |
#define | ESOS_BIT18 0x00040000 |
#define | ESOS_BIT19 0x00080000 |
#define | ESOS_BIT20 0x00100000 |
#define | ESOS_BIT21 0x00200000 |
#define | ESOS_BIT22 0x00400000 |
#define | ESOS_BIT23 0x00800000 |
#define | ESOS_BIT24 0x01000000 |
#define | ESOS_BIT25 0x02000000 |
#define | ESOS_BIT26 0x04000000 |
#define | ESOS_BIT27 0x08000000 |
#define | ESOS_BIT28 0x10000000 |
#define | ESOS_BIT29 0x20000000 |
#define | ESOS_BIT30 0x40000000 |
#define | ESOS_BIT31 0x80000000 |
#define | BIT_SET_MASK(var, mask) |
#define | BIT_CLEAR_MASK(var, mask) |
#define | BIT_TOGGLE_MASK(var, mask) |
#define | IS_BIT_SET_MASK(var, mask) |
#define | IS_BIT_CLEAR_MASK(var, mask) |
#define | BIT_SET(var, bitnum) |
#define | BIT_CLEAR(var, bitnum) |
#define | BIT_TOGGLE(var, bitnum) |
#define | IS_BIT_SET(var, bitnum) |
#define | IS_BIT_CLEAR(var, bitnum) |
Typedefs | |
typedef union _UINT8 | UINT8 |
typedef union _UINT16 | UINT16 |
typedef union _UINT32 | UINT32 |
typedef enum _BOOL | BOOL |
Enumerations | |
enum | _BOOL { FALSE = 0, TRUE } |
Embedded Systems Operating System 32 bit (ESOS32) definitions to make ESOS32 code more generic and portable.
Definition in file all_generic.h.
#define BIT_CLEAR | ( | var, | |
bitnum | |||
) |
Clears a single bit in a variable
var | variable |
bitnum | Number (0-?) of the bit that should be cleared |
Definition at line 628 of file all_generic.h.
#define BIT_CLEAR_MASK | ( | var, | |
mask | |||
) |
Clear the bits of a variable according to a mask
var | variable containing the bits to "clear" |
mask | varable with ONEs in the locations where you want to clear bits |
Definition at line 586 of file all_generic.h.
#define BIT_SET | ( | var, | |
bitnum | |||
) |
Sets a single bit in a variable
var | variable |
bitnum | Number (0-?) of the bit that should be set |
Definition at line 621 of file all_generic.h.
#define BIT_SET_MASK | ( | var, | |
mask | |||
) |
Sets the bits of a variable according to a mask
var | variable containing the bits to "set" |
mask | varable with ONEs in the locations where you want to set bits |
Definition at line 579 of file all_generic.h.
#define BIT_TOGGLE | ( | var, | |
bitnum | |||
) |
Toggle a single bit in a variable
var | variable |
bitnum | Number (0-?) of the bit that should be toggleed |
Definition at line 635 of file all_generic.h.
#define BIT_TOGGLE_MASK | ( | var, | |
mask | |||
) |
Toggle the bits of a variable according to a mask
var | variable containing the bits to "toggle" |
mask | varable with ONEs in the locations where you want to toggle bits |
Definition at line 593 of file all_generic.h.
#define ESOS_BIT0 0x0001 |
Mask to represent bit 0 (the LSb)
Definition at line 446 of file all_generic.h.
#define ESOS_BIT1 0x0002 |
Mask to represent bit 1
Definition at line 450 of file all_generic.h.
#define ESOS_BIT10 0x0400 |
Mask to represent bit 10
Definition at line 486 of file all_generic.h.
#define ESOS_BIT11 0x0800 |
Mask to represent bit 11
Definition at line 490 of file all_generic.h.
#define ESOS_BIT12 0x1000 |
Mask to represent bit 12
Definition at line 494 of file all_generic.h.
#define ESOS_BIT13 0x2000 |
Mask to represent bit 13
Definition at line 498 of file all_generic.h.
#define ESOS_BIT14 0x4000 |
Mask to represent bit 14
Definition at line 502 of file all_generic.h.
#define ESOS_BIT15 0x8000 |
Mask to represent bit 15 (the MSb of an uint16)
Definition at line 506 of file all_generic.h.
#define ESOS_BIT16 0x00010000 |
Mask to represent bit 16
Definition at line 510 of file all_generic.h.
#define ESOS_BIT17 0x00020000 |
Mask to represent bit 17
Definition at line 514 of file all_generic.h.
#define ESOS_BIT18 0x00040000 |
Mask to represent bit 18
Definition at line 518 of file all_generic.h.
#define ESOS_BIT19 0x00080000 |
Mask to represent bit 19
Definition at line 522 of file all_generic.h.
#define ESOS_BIT2 0x0004 |
Mask to represent bit 2
Definition at line 454 of file all_generic.h.
#define ESOS_BIT20 0x00100000 |
Mask to represent bit 20
Definition at line 526 of file all_generic.h.
#define ESOS_BIT21 0x00200000 |
Mask to represent bit 21
Definition at line 530 of file all_generic.h.
#define ESOS_BIT22 0x00400000 |
Mask to represent bit 22
Definition at line 534 of file all_generic.h.
#define ESOS_BIT23 0x00800000 |
Mask to represent bit 23
Definition at line 538 of file all_generic.h.
#define ESOS_BIT24 0x01000000 |
Mask to represent bit 24
Definition at line 542 of file all_generic.h.
#define ESOS_BIT25 0x02000000 |
Mask to represent bit 25
Definition at line 546 of file all_generic.h.
#define ESOS_BIT26 0x04000000 |
Mask to represent bit 26
Definition at line 550 of file all_generic.h.
#define ESOS_BIT27 0x08000000 |
Mask to represent bit 27
Definition at line 554 of file all_generic.h.
#define ESOS_BIT28 0x10000000 |
Mask to represent bit 28
Definition at line 558 of file all_generic.h.
#define ESOS_BIT29 0x20000000 |
Mask to represent bit 29
Definition at line 562 of file all_generic.h.
#define ESOS_BIT3 0x0008 |
Mask to represent bit 3
Definition at line 458 of file all_generic.h.
#define ESOS_BIT30 0x40000000 |
Mask to represent bit 30
Definition at line 566 of file all_generic.h.
#define ESOS_BIT31 0x80000000 |
Mask to represent bit 31 (the MSb of an uint32)
Definition at line 570 of file all_generic.h.
#define ESOS_BIT4 0x0010 |
Mask to represent bit 4
Definition at line 462 of file all_generic.h.
#define ESOS_BIT5 0x0020 |
Mask to represent bit 5
Definition at line 466 of file all_generic.h.
#define ESOS_BIT6 0x0040 |
Mask to represent bit 6
Definition at line 470 of file all_generic.h.
#define ESOS_BIT7 0x0080 |
Mask to represent bit 7 (the MSb of a uint8)
Definition at line 474 of file all_generic.h.
#define ESOS_BIT8 0x0100 |
Mask to represent bit 8 (the LSb of the most-significant byte in an uint8)
Definition at line 478 of file all_generic.h.
#define ESOS_BIT9 0x0200 |
Mask to represent bit 9
Definition at line 482 of file all_generic.h.
#define FAIL FALSE |
another way to say FALSE
Definition at line 416 of file all_generic.h.
#define IS_BIT_CLEAR | ( | var, | |
bitnum | |||
) |
Determine if a bit is cleared in a variable
var | variable containing the bits to test |
bitnum | Number (0-?) of the bit to test for being cleared |
TRUE | if the bit is clear |
FALSE | otherwise |
Definition at line 653 of file all_generic.h.
#define IS_BIT_CLEAR_MASK | ( | var, | |
mask | |||
) |
Determine if one or more bits are cleared in a variable
var | variable containing the bits to test |
mask | varable with ONEs in the locations where you want to check for cleared bits |
TRUE | if one or more of the mask bits are cleared in the variable |
FALSE | if none of the mask bits are cleared |
Definition at line 613 of file all_generic.h.
#define IS_BIT_SET | ( | var, | |
bitnum | |||
) |
Determine if a bit is set in a variable
var | variable containing the bits to test |
bitnum | Number (0-?) of the bit to test for being set |
TRUE | if the bit is set |
FALSE | otherwise |
Definition at line 644 of file all_generic.h.
#define IS_BIT_SET_MASK | ( | var, | |
mask | |||
) |
Determine if one or more bits are set in a variable
var | variable containing the bits to test |
mask | varable with ONEs in the locations where you want to check for set bits |
TRUE | if one or more of the mask bits are set in the variable |
FALSE | if none of the mask bits are set |
Definition at line 603 of file all_generic.h.
#define LOWER_LSB | ( | a | ) |
Returns the Least-Significant-BYTE (uint8) of a UINT32 structure
a | UINT32 structure holding a 32-bit value |
Definition at line 378 of file all_generic.h.
#define LOWER_MSB | ( | a | ) |
Returns the 2nd most least-Significant-BYTE (uint8) of a UINT32 structure
a | UINT32 structure holding a 32-bit value |
Definition at line 385 of file all_generic.h.
#define LOWER_WORD | ( | a | ) |
Returns the Least-Significant-WORD (uint16) of a UINT32 structure
a | UINT32 structure holding a 32-bit value |
Definition at line 364 of file all_generic.h.
#define LSB | ( | a | ) |
Returns the Least-Significant-Byte (LSB)
a | UINT16 structure holding a 16-bit value |
Definition at line 198 of file all_generic.h.
#define MSB | ( | a | ) |
Returns the Most-Significant-Byte (MSB)
a | UINT16 structure holding a 16-bit value |
Definition at line 205 of file all_generic.h.
#define NULLIDX 0xFF |
An unitialized index value
Definition at line 437 of file all_generic.h.
#define NULLPTR 0 |
An uninitialized pointer
Definition at line 435 of file all_generic.h.
#define OK TRUE |
another way to say TRUE
Definition at line 414 of file all_generic.h.
#define UPPER_LSB | ( | a | ) |
Returns the 3nd most least-Significant-BYTE (uint8) of a UINT32 structure
a | UINT32 structure holding a 32-bit value |
Definition at line 392 of file all_generic.h.
#define UPPER_MSB | ( | a | ) |
Returns the Most-Significant-BYTE (uint8) of a UINT32 structure
a | UINT32 structure holding a 32-bit value |
Definition at line 399 of file all_generic.h.
#define UPPER_WORD | ( | a | ) |
Returns the Most-Significant-WORD (uint16) of a UINT32 structure
a | UINT32 structure holding a 32-bit value |
Definition at line 371 of file all_generic.h.
Union structure to hold uint16s to provide access to 16-bit data with different "viewpoints" (or casts, if you will).
Union structure to hold an uint32 to provide access to 32-bit data with different "viewpoints" (or casts, if you will).
Union structure to hold an uint8 (byte) to provide access to 8-bit data with different "viewpoints" (or casts, if you will).
enum _BOOL |
A single bit quantity. Takes on the value TRUE or FALSE.
Enumerator | |
---|---|
FALSE | False, not true, off, zero |
TRUE | True, not false, on, one |
Definition at line 406 of file all_generic.h.