libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
COMP Defines

libopencm3 Defined Constants and Types for the STM32F3xx Comparator module More...

Collaboration diagram for COMP Defines:

Macros

#define COMP1   (COMP_BASE + 0x1C)
 
#define COMP2   (COMP_BASE + 0x20)
 
#define COMP3   (COMP_BASE + 0x24)
 
#define COMP4   (COMP_BASE + 0x28)
 
#define COMP5   (COMP_BASE + 0x2C)
 
#define COMP6   (COMP_BASE + 0x30)
 
#define COMP7   (COMP_BASE + 0x34)
 
#define COMP_CSR(comp_base)   MMIO32((comp_base) + 0x00)
 
#define COMP1_CSR   COMP_CSR(COMP1)
 
#define COMP2_CSR   COMP_CSR(COMP2)
 
#define COMP3_CSR   COMP_CSR(COMP3)
 
#define COMP4_CSR   COMP_CSR(COMP4)
 
#define COMP5_CSR   COMP_CSR(COMP5)
 
#define COMP6_CSR   COMP_CSR(COMP6)
 
#define COMP7_CSR   COMP_CSR(COMP7)
 
#define COMP_CSR_LOCK   (0x1 << 31)
 
#define COMP_CSR_OUT   (0x1 << 30)
 
#define COMP_CSR_BLANKING_MASK   (0x7)
 
#define COMP_CSR_BLANKING_SHIFT   (18)
 
#define COMP_CSR_BLANKING_NONE   (0x0)
 
#define COMP_CSR_BLANKING(blanking)   (((blanking) & COMP_CSR_BLANKING_MASK) << COMP_CSR_BLANKING_SHIFT)
 
#define COMP_CSR_HYST_NONE   (0x0)
 
#define COMP_CSR_HYST_LOW   (0x1)
 
#define COMP_CSR_HYST_MEDIUM   (0x2)
 
#define COMP_CSR_HYST_HIGH   (0x3)
 
#define COMP_CSR_HYST_MASK   (0x3)
 
#define COMP_CSR_HYST_SHIFT   (16)
 
#define COMP_CSR_POL   (0x1 << 15)
 
#define COMP_CSR_OUTSEL(outsel)   (((outsel) & COMP_CSR_OUTSEL_MASK) << COMP_CSR_OUTSEL_SHIFT)
 
#define COMP_CSR_OUTSEL_MASK   (0xf)
 
#define COMP_CSR_OUTSEL_SHIFT   (10)
 
#define COMP_CSR_WINMODE   (0x1 << 9)
 
#define COMP_CSR_INPSEL   (0x1 << 7)
 
#define COMP_CSR_INMSEL(inmsel)
 
#define COMP_CSR_INMSEL_MASK   (0x7 << 4)
 
#define COMP_CSR_MODE_HIGHSPEED   (0x0)
 
#define COMP_CSR_MODE_MEDIUMSPEED   (0x1)
 
#define COMP_CSR_MODE_LOWSPEED   (0x2)
 
#define COMP_CSR_MODE_ULTRALOWPOWER   (0x3)
 
#define COMP_CSR_MODE_MASK   (0x3)
 
#define COMP_CSR_MODE_SHIFT   (2)
 
#define COMP_CSR_INPDAC   (0x1 << 1)
 
#define COMP_CSR_EN   (0x1 << 0)
 

Detailed Description

libopencm3 Defined Constants and Types for the STM32F3xx Comparator module

Version
1.0.0
Date
20 Jul 2018

LGPL License Terms libopencm3 License

Macro Definition Documentation

◆ COMP1

#define COMP1   (COMP_BASE + 0x1C)

Definition at line 35 of file comparator.h.

◆ COMP1_CSR

#define COMP1_CSR   COMP_CSR(COMP1)

Definition at line 47 of file comparator.h.

◆ COMP2

#define COMP2   (COMP_BASE + 0x20)

Definition at line 36 of file comparator.h.

◆ COMP2_CSR

#define COMP2_CSR   COMP_CSR(COMP2)

Definition at line 48 of file comparator.h.

◆ COMP3

#define COMP3   (COMP_BASE + 0x24)

Definition at line 37 of file comparator.h.

◆ COMP3_CSR

#define COMP3_CSR   COMP_CSR(COMP3)

Definition at line 49 of file comparator.h.

◆ COMP4

#define COMP4   (COMP_BASE + 0x28)

Definition at line 38 of file comparator.h.

◆ COMP4_CSR

#define COMP4_CSR   COMP_CSR(COMP4)

Definition at line 50 of file comparator.h.

◆ COMP5

#define COMP5   (COMP_BASE + 0x2C)

Definition at line 39 of file comparator.h.

◆ COMP5_CSR

#define COMP5_CSR   COMP_CSR(COMP5)

Definition at line 51 of file comparator.h.

◆ COMP6

#define COMP6   (COMP_BASE + 0x30)

Definition at line 40 of file comparator.h.

◆ COMP6_CSR

#define COMP6_CSR   COMP_CSR(COMP6)

Definition at line 52 of file comparator.h.

◆ COMP7

#define COMP7   (COMP_BASE + 0x34)

Definition at line 41 of file comparator.h.

◆ COMP7_CSR

#define COMP7_CSR   COMP_CSR(COMP7)

Definition at line 53 of file comparator.h.

◆ COMP_CSR

#define COMP_CSR (   comp_base)    MMIO32((comp_base) + 0x00)

Definition at line 46 of file comparator.h.

◆ COMP_CSR_BLANKING

#define COMP_CSR_BLANKING (   blanking)    (((blanking) & COMP_CSR_BLANKING_MASK) << COMP_CSR_BLANKING_SHIFT)

Definition at line 64 of file comparator.h.

◆ COMP_CSR_BLANKING_MASK

#define COMP_CSR_BLANKING_MASK   (0x7)

Definition at line 61 of file comparator.h.

◆ COMP_CSR_BLANKING_NONE

#define COMP_CSR_BLANKING_NONE   (0x0)

Definition at line 63 of file comparator.h.

◆ COMP_CSR_BLANKING_SHIFT

#define COMP_CSR_BLANKING_SHIFT   (18)

Definition at line 62 of file comparator.h.

◆ COMP_CSR_EN

#define COMP_CSR_EN   (0x1 << 0)

Definition at line 103 of file comparator.h.

◆ COMP_CSR_HYST_HIGH

#define COMP_CSR_HYST_HIGH   (0x3)

Definition at line 70 of file comparator.h.

◆ COMP_CSR_HYST_LOW

#define COMP_CSR_HYST_LOW   (0x1)

Definition at line 68 of file comparator.h.

◆ COMP_CSR_HYST_MASK

#define COMP_CSR_HYST_MASK   (0x3)

Definition at line 71 of file comparator.h.

◆ COMP_CSR_HYST_MEDIUM

#define COMP_CSR_HYST_MEDIUM   (0x2)

Definition at line 69 of file comparator.h.

◆ COMP_CSR_HYST_NONE

#define COMP_CSR_HYST_NONE   (0x0)

Definition at line 67 of file comparator.h.

◆ COMP_CSR_HYST_SHIFT

#define COMP_CSR_HYST_SHIFT   (16)

Definition at line 72 of file comparator.h.

◆ COMP_CSR_INMSEL

#define COMP_CSR_INMSEL (   inmsel)
Value:
((((inmsel) & 0x7) << 4) | \
((((inmsel) & 0x8) >> 3) << 22))

Definition at line 89 of file comparator.h.

◆ COMP_CSR_INMSEL_MASK

#define COMP_CSR_INMSEL_MASK   (0x7 << 4)

Definition at line 91 of file comparator.h.

◆ COMP_CSR_INPDAC

#define COMP_CSR_INPDAC   (0x1 << 1)

Definition at line 101 of file comparator.h.

◆ COMP_CSR_INPSEL

#define COMP_CSR_INPSEL   (0x1 << 7)

Definition at line 85 of file comparator.h.

◆ COMP_CSR_LOCK

#define COMP_CSR_LOCK   (0x1 << 31)

Definition at line 57 of file comparator.h.

◆ COMP_CSR_MODE_HIGHSPEED

#define COMP_CSR_MODE_HIGHSPEED   (0x0)

Definition at line 93 of file comparator.h.

◆ COMP_CSR_MODE_LOWSPEED

#define COMP_CSR_MODE_LOWSPEED   (0x2)

Definition at line 95 of file comparator.h.

◆ COMP_CSR_MODE_MASK

#define COMP_CSR_MODE_MASK   (0x3)

Definition at line 97 of file comparator.h.

◆ COMP_CSR_MODE_MEDIUMSPEED

#define COMP_CSR_MODE_MEDIUMSPEED   (0x1)

Definition at line 94 of file comparator.h.

◆ COMP_CSR_MODE_SHIFT

#define COMP_CSR_MODE_SHIFT   (2)

Definition at line 98 of file comparator.h.

◆ COMP_CSR_MODE_ULTRALOWPOWER

#define COMP_CSR_MODE_ULTRALOWPOWER   (0x3)

Definition at line 96 of file comparator.h.

◆ COMP_CSR_OUT

#define COMP_CSR_OUT   (0x1 << 30)

Definition at line 58 of file comparator.h.

◆ COMP_CSR_OUTSEL

#define COMP_CSR_OUTSEL (   outsel)    (((outsel) & COMP_CSR_OUTSEL_MASK) << COMP_CSR_OUTSEL_SHIFT)

Definition at line 77 of file comparator.h.

◆ COMP_CSR_OUTSEL_MASK

#define COMP_CSR_OUTSEL_MASK   (0xf)

Definition at line 78 of file comparator.h.

◆ COMP_CSR_OUTSEL_SHIFT

#define COMP_CSR_OUTSEL_SHIFT   (10)

Definition at line 79 of file comparator.h.

◆ COMP_CSR_POL

#define COMP_CSR_POL   (0x1 << 15)

Definition at line 74 of file comparator.h.

◆ COMP_CSR_WINMODE

#define COMP_CSR_WINMODE   (0x1 << 9)

Definition at line 82 of file comparator.h.