Commit Graph

21 Commits

Author SHA1 Message Date
Matthew Kennedy 4696848ad4 we often mean inline when we say static 2024-03-29 11:56:52 -04:00
Andrey Gusakov 4634a741c2 at32: at32_common: reuse some parts from STM32
This is temporally, some parts are quite different and need rework
2023-11-12 13:08:25 -06:00
rusefillc 1c49d77fff extra flexibility to facilitate ports 2023-05-31 23:36:30 -04:00
Andrey G a6ec708a6b
Support non-uniform dividers on ADC inputs (#4938)
* adc: support per-channel dividers

* S105: non-uniform analog dividers

* adc: default weak getAnalogInputDividerCoefficient() implementation

* adc: fix emulator compilation
2023-01-08 17:29:29 -05:00
rusefillc 6e71b72acc refactoring - reducing API between FW and Java 2022-09-11 02:16:47 -04:00
Andreika ada89312b5 hellen81 ADC trigger 2021-12-01 13:03:08 -05:00
Matthew Kennedy 31ffb0add4
Fast adc API (#3327)
* dead fast tps

* oooooh map avg on hh7

* adc v4 fast support

* new fast API

* hardware.cpp

* adc v2

* warning

* guard

* no check required

* stub cypress/kinetis

* kinetis and cypress stubs
2021-10-07 08:29:01 -04:00
Matthew Kennedy 25414ebdad
yet more pch (#3068)
* big pch energy

* put back ramdisk stub

* tests are happy

* h743 nucleo

* kinetis

* I love deleting code!

* make stepper happy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Matthew Kennedy f70c844c60
H7 ADC triggered by hardware timer (#3028)
* config

* allow changing adc speed

* timer triggered ADC

* ICU on nucleo

* turn that off too

* 10khz

* make those default for all h7

* I can't type
2021-07-23 14:50:35 -04:00
Matthew Kennedy 09192cfc4d
fast adc callback (#3031)
* fast adc callback

* guard

* missed one

* now cypress will be happy
2021-07-23 14:19:59 -04:00
rusefillc aee2ed4ba4 New hardware testing commands #2978 2021-07-17 13:42:10 -04:00
Andrey G 0f4de02223
ADC: internalIndex should be used as getAvgAdcValue argument (#2618)
* ADC: internalIndex should be used as getAvgAdcValue argument

-plus output messages re-formated

* ADC: logger -> efiPrintf
2021-05-03 16:44:19 -04:00
Matthew Kennedy 3072d54717
dead code, warnings (#2461) 2021-03-15 10:23:19 -04:00
Matthew Kennedy 96a14fd649
ADC cleanup, enable oversampling on H7 (#2437)
* cleanup v2 adc

* simplify

* oversample on h7

* output 16b result

* port-ify ADC_MAX_VALUE

* simplify include

* guard for cypress

* make sim/tests happy

* 16x oversample + comment

* this check is uesless

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-08 14:50:50 -05:00
Matthew Kennedy 39884f8934
use DECLARE_ENGINE_PTR for Engine class (#2365)
* engine cleanup

* do the cleanup

* one last spot

* expand_engine noop for firmware

* simulator
2021-02-16 16:58:54 -05:00
Andrey G b92e3086d0
Adc isAdcChannelValid helper (#2188)
* Guard define argument

* ADC: isAdcChannelValid

Check for both <= EFI_ADC_NONE and >= EFI_ADC_LAST_CHANNEL
Also check for value out of enum range (corrupted settings)

* Fix unit tests
2021-01-05 16:02:20 -05:00
rusefi 958538e5aa Hellen says merge #1772 adc.h 2020-09-12 04:03:11 -04:00
Andrey G 2312b0ae57
Adc improvements (#1765)
* ADC: move DMA buffer outside of AdcDevice (save few bytes)

* ADC: inlcude fast channels to debug output

* ADC: save some CPU ticks (disabled until fully tested)

* ADC: simplify
2020-09-08 17:20:55 -04:00
rusefi 938f40cbef more fixing build? 2020-08-21 22:07:55 -04:00
Matthew Kennedy 733008b9d0
Analog input filtering (#1680)
* improve biquad

* cleanup

* add filtering to subscriptions

* config sensors

* comment

* doesn't need to be that fast

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 19:47:12 -04:00
rusefi 8f4aecf7ca The Big Refactoring of 2019: folder structure #723 2020-08-02 20:46:40 -04:00