]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/include/drv/_tms570_hydctr/port_def.h
cc400b6972efb7b7f251b22e2ada61d7ac410f95
[pes-rpp/rpp-lib.git] / rpp / include / drv / _tms570_hydctr / port_def.h
1 /*
2  * Copyright (C) 2015 Czech Technical University in Prague
3  *
4  * Authors:
5  *     - Michal Sojka <sojkam1@fel.cvut.cz>
6  *
7  * This document contains proprietary information belonging to Czech
8  * Technical University in Prague. Passing on and copying of this
9  * document, and communication of its contents is not permitted
10  * without prior written authorization.
11  *
12  */
13
14 #ifndef DRV_TGT_PORT_DEF_H
15 #define DRV_TGT_PORT_DEF_H
16
17 #include <stdint.h>
18
19 /* Port names */
20 enum port_id {
21         PORT_ID_GIOA,
22         PORT_ID_GIOB,
23         PORT_ID_NHET1,
24         PORT_ID_ADC,
25
26         _PORT_COUNT,
27 };
28
29 #define PORT_ADC_CHANNELS 16
30
31 static double port_adc_lsb2volts(uint16_t lsb)
32 {
33         return ((double)lsb + 0.0)*2.5/4095*2;
34 }
35
36 #endif