2014-04-13 22:10:01 -07:00
|
|
|
/*
|
2017-09-04 12:12:43 -07:00
|
|
|
Copyright 2012-2017 Benjamin Vedder benjamin@vedder.se
|
2014-04-13 22:10:01 -07:00
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* hw.h
|
|
|
|
*
|
|
|
|
* Created on: 12 apr 2014
|
|
|
|
* Author: benjamin
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HW_H_
|
|
|
|
#define HW_H_
|
|
|
|
|
2014-04-14 14:02:45 -07:00
|
|
|
#include "conf_general.h"
|
2015-10-08 14:09:39 -07:00
|
|
|
#include "stm32f4xx_conf.h"
|
2014-04-14 14:02:45 -07:00
|
|
|
|
|
|
|
#ifdef HW_VERSION_40
|
|
|
|
#include "hw_40.h"
|
2014-10-19 10:31:06 -07:00
|
|
|
#elif defined HW_VERSION_45
|
|
|
|
#include "hw_45.h"
|
2014-11-23 11:29:36 -08:00
|
|
|
#elif defined HW_VERSION_46
|
|
|
|
#include "hw_46.h"
|
2015-09-17 14:24:55 -07:00
|
|
|
#elif defined HW_VERSION_48
|
|
|
|
#include "hw_48.h"
|
2015-10-03 16:43:26 -07:00
|
|
|
#elif defined HW_VERSION_49
|
|
|
|
#include "hw_49.h"
|
2015-10-04 11:52:36 -07:00
|
|
|
#elif defined HW_VERSION_410
|
|
|
|
#include "hw_410.h"
|
2016-06-27 08:29:09 -07:00
|
|
|
#elif defined HW_VERSION_60
|
|
|
|
#include "hw_60.h"
|
2014-04-14 14:02:45 -07:00
|
|
|
#elif defined HW_VERSION_R2
|
|
|
|
#include "hw_r2.h"
|
2014-10-25 12:13:16 -07:00
|
|
|
#elif defined HW_VERSION_VICTOR_R1A
|
|
|
|
#include "hw_victor_r1a.h"
|
2016-11-04 07:18:34 -07:00
|
|
|
#elif defined HW_VERSION_DAS_RS
|
|
|
|
#include "hw_das_rs.h"
|
2017-09-04 12:12:43 -07:00
|
|
|
#elif defined HW_VERSION_PALTA
|
|
|
|
#include "hw_palta.h"
|
|
|
|
#elif defined HW_VERSION_RH
|
|
|
|
#include "hw_rh.h"
|
2017-10-27 12:29:12 -07:00
|
|
|
#elif defined HW_VERSION_TP
|
|
|
|
#include "hw_tp.h"
|
2018-03-24 14:32:58 -07:00
|
|
|
#elif defined HW_VERSION_75_300
|
|
|
|
#include "hw_75_300.h"
|
2014-06-28 08:21:51 -07:00
|
|
|
#else
|
|
|
|
#error "No hardware version defined"
|
2014-04-14 14:02:45 -07:00
|
|
|
#endif
|
|
|
|
|
2014-04-13 22:10:01 -07:00
|
|
|
// Functions
|
|
|
|
void hw_init_gpio(void);
|
|
|
|
void hw_setup_adc_channels(void);
|
2014-10-19 10:31:06 -07:00
|
|
|
void hw_start_i2c(void);
|
|
|
|
void hw_stop_i2c(void);
|
2014-11-23 11:29:36 -08:00
|
|
|
void hw_try_restore_i2c(void);
|
2014-04-13 22:10:01 -07:00
|
|
|
|
|
|
|
#endif /* HW_H_ */
|