APM:Libraries
Classes | Macros | Typedefs | Functions
compat.h File Reference
#include "binary.h"
#include <inttypes.h>
#include <AP_HAL_F4Light/AP_HAL_F4Light.h>
#include <AP_HAL_F4Light/GPIO.h>
#include <AP_HAL_F4Light/Scheduler.h>
#include <AP_HAL/utility/print_vprintf.h>
#include "../osd_ns.h"
Include dependency graph for compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OSDns::BetterStream
 

Macros

#define PSTR(x)   (x)
 
#define PROGMEM
 
#define INLINE   __attribute__ ((always_inline)) inline
 
#define WEAK   __attribute__((weak))
 
#define PSTR(str)   (str)
 
#define BYTE_OF(v, n)   (((byte *)&(v))[n])
 
#define TO_STRING2(x)   #x
 
#define TO_STRING(x)   TO_STRING2(x)
 
#define NOINLINE   __attribute__ ((noinline))
 

Typedefs

typedef uint8_t byte
 
typedef uint8_t boolean
 
typedef char prog_char
 
typedef const char * PGM_P
 
typedef uint32_t byte_32
 
typedef int16_t byte_16
 

Functions

static int max (int a, int b)
 
static float pgm_read_float (const void *v)
 
static uint8_t pgm_read_byte (const void *v)
 
static uint32_t pgm_read_word (const void *v)
 
void max7456_off ()
 
void max7456_on ()
 
static void delayMicroseconds (uint16_t us)
 

Macro Definition Documentation

◆ BYTE_OF

#define BYTE_OF (   v,
 
)    (((byte *)&(v))[n])

Definition at line 29 of file compat.h.

◆ INLINE

#define INLINE   __attribute__ ((always_inline)) inline

Definition at line 20 of file compat.h.

◆ NOINLINE

#define NOINLINE   __attribute__ ((noinline))

Definition at line 63 of file compat.h.

◆ PROGMEM

#define PROGMEM

Definition at line 13 of file compat.h.

◆ PSTR [1/2]

#define PSTR (   x)    (x)

Definition at line 27 of file compat.h.

◆ PSTR [2/2]

#define PSTR (   str)    (str)

Definition at line 27 of file compat.h.

◆ TO_STRING

#define TO_STRING (   x)    TO_STRING2(x)

Definition at line 32 of file compat.h.

◆ TO_STRING2

#define TO_STRING2 (   x)    #x

Definition at line 31 of file compat.h.

◆ WEAK

#define WEAK   __attribute__((weak))

Definition at line 21 of file compat.h.

Typedef Documentation

◆ boolean

typedef uint8_t boolean

Definition at line 16 of file compat.h.

◆ byte

typedef uint8_t byte

Definition at line 8 of file compat.h.

◆ byte_16

typedef int16_t byte_16

Definition at line 77 of file compat.h.

◆ byte_32

typedef uint32_t byte_32

Definition at line 76 of file compat.h.

◆ PGM_P

typedef const char* PGM_P

Definition at line 23 of file compat.h.

◆ prog_char

typedef char prog_char

Definition at line 18 of file compat.h.

Function Documentation

◆ delayMicroseconds()

static void delayMicroseconds ( uint16_t  us)
inlinestatic

Definition at line 82 of file compat.h.

Referenced by delay_telem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max()

static int max ( int  a,
int  b 
)
inlinestatic

Definition at line 35 of file compat.h.

Referenced by AP_Avoidance::add_obstacle(), AP_Avoidance::init(), and loop().

Here is the caller graph for this function:

◆ max7456_off()

void max7456_off ( )

◆ max7456_on()

void max7456_on ( )

◆ pgm_read_byte()

static uint8_t pgm_read_byte ( const void *  v)
inlinestatic

Definition at line 45 of file compat.h.

◆ pgm_read_float()

static float pgm_read_float ( const void *  v)
inlinestatic

Definition at line 40 of file compat.h.

Referenced by get_converth(), and get_converts().

Here is the caller graph for this function:

◆ pgm_read_word()

static uint32_t pgm_read_word ( const void *  v)
inlinestatic

Definition at line 51 of file compat.h.