HWA
Bare metal programming with style
hwa_1.h
Go to the documentation of this file.
1 
2 /* This file is part of the HWA project.
3  * Copyright (c) 2012,2015 Christophe Duparquet.
4  * All rights reserved. Read LICENSE.TXT for details.
5  */
6 
27 #define HW_DEVICE_FAMILY stm32
28 
32 #define HW_DEVICE_FAMILY_STM32
33 
37 #define HW_DEVICE_VENDOR_ST
38 
42 #define HW_DEVICE_VENDOR st
43 
47 #define HW_DEVICE_ARCH_STM32
48 
52 #define HW_DEVICE_ARCH stm32
53 
58 #include "hwa_errors.h" /* Family specific error messages */
59 
60 
61 /* Keywords for stm32
62  */
63 #define _hw_is_48MHzdiv_48MHzdiv , 1
64 #define _hw_is_compare_flag_compare_flag , 1
65 #define _hw_is_sysclkdiv_sysclkdiv , 1
66 #define _hw_is__isr__isr , 1
67 
68 
69 #define hw__irq_flag , _hw_irqf
70 #define _hw_irqf(o,m,f,x) HW_CODG(HW_COD(HW_A0 o),f)
71 
72 #define hw__irq_mask , _hw_irqm
73 #define _hw_irqm(o,m,f,x) HW_CODG(HW_COD(HW_A0 o),m)
74 
75 
76 #define HW_ISR(...) _HW_ISR01(__VA_ARGS__,,,,)
77 #define _HW_ISR01(o,r,...) _HW_ISR02(_hw_isr_##o##_##r,o,r,__VA_ARGS__)
78 #define _HW_ISR02(x,...) HW_BW(_HW_ISR1,_isr,x)(x,__VA_ARGS__)
79 #define _HW_ISR10(x,o,r,...) HW_E(HW_EM_ISR(o r)) void HW_G2(hw,__COUNTER__)()
80 #define _HW_ISR11(c,n,esr,o,x,...) void esr() HW_ISR_ATTRIBUTES; HW_EOL(__VA_ARGS__) void esr()
81 
82 
83 #if !defined __ASSEMBLER__
84 typedef signed int int8_t __attribute__((__mode__(__QI__)));
85 typedef unsigned int uint8_t __attribute__((__mode__(__QI__)));
86 typedef signed int int16_t __attribute__ ((__mode__ (__HI__)));
87 typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__)));
88 typedef signed int int32_t __attribute__ ((__mode__ (__SI__)));
89 typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__)));
90 typedef int32_t intptr_t;
91 typedef uint32_t uintptr_t;
92 #endif
93 
94 #include "../../hwa/hwa_1.h"
hwa_errors.h