Landtiger LPC1768 C BigLib 1
A self made, custom C library for the LandTiger board.
 
Loading...
Searching...
No Matches
types.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define IS_BETWEEN_EQ(value, low, hi)   ((value) >= (low) && (value) <= (hi))
 
#define IS_BIT_SET(reg, bit)   (((reg) & (1 << bit)) == 1)
 
#define SET_BIT(reg, bit)   (reg |= (1 << bit))
 
#define CLR_BIT(reg, bit)   (reg &= ~(1 << bit))
 
#define SET_BITS(reg, value, bit)   (reg |= ((value) << bit))
 
#define CLR_BITS(reg, value, bit)   (reg &= ~((value) << bit))
 
#define _FORCE_INLINE   __attribute__((always_inline)) inline
 
#define _CBACK
 
#define _USED_EXTERNALLY   volatile
 
#define _DECL_EXTERNALLY   extern
 
#define _PRIVATE   static
 
#define _PROTOTYPE_ONLY
 
#define NO_PRESCALER   0
 
#define IS_DEF_PRIORITY(prio)   (((int)prio) <= INT_PRIO_DEF)
 
#define IS_NO_PRESCALER(presc)   (((int)presc) <= NO_PRESCALER)
 

Typedefs

typedef uint32_t u32
 
typedef uint16_t u16
 
typedef uint8_t u8
 
typedef int32_t i32
 
typedef int16_t i16
 
typedef int8_t i8
 

Enumerations

enum  INT_Priority { INT_PRIO_MAX = 0 , INT_PRIO_MIN = 15 , INT_PRIO_DEF = -1 }
 

Macro Definition Documentation

◆ _CBACK

#define _CBACK

Definition at line 33 of file types.h.

◆ _DECL_EXTERNALLY

#define _DECL_EXTERNALLY   extern

Definition at line 36 of file types.h.

◆ _FORCE_INLINE

#define _FORCE_INLINE   __attribute__((always_inline)) inline

Definition at line 32 of file types.h.

◆ _PRIVATE

#define _PRIVATE   static

Definition at line 37 of file types.h.

◆ _PROTOTYPE_ONLY

#define _PROTOTYPE_ONLY

Definition at line 38 of file types.h.

◆ _USED_EXTERNALLY

#define _USED_EXTERNALLY   volatile

Definition at line 35 of file types.h.

◆ CLR_BIT

#define CLR_BIT (   reg,
  bit 
)    (reg &= ~(1 << bit))

Definition at line 27 of file types.h.

◆ CLR_BITS

#define CLR_BITS (   reg,
  value,
  bit 
)    (reg &= ~((value) << bit))

Definition at line 30 of file types.h.

◆ IS_BETWEEN_EQ

#define IS_BETWEEN_EQ (   value,
  low,
  hi 
)    ((value) >= (low) && (value) <= (hi))

Definition at line 23 of file types.h.

◆ IS_BIT_SET

#define IS_BIT_SET (   reg,
  bit 
)    (((reg) & (1 << bit)) == 1)

Definition at line 24 of file types.h.

◆ IS_DEF_PRIORITY

#define IS_DEF_PRIORITY (   prio)    (((int)prio) <= INT_PRIO_DEF)

Definition at line 42 of file types.h.

◆ IS_NO_PRESCALER

#define IS_NO_PRESCALER (   presc)    (((int)presc) <= NO_PRESCALER)

Definition at line 43 of file types.h.

◆ NO_PRESCALER

#define NO_PRESCALER   0

Definition at line 40 of file types.h.

◆ SET_BIT

#define SET_BIT (   reg,
  bit 
)    (reg |= (1 << bit))

Definition at line 26 of file types.h.

◆ SET_BITS

#define SET_BITS (   reg,
  value,
  bit 
)    (reg |= ((value) << bit))

Definition at line 29 of file types.h.

Typedef Documentation

◆ i16

typedef int16_t i16

Definition at line 11 of file types.h.

◆ i32

typedef int32_t i32

Definition at line 10 of file types.h.

◆ i8

typedef int8_t i8

Definition at line 12 of file types.h.

◆ u16

typedef uint16_t u16

Definition at line 7 of file types.h.

◆ u32

typedef uint32_t u32

Definition at line 6 of file types.h.

◆ u8

typedef uint8_t u8

Definition at line 8 of file types.h.

Enumeration Type Documentation

◆ INT_Priority

Enumerator
INT_PRIO_MAX 
INT_PRIO_MIN 
INT_PRIO_DEF 

Definition at line 14 of file types.h.

15{
16 INT_PRIO_MAX = 0,
17 INT_PRIO_MIN = 15,
18 INT_PRIO_DEF = -1
INT_Priority
Definition types.h:15
@ INT_PRIO_MAX
Definition types.h:16
@ INT_PRIO_DEF
Definition types.h:18
@ INT_PRIO_MIN
Definition types.h:17