|
PIC24 Support Libraries
|
Embedded Systems Operating System (ESOS) Definitions to make ESOS code more generic and portable. More...
#include "pic24_generic.h"Go to the source code of this file.
Data Structures | |
| union | UINT8 |
| union | UINT16 |
| union | UINT32 |
Macros | |
| #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 | NULLPTR 0 |
| #define | NULLIDX 0xFF |
| #define | BIT0 0x01 |
| #define | BIT1 0x02 |
| #define | BIT2 0x04 |
| #define | BIT3 0x08 |
| #define | BIT4 0x10 |
| #define | BIT5 0x20 |
| #define | BIT6 0x40 |
| #define | BIT7 0x80 |
| #define | BIT8 0x0100 |
| #define | BIT9 0x0200 |
| #define | BIT10 0x0400 |
| #define | BIT11 0x0800 |
| #define | BIT12 0x1000 |
| #define | BIT13 0x2000 |
| #define | BIT14 0x4000 |
| #define | BIT15 0x8000 |
| #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) |
Enumerations | |
| enum | BOOL { FALSE = 0, TRUE } |
Embedded Systems Operating System (ESOS) Definitions to make ESOS code more generic and portable.
Definition in file all_generic.h.
| #define BIT0 0x01 |
Mask to represent bit 0 (the LSb)
Definition at line 405 of file all_generic.h.
| #define BIT1 0x02 |
Mask to represent bit 1
Definition at line 407 of file all_generic.h.
| #define BIT10 0x0400 |
Mask to represent bit 10
Definition at line 425 of file all_generic.h.
| #define BIT11 0x0800 |
Mask to represent bit 11
Definition at line 427 of file all_generic.h.
| #define BIT12 0x1000 |
Mask to represent bit 12
Definition at line 429 of file all_generic.h.
| #define BIT13 0x2000 |
Mask to represent bit 13
Definition at line 431 of file all_generic.h.
| #define BIT14 0x4000 |
Mask to represent bit 14
Definition at line 433 of file all_generic.h.
| #define BIT15 0x8000 |
Mask to represent bit 15 (the MSb of an uint16)
Definition at line 435 of file all_generic.h.
| #define BIT2 0x04 |
Mask to represent bit 2
Definition at line 409 of file all_generic.h.
| #define BIT3 0x08 |
Mask to represent bit 3
Definition at line 411 of file all_generic.h.
| #define BIT4 0x10 |
Mask to represent bit 4
Definition at line 413 of file all_generic.h.
| #define BIT5 0x20 |
Mask to represent bit 5
Definition at line 415 of file all_generic.h.
| #define BIT6 0x40 |
Mask to represent bit 6
Definition at line 417 of file all_generic.h.
| #define BIT7 0x80 |
Mask to represent bit 7 (the MSb of a uint8)
Definition at line 419 of file all_generic.h.
| #define BIT8 0x0100 |
Mask to represent bit 8 (the LSb of the most-significant byte in an uint8)
Definition at line 421 of file all_generic.h.
| #define BIT9 0x0200 |
Mask to represent bit 9
Definition at line 423 of 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 492 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 450 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 485 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 443 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 499 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 457 of file all_generic.h.
| #define FAIL FALSE |
another way to say FALSE
Definition at line 399 of file all_generic.h.
Referenced by open(), read(), stdioOpen(), and write().
| #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 517 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 477 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 508 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 467 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 362 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 369 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 348 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 182 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 189 of file all_generic.h.
| #define NULLIDX 0xFF |
An unitialized index value
Definition at line 403 of file all_generic.h.
Referenced by esos_UnregisterTask().
| #define NULLPTR 0 |
An uninitialized pointer
Definition at line 401 of file all_generic.h.
Referenced by esos_GetFreeChildTaskStruct(), esos_RegisterTask(), and esos_UnregisterTimer().
| #define OK TRUE |
another way to say TRUE
Definition at line 397 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 376 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 383 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 355 of file all_generic.h.
| 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 389 of file all_generic.h.
1.8.4