microHAL
An abstraction layer for your future F4xx projects
Loading...
Searching...
No Matches
defines.h
Go to the documentation of this file.
1
8#ifndef DEFINES_H
9#define DEFINES_H
10
11/* LOGIC */
12#define TRUE 1
13#define FALSE 0
14#define BIT(pos) (1UL << (pos))
15
16/* ASM INSTRUCTIONS */
17#ifndef UTEST
18#define ASM_INSTR(x) __asm volatile(#x)
19#else
20#define ASM_INSTR(x)
21#endif
22#define ASM_BKPT ASM_INSTR(BKPT)
23#define ASM_NOP ASM_INSTR(NOP)
24#define ASM_DSB ASM_INSTR(DSB)
25
26/* SYSTEM */
27#define HSE_CLK 8 // in MHz
28#define SYS_CLK 180
29#define APB1_CLK 45
30#define APB2_CLK 90
31
32/* TYPES */
33#define REG32 volatile uint32_t
34
35#endif