libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
common.h File Reference
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BEGIN_DECLS
 
#define END_DECLS
 
#define LIBOPENCM3_DEPRECATED(x)
 
#define MMIO8(addr)   (*(volatile uint8_t *)(addr))
 
#define MMIO16(addr)   (*(volatile uint16_t *)(addr))
 
#define MMIO32(addr)   (*(volatile uint32_t *)(addr))
 
#define MMIO64(addr)   (*(volatile uint64_t *)(addr))
 
#define BBIO_SRAM(addr, bit)    MMIO32((((uint32_t)addr) & 0x0FFFFF) * 32 + 0x22000000 + (bit) * 4)
 
#define BBIO_PERIPH(addr, bit)    MMIO32((((uint32_t)addr) & 0x0FFFFF) * 32 + 0x42000000 + (bit) * 4)
 
#define BIT0   (1<<0)
 
#define BIT1   (1<<1)
 
#define BIT2   (1<<2)
 
#define BIT3   (1<<3)
 
#define BIT4   (1<<4)
 
#define BIT5   (1<<5)
 
#define BIT6   (1<<6)
 
#define BIT7   (1<<7)
 
#define BIT8   (1<<8)
 
#define BIT9   (1<<9)
 
#define BIT10   (1<<10)
 
#define BIT11   (1<<11)
 
#define BIT12   (1<<12)
 
#define BIT13   (1<<13)
 
#define BIT14   (1<<14)
 
#define BIT15   (1<<15)
 
#define BIT16   (1<<16)
 
#define BIT17   (1<<17)
 
#define BIT18   (1<<18)
 
#define BIT19   (1<<19)
 
#define BIT20   (1<<20)
 
#define BIT21   (1<<21)
 
#define BIT22   (1<<22)
 
#define BIT23   (1<<23)
 
#define BIT24   (1<<24)
 
#define BIT25   (1<<25)
 
#define BIT26   (1<<26)
 
#define BIT27   (1<<27)
 
#define BIT28   (1<<28)
 
#define BIT29   (1<<29)
 
#define BIT30   (1<<30)
 
#define BIT31   (1<<31)
 

Macro Definition Documentation

◆ BBIO_PERIPH

#define BBIO_PERIPH (   addr,
  bit 
)     MMIO32((((uint32_t)addr) & 0x0FFFFF) * 32 + 0x42000000 + (bit) * 4)

Definition at line 76 of file common.h.

◆ BBIO_SRAM

#define BBIO_SRAM (   addr,
  bit 
)     MMIO32((((uint32_t)addr) & 0x0FFFFF) * 32 + 0x22000000 + (bit) * 4)

Definition at line 73 of file common.h.

◆ BEGIN_DECLS

#define BEGIN_DECLS

Definition at line 33 of file common.h.

◆ BIT0

#define BIT0   (1<<0)

Definition at line 81 of file common.h.

◆ BIT1

#define BIT1   (1<<1)

Definition at line 82 of file common.h.

◆ BIT10

#define BIT10   (1<<10)

Definition at line 91 of file common.h.

◆ BIT11

#define BIT11   (1<<11)

Definition at line 92 of file common.h.

◆ BIT12

#define BIT12   (1<<12)

Definition at line 93 of file common.h.

◆ BIT13

#define BIT13   (1<<13)

Definition at line 94 of file common.h.

◆ BIT14

#define BIT14   (1<<14)

Definition at line 95 of file common.h.

◆ BIT15

#define BIT15   (1<<15)

Definition at line 96 of file common.h.

◆ BIT16

#define BIT16   (1<<16)

Definition at line 97 of file common.h.

◆ BIT17

#define BIT17   (1<<17)

Definition at line 98 of file common.h.

◆ BIT18

#define BIT18   (1<<18)

Definition at line 99 of file common.h.

◆ BIT19

#define BIT19   (1<<19)

Definition at line 100 of file common.h.

◆ BIT2

#define BIT2   (1<<2)

Definition at line 83 of file common.h.

◆ BIT20

#define BIT20   (1<<20)

Definition at line 101 of file common.h.

◆ BIT21

#define BIT21   (1<<21)

Definition at line 102 of file common.h.

◆ BIT22

#define BIT22   (1<<22)

Definition at line 103 of file common.h.

◆ BIT23

#define BIT23   (1<<23)

Definition at line 104 of file common.h.

◆ BIT24

#define BIT24   (1<<24)

Definition at line 105 of file common.h.

◆ BIT25

#define BIT25   (1<<25)

Definition at line 106 of file common.h.

◆ BIT26

#define BIT26   (1<<26)

Definition at line 107 of file common.h.

◆ BIT27

#define BIT27   (1<<27)

Definition at line 108 of file common.h.

◆ BIT28

#define BIT28   (1<<28)

Definition at line 109 of file common.h.

◆ BIT29

#define BIT29   (1<<29)

Definition at line 110 of file common.h.

◆ BIT3

#define BIT3   (1<<3)

Definition at line 84 of file common.h.

◆ BIT30

#define BIT30   (1<<30)

Definition at line 111 of file common.h.

◆ BIT31

#define BIT31   (1<<31)

Definition at line 112 of file common.h.

◆ BIT4

#define BIT4   (1<<4)

Definition at line 85 of file common.h.

◆ BIT5

#define BIT5   (1<<5)

Definition at line 86 of file common.h.

◆ BIT6

#define BIT6   (1<<6)

Definition at line 87 of file common.h.

◆ BIT7

#define BIT7   (1<<7)

Definition at line 88 of file common.h.

◆ BIT8

#define BIT8   (1<<8)

Definition at line 89 of file common.h.

◆ BIT9

#define BIT9   (1<<9)

Definition at line 90 of file common.h.

◆ END_DECLS

#define END_DECLS

Definition at line 34 of file common.h.

◆ LIBOPENCM3_DEPRECATED

#define LIBOPENCM3_DEPRECATED (   x)

Definition at line 46 of file common.h.

◆ MMIO16

#define MMIO16 (   addr)    (*(volatile uint16_t *)(addr))

Definition at line 68 of file common.h.

◆ MMIO32

#define MMIO32 (   addr)    (*(volatile uint32_t *)(addr))

Definition at line 69 of file common.h.

◆ MMIO64

#define MMIO64 (   addr)    (*(volatile uint64_t *)(addr))

Definition at line 70 of file common.h.

◆ MMIO8

#define MMIO8 (   addr)    (*(volatile uint8_t *)(addr))

Definition at line 67 of file common.h.