paparazzi/paparazzi — pull request #579 by podhrmic (2013-11-05 21:46:25+00:00)
Title: [adc] ADC driver

- added ChibiOS ADC driver for Lisa M 2.0/Lia 1.1 (STM32F105)
- on_chip temperature sensor used for diagnostics
- guard block around adc.h changed (chibiOS uses same header file - adc.h)
- added debug options into chconf.h (slows down CPU, but helps with development)

Note:
The ADC driver in ChibiOS uses sequential read only, currently no injected channels.
Lia boards have 4 ADC channels, we are reading all of them continously (circular buffer read),
in the callback the measured values are pushed into the appropriate adc_buf struct (see electrical.c)

Since the conversion runs in the background, it has zero effect on CPU.

Currenly tested only on Lia board, in ChibiOS only ADC1 is defined. Todo is to make driver more general
(i.e. N ADC banks, M channels for each bank).