19 Commits

Author SHA1 Message Date
Karl Palsson
c9c5cb7c9c style: fix some of the easier style bugs
No real changes.
2017-03-30 21:48:07 +00:00
Karl Palsson
23cf491501 stm32: adc-v2: extract common calibration code
Extract the calibration code from the f0, and share it with the other
adc-v2 peripheral users (f0,l0,f3,l4)

Uses the same naming set of is/async naming conventions requested by the
RTOS guys instead of having blocking only calls.

Old code:
	adc_calibrate_start(ADC);
	adc_calibrate_wait_finish(ADC);

New code (blocking):
	adc_calibrate(ADC);

New code (asynch):
	adc_calibrate_async(ADC);
	// do stuff
	adc_is_calibrating(ADC);  // will be false when it's finished.

Old code for f0 is still available, but marked deprecated.
2016-09-12 23:29:12 +00:00
Karl Palsson
81319a96fb stm32: adc-v2: pull up start_regular
Little steps are easy to review, and easy to test.
2016-03-30 16:59:56 +00:00
Karl Palsson
8b7a5ce7aa stm32: adc-v2: pull up function prototypes
These are standard "api" level functions that need per target implementations,
but should all maintain the same signature.
2016-03-30 16:59:56 +00:00
Karl Palsson
5063ea0db7 stm32: adc-v2: pull up overrun and EOC flag methods
EOS vs EOSEQ is really a single/multi variant difference, so leave it out.
2016-03-30 16:59:56 +00:00
Karl Palsson
b2af9e632c stm32: adc-v2: Pull up more common basic functionality
Pull up eoc/eos/read_regular functions.  More simple, basic core functionality.
2016-03-30 16:59:56 +00:00
Karl Palsson
f1d50d24be stm32: adc-v2: pull up more common functionality
More easy bit on/off settings.  Every piece that gets pulled up here becomes
automatically available for l0/l4 when they land
2016-03-30 16:59:56 +00:00
Karl Palsson
f67e217ffb stm32: adc-v2: Pull up the two forms of the adc-v2
The adc v2 periph has the same register map, but comes in two flavours, one
supporting injected channels, more watchdogs, per channel sampling times and
so on, and one "simple" version.

Pull up the f3 and f0 portions into the appropriate files, after comparing with
L0 and L4 reference manuals, even if those are not fully landed yet.
2016-03-30 16:59:56 +00:00
Karl Palsson
4c550648c3 stm32: adc-v2: pull up common register definitions 2016-03-30 16:59:56 +00:00
Karl Palsson
1d090c840f stm32: adc-v2: pull up temp/vref switches
Common for f0,f3,l0,l4
2016-03-30 16:59:55 +00:00
Karl Palsson
7231b9a691 stm32: adc-v2: pull up single/continuous modes 2016-03-30 16:59:55 +00:00
Karl Palsson
a89cd86454 stm32f0/f3: adc: extract beginnings of common v2 periph
The f0, f30x and l0 have a very similar "v2" adc peripheral.
Start extracting out some of the common code, and fix the glaring bug in
adc_power_down that was affecting them both.

This is not intended to be a fully comprehensive extraction, just the first
easy steps.
2016-03-30 16:59:55 +00:00
Karl Palsson
a22d6a8315 stm32: adc: standardize special channel names
At least temp sensor, vrefint and vbat/vlcd should have consistent names and
consistent doxygen.
Dropped channel definitions that are the same as the raw number.
2016-03-30 16:59:55 +00:00
Karl Palsson
2e25d678ba Surround all macro parameters with ()
Followup from c72f3d588a637101262d5e2b276dc6cc5d926a6d
2015-10-15 01:03:18 +00:00
Ken Sarkies
7816501dbc Changes to the header includes for all STM32 peripherals
to remove variations, redundancies, add missing, fix errors. All c files
refer only to the dispatch style headers in /include/stm32. Those headers
#include memorymap.h and cm3/common.h. All references to
these are removed from the family specific headers. Ethernet untouched as
it appears incomplete.

Added dummy spi.c for F0/F3. Fix some doxygen anomalies.
2014-03-11 16:40:31 +00:00
BuFran
e19270b3bf [STM32F0:ADC] Add supporting functions to the module 2013-08-22 17:18:42 -07:00
BuFran
81982916e2 [Doxygen] Add complete documentation page to STM32F0 2013-08-22 17:18:42 -07:00
BuFran
4ff19fa2b4 [Style] Unified commenting style on F0 2013-08-22 17:18:41 -07:00
BuFran
a073758cb4 [STM32F0:ADC] Add register definitions 2013-08-22 17:18:39 -07:00