X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-lib.git/blobdiff_plain/b780d6193082bb4a2aabe7bb47b53396ead91f1e..d209f139dfc55ab5989a71f9d2bf6bdf40237a78:/rpp/include/drv/_rm48_hdk/port_def.h diff --git a/rpp/include/drv/_rm48_hdk/port_def.h b/rpp/include/drv/_rm48_hdk/port_def.h index 9e68879..cc400b6 100644 --- a/rpp/include/drv/_rm48_hdk/port_def.h +++ b/rpp/include/drv/_rm48_hdk/port_def.h @@ -14,6 +14,8 @@ #ifndef DRV_TGT_PORT_DEF_H #define DRV_TGT_PORT_DEF_H +#include + /* Port names */ enum port_id { PORT_ID_GIOA, @@ -24,4 +26,11 @@ enum port_id { _PORT_COUNT, }; +#define PORT_ADC_CHANNELS 16 + +static double port_adc_lsb2volts(uint16_t lsb) +{ + return ((double)lsb + 0.0)*2.5/4095*2; +} + #endif