diff options
| author | J08nY | 2019-11-21 19:10:50 +0100 |
|---|---|---|
| committer | J08nY | 2019-11-21 19:10:50 +0100 |
| commit | c8d0bff46001bd5636825c5b0bb4c896cb34a4e6 (patch) | |
| tree | 2b3029c6ca37e56e86daa34069ab39da3b1a5400 /pyecsca/codegen/hal/hal.h | |
| download | pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.tar.gz pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.tar.zst pyecsca-codegen-c8d0bff46001bd5636825c5b0bb4c896cb34a4e6.zip | |
Initialize.
Diffstat (limited to 'pyecsca/codegen/hal/hal.h')
| -rw-r--r-- | pyecsca/codegen/hal/hal.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pyecsca/codegen/hal/hal.h b/pyecsca/codegen/hal/hal.h new file mode 100644 index 0000000..831276f --- /dev/null +++ b/pyecsca/codegen/hal/hal.h @@ -0,0 +1,50 @@ +/* + This file was taken from the ChipWhisperer Example Target base. + Copyright (C) 2012-2015 NewAE Technology Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef HAL_H_ +#define HAL_H_ + +void platform_init(void); + +#define HAL_xmega 1 +#define HAL_stm32f0 2 +#define HAL_stm32f3 3 + +#if HAL == HAL_xmega + #include <avr/io.h> + #include <util/delay.h> + #include "xmega/xmega_hal.h" + #include "xmega/avr_compiler.h" +#elif HAL == HAL_stm32f0 + #include "stm32f0/stm32f0_hal.h" +#elif HAL == HAL_stm32f3 + #include "stm32f3/stm32f3_hal.h" +#else + #error "Unsupported HAL Type" +#endif + +#ifndef led_error +#define led_error(a) +#endif + +#ifndef led_ok +#define led_ok(a) +#endif + + +#endif //HAL_H_ |
