Phil Hord
21e5343552
Add config.h wrapper to simplify test automation
...
Test code which wants to customize config.h can do so without
touching config.h itself by wrapping config.h in a macro variable
which is passed in to the compiler. It defaults to "config.h" if
no override is provided.
This change would break makefile dependency checking since the selection
of a different header file on the command line is not noticed by make
as a build-trigger. To solve this, we add a layer to the BUILDDIR path
so build products are now specific to the USER_CONFIG choice if it is
not "config.h".
2014-03-04 19:56:23 +01:00
Markus Hitter
0c100fe5f8
According to avr-libc documentation, ISR() handles SREG its self.
2013-10-27 20:01:51 +01:00
Markus Hitter
59599a3552
analog.c: use atomic macros.
2013-10-27 20:01:51 +01:00
Markus Hitter
97a663a00c
analog.c: trim down analog values storage.
...
Saves 10 bytes RAM and 16 bytes binary size on an 1284P (8 ADC
channels) running two sensors. Should also be a bit faster, as one
loop runs fewer iterations.
Also, checking for NUM_TEMP_SENSORS was a mistake, as temp sensors
_not_ using an analog pin exist. Extreme case is, temp sensors
exist, but zero ADC channels are used.
2012-09-29 23:00:11 +02:00
Markus Hitter
bfad6f12cd
analog.c: put in a few lessons learned.
...
No functional change.
2012-09-29 22:58:25 +02:00
Mikko Sivulainen
bfe5e6f2fc
Fixed ADC channel handling.
...
ADC pin is not the same as ADC channel in atmega1280/2560.
2012-09-29 22:57:55 +02:00
Markus Hitter
7528037d4e
Save status register on each interrupt.
...
Costs 28 bytes binary size and two CPU cycles per interrupt,
at the advantage of getting rid of possible well hidden bugs.
2012-03-04 19:02:38 +01:00
Bas Laarhoven
9cc2bb9125
Also set DDR mask for upper 8 channels if using a 16-bit mux.
2011-08-19 17:47:32 +02:00
Bas Laarhoven
dfbaed16b9
Just added some comments.
2011-08-16 13:56:00 +02:00
Michael Moon
a262d72788
fix 'MUX5 not declared' compile error for chips that don't have A8-15
2011-06-22 11:23:19 +10:00
Michael Moon
2013effd9c
allow larger chips to use analog channels 8-15
2011-06-18 13:28:47 +10:00
Markus Amsler
e937b052af
Add support for multiple thermistor tables.
...
DEFINE_TEMP_SENSOR takes one additional argument. For TT_THERMISOR you can specify there which thermistor table to use.
2011-04-12 20:00:18 +02:00
Michael Moon
0dc7d77885
Massive Doxygen documentation addition
...
'make doc' then point your browser at doc/html/
Needs plenty of cleanup and polishing, but the main bulk is here
even documents your configuration! ;)
2011-03-22 01:34:36 +11:00
Stephan Walter
eecf3af9f1
analog mask calculated automagically
2011-02-21 13:57:51 +11:00
Markus Amsler
bcd47e90b0
Fix analog reading of channel 0 if another channel is active.
2011-02-15 13:21:45 +11:00
Michael Moon
b5299c4d69
protect ANALOG_MASK from arithmetic errors via de-macro-isation
2011-02-07 20:47:32 +11:00
madscifi
a98886d236
Correctly set AIO_DDR register
...
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
2011-01-24 11:32:00 +11:00
Michael Moon
096d7dfdf3
Merge release-candidate-triffid branch
2011-01-07 23:09:13 +11:00
Michael Moon
4b41a5eeab
use avr-libc atomic stuff instead of manual SREG manipulation
2010-10-21 11:05:56 +11:00
Michael Moon
97c5218304
reduce analog subsystem use of interrupts
2010-10-20 17:54:36 +11:00
dps.lwk
d83c80e383
Added ATmega1280 pin map for Arduino Mega
2010-10-10 13:51:00 +01:00
Michael Moon
e78381c56d
Move configuration to config.h.dist
2010-09-27 09:20:07 +10:00
Michael Moon
d56ff39cb3
atomic 16-bit operation in analog.c
2010-09-16 21:42:00 +10:00
Michael Moon
b80c5ea7b5
UNTESTED support for thermistor and AD595
2010-09-13 17:14:12 +10:00
Michael Moon
f2b6f536d7
more work on analog system, still untested
2010-09-12 13:31:41 +10:00
Michael Moon
16069d9ffb
added FIXME tag
2010-09-10 11:25:11 +10:00
Michael Moon
6a58efbfa4
try out analog stuff, probably needs more work
2010-08-24 15:49:21 +10:00
Michael Moon
488e42605b
skeleton of analog read subsystem
2010-08-16 14:06:37 +10:00