X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftc520.h;fp=bertos%2Fdrv%2Ftc520.h;h=c36238f7a63d4c9c8792f470a766768da657ba54;hb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;hp=0000000000000000000000000000000000000000;hpb=faf2f6bfd5933ff75e6cc01e3d48f9277f731d8f;p=bertos.git diff --git a/bertos/drv/tc520.h b/bertos/drv/tc520.h new file mode 100644 index 00000000..c36238f7 --- /dev/null +++ b/bertos/drv/tc520.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \version $Id$ + * + * \brief TC520 ADC driver (intercace) + * + * \version $Id$ + * \author Francesco Sacchi + * \author Marco Benelli + */ + +#ifndef DRV_TC520_H +#define DRV_TC520_H + +#include +#include + +typedef uint32_t tc520_data_t; + +/* 17 bit max value */ +#define TC520_MAX_VALUE 0x1FFFFUL + +tc520_data_t tc520_read(void); +void tc520_init(Serial *spi_port); + +#endif /* DRV_TC520_H */