InES Hardware Abstraction Layer
hal_common.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * -- _____ ______ _____ -
3  * -- |_ _| | ____|/ ____| -
4  * -- | | _ __ | |__ | (___ Institute of Embedded Systems -
5  * -- | | | '_ \| __| \___ \ Zurich University of -
6  * -- _| |_| | | | |____ ____) | Applied Sciences -
7  * -- |_____|_| |_|______|_____/ 8401 Winterthur, Switzerland -
8  * ------------------------------------------------------------------------- */
16 /* Re-definition guard */
17 #ifndef _HAL_COMMON_H
18 #define _HAL_COMMON_H
19 
20 /* Standard includes */
21 #include <stdint.h>
22 
23 
24 /* -- Type definitions
25  * ------------------------------------------------------------------------- */
26 
31 typedef enum {
32  FALSE = 0u,
33  TRUE = !FALSE,
34  /* Derived */
39 } hal_bool_t;
40 
41 
46 typedef enum {
47  BYTE = 8u,
48  HWORD = 16u,
49  WORD = 32u,
50  DWORD = 64u
52 
53 
58 typedef enum {
59  PER_ADC1, // APB2
60  PER_ADC2,
61  PER_ADC3,
62 
63  PER_DAC, // APB1
64 
65  PER_DMA1, // AHB1
66  PER_DMA2,
67 
68  PER_FMC, // AHB3
69 
70  PER_GPIOA, // AHB1
71  PER_GPIOB,
72  PER_GPIOC,
73  PER_GPIOD,
74  PER_GPIOE,
75  PER_GPIOF,
76  PER_GPIOG,
77  PER_GPIOH,
78  PER_GPIOI,
79  PER_GPIOJ,
80  PER_GPIOK,
81 
82  PER_PWR, // APB1
83 
84  PER_TIM2, // APB1
85  PER_TIM3,
86  PER_TIM4,
87  PER_TIM5
89 
90 
91 #endif
Definition: hal_common.h:48
Definition: hal_common.h:36
Definition: hal_common.h:37
Definition: hal_common.h:49
Definition: hal_common.h:32
hal_peripheral_t
Defines a peripheral.
Definition: hal_common.h:58
hal_data_width_t
Defines standard data width.
Definition: hal_common.h:46
Definition: hal_common.h:50
Definition: hal_common.h:33
Definition: hal_common.h:35
Definition: hal_common.h:38
Definition: hal_common.h:47
hal_bool_t
Often used TRUE / FALSE type.
Definition: hal_common.h:31