| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Get conversion functions written and fix up a few warnings
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This just adds the driver, it doesn't hook it up yet
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
We no longer need to wrap these functions
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
GCC can emit a warning when programs redefine 'main'.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the button bounces between the triggering interrupt and the button
state check, we could lose the final state change of the button and
send an incorrect event to the application. In the worst case, the button
would end up in exactly the wrong state, toggling in the wrong direction.
Use the fast timer to poll all buttons instead so that there is only
one check of each button at each poll interval (instead of the
interrupt and the state check). This makes buttons reliably debounced.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Use DATA bits to mark which sensors have failed, then report that in
beeps at startup time to help diagnose hardware failures while still
allowing the board to be used over USB.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Products that want to remain usable (over USB) after a sensor failure
don't want to panic when the ms5607 fails, but products with limited
ROM space don't want to have extra code to check for the sensor
failure and panic. Change the MS5607 driver to allow either option,
and then make the micropeak based devices use it.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
MicroPeak v2 now has config stuff where these values get shown
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This lets AltosUI handle the eeprom data
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
MicroPeak v2.0 has tasking support, but doesn't have a separate ms5607
task. That means the device isn't getting initialized when not running
the flight code, so in cmd mode we need to make sure it's initialized,
and we also need to actually fetch a value to display.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This adds the pin definitions and all of the code except for the
ads131a04 driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This just captures temp data continuously; it takes 100ms to get the
temp data from the sensor, so the maximum rate is around 10 samples/sec.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver uses a timer connected to a DMA engine to measure pulse
widths from the chip. We get 11 pulses for 4 channels; the first pulse
is caused by the timer starting up, the next two are the marker pulse
and then 8 more indicating the end of the high and low periods for
each channel.
The driver API returns the 8 pulse widths; the caller is expected to
know what to do with those values as using them requires knowing the
value of the configuration resistor and the characteristics of the
thermistors.
The test code assumes a 1k configuration resistor, using that it computes
the resistance of the four thermistors.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
|
| |
this code
The generic LED code needs a generic type for the GPIO port.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Working towards supporting -Wmissing-prototypes
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
| |
The data sheet says this is unreliable, and that we should be using an
FFT anyways.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Set the self test period to that suggested in the documentation.
Eliminate some debug variables.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Includes self-test code and multi-byte mode operation for reading
sample registers.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
We don't have TRUE and FALSE anymore (they were pdclib specific).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This driver uses the generic GPIO functions and allows per-LED port
and pin configuration. It supports up to 32 LEDs.
Rename SoC-specific LED drivers.
Remove enabled parameter to ao_led_init
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This was used with the 8051 bit-addressing mode to provide
single-instruction access to GPIO pins.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Don't use a global variable to hold the result.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Now that we don't support 8051, we don't need these
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
It's a long.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Use FALSE and TRUE in ms5607.c driver instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Use some code constructs that make the little AVR processor happier
and save about 16 bytes of memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This isn't used; was probably included for debugging at some point.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This avoids having the state appear to change the first time we look
at the device.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
The lco common code doesn't need to share its internal values with the
world; make most of them static.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Don't use ao_lco_show as that has other logic too.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Use lower level functions to control the display more directly
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Lots of code motion; shouldn't have any functional changes.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Missed drag race pad toggling in ao_lco_v2.c
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Move common code out of ao_lco.c and ao_lco_v2.c into a shared file,
ao_lco_bits.c. Update ao_lco.h to include shared functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
It sets the LEDs, so it's best to not start doing that until we've
tested them.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Allow validation of all LED connections.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
instead of uint8_t
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Track state of encoder better and only bump values when the full
motion is detected (all four states).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Just like telelco v2
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This command conflicts with the 'debug' command in these devices and
so wasn't usable anyways.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
This requires that each pad device specify the ADC reference voltage
and all relevant voltage divider resistor values explicitly so that
the ADC values can be converted to decivolts and compared with one
another. This should be easier to understand in the future when
reading the code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|