* move f4 config files
* don't need this
* f7
* f7
* h7
* this was duplicated
* turn off smart build
* loader too
* update prometheus paths
* bootloader should include confdir
* fix the flash size while we're at it
* move chconf_common
* use wait
* normalize board.mk
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* remove EFI_ADC_TEMP_SENSOR
* implement
* comment
* s
* switch adc_inputs over
* header
* s
* I think aligned-on-stack should work ok
* num channels
* cache safety
* move adc init too
* don't compile that file for the h7
* cypress & kinetis
* ports
* guard against bootloader
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* set mcu type in hw_ports
* move f4 linker script
* move f7 linker script
* don't set default linker file in makefiles
* extra line
* prometheus actually didn't depend on anything special for f469
* dead line
* h7
* dead
* move board.c
* set explicit cpu type for simulator
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
* set mcu type in hw_ports
* move f4 linker script
* move f7 linker script
* don't set default linker file in makefiles
* extra line
* prometheus actually didn't depend on anything special for f469
* dead line
* h7
* dead
* ChibiOS: add support for STM32F765
This chip is used on Subaru EG33 p'n'p RusEFI board from Dron_Gus
* drivers: gpio: mc33810: commulative update
- use BIT macro
- fix wake-up method
- fix order of arguments in _add function
* port: stm32f4/7: detectCanDevice check for enabled interfaces only
* ADC: fix internal array size
internalAdcIndexByHardwareIndex should be EFI_ADC_LAST_CHANNEL size
couse adc_channel_e is used as index
* status LEDs: support status LEDs that driven by low level
* Proper way to add lis302 driver
* Proper way to add license directory to includes
* Makefile: simplify
All ChibiOS stuff is accumulated in ALLCSRC, ALLINC and so on.
* board.mk: append sources and includes to ALLSRC, ALLCPPSRC, ALLINC
* Cypress: fix CANv2 includence into build
* LCD: check if settings are valid on each access
* Lada Kalina: remove duplicate code
All LCD pins are set to GPIO_UNASSIGNED in disableLCD()
* Remove duplicate code
* We still need to know when invalid gpio is used...
This reverts commit c17775231a.
* gpios: isBrainPinValid helper
* LCD HD44780: do not touch pins if DM_NONE or invalid gpio
* Fix isEnabled checks for GPS and Joystick
* LCD HD44780: writePad use this method wider
* 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
* fix unregister api for gpio
* consumers
* guard with a critical section
* index
* guard less
* unregister under lock
* fix reinit
* dead flag
* fix most tests
* initialize properly
* initialize properly
* assertions in tests
* fix message
* move gpio mocking
* test gpios
* we must lock earlier to be truly safe
* this was using huge memory
* devirtualize
* test deinit
* fix unregister api for gpio
* consumers
* guard with a critical section
* index
* guard less
* unregister under lock
* fix reinit
* dead flag
* fix most tests
* initialize properly
* initialize properly
* assertions in tests
* fix message
* we must lock earlier to be truly safe
* this was using huge memory
* devirtualize
* We still need consoleEventListener for boards with EFI_CONSOLE_SERIAL_DEVICE
* MC33810: add MC_ prefix for command defines
As CMD_PWM define is now used by console command
Bug was introduced in 2312b0ae57 when
sample buffer was moved out of class. So sample become adcsample_t*
instead of adcsample_t[] and sizeof returns 4.
* ADC: fixes:
-use enums
-internalAdcIndexByHardwareIndex array should be adc_channel_e size
-add sanity checks
-save few bytes of RAM
* ADC: use logical OR instead of math add
* testable launch start
* extract base class
* add a test
* fix ts debug
* Launch control unit_tests
updated launch control for a better split
VSS mock for unit tests
Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
* switch to CriticalSectionLocker
* that's just about all
* clean up last usage
* include hpp for sim
* need the cpp wrappers in the makefile too
* include dir
* include
* restructure
* guard c++
* idle too
* status_loop.h
* consolidate definitions
* use 1/0 instead, check for existence
* missed a few
* dead define
* defs for bootloader
* TLE8888: add support MR switching from SW
Main Relay has limitation - it is always active while KEY=1. When
KEY=0 MR can be switched on from SW.
* TLE8888: support reading of KEY and WAKE inputs
* Rusefi enums: add new TLE8888 pins
* smart gpio: fix tle8888 direct pin mapping for MRE
* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888
* TLE8888: cleanup
* TLE8888: do not reset driver private data on WD/undervoltage reset
* TLE8888: diagnostic updates
* TLE8888 driver: BIG driver rework
* TLE8888: check SPI answers for abnormal states
Reply with other than requested register can be a sign of:
-Power-On-Reset, then OpStat0 will be replyed
-WatchDog reset, then FWDStat1 will be replyed
-Invalid communication frame, then Diag0 will be replyed
Keep tracking last accessed register and check with the next reply.
* TLE8888: debug clean-up
* TLE8888: implement spi array write
This reduce CS inactive state time between two consequent accesses
from 8.8 uS to 1.4 uS
* TLE8888: fix PP outputs in OD mode
* TLE8888: cleanup register definitions
* TLE8888: run separate driver thread for each chip instance
Calculating poll interval for few chips become more complex, avoid
this running thread for each device.
* TLE8888: fix cypress and kinetic compilation
Both platforms define its own MAX and cause redifination error if
common.h is included in driver.
* MRE: update mapping.yaml and fix direct pin mapping for TLE8888
* TLE8888: diagnnostic: disable switch off in case of overcurrent
For all output, use current limiting instead
* TLE8888: check for overvoltage on OUT8..OUT13
* TLE8888: add TODO note about how to recover from failure condition
Currently TLE8888 automaticly recovers only from overcurrent and
(may be) overtemperature conditions.
Short to bat cause output disable (bit in OECONFIG is reset) and
needs driver/host intervention.
* TLE8888: save few bytes of RAM
* TLE8888: Lada Kalina is test mule for IDLE stepper on TLE8888
Don't forget to enable PP mode for TLE8888 outputs 21..24:
uncomment line 1087 in tle8888.c
* TLE8888: reorder code, cleanup
* TLE8888: mode all debug/statisctic to per-chip struct
* TLE8888: rework poll interval calculation
* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888 #2
* add
* remove old
* remove more old
* makefile
* fix init
* patch up other stuff
* actually fix it this time
* raw output channels
* gauges, UI
* scaled channel
* fix field ordering
* avoid 64b on hot path
* no tooth log when fast
* use crit section locker
* final
* only flip pins if not also self stim
* only trace if doing work
* slightly drop lateDelay
* trace if not bailing out
* remove listener array
* avoid 64b on hot path
* no tooth log when fast
* use crit section locker
* final
* only flip pins if not also self stim
* only trace if doing work
* slightly drop lateDelay
* trace if not bailing out
* change acSwitch name, add mode
* fix
* remove some adc stuff
* remove some adc stuff
* semicolon stupid
* left behind
* add readpinstate
* wrong var name
* add functions back
* fix name
* bool, not void, plus fix name
* move
* not sure what I broke
* try setMockValue
* namespace
* whoops missed one
* switch values because adc was set up for pullup
* try 5
* comment for now
* comment for now
* uncomment tests, add function to mock, add mock to efiReadPin
* fixes
* for F's sake
* if
* add defy
* pass params
* use ASSERT_TRUE/FALSE
* advance time
* remove ifdef from readPin
* try moving if
* move to separate func
* move extern
* move include
* try engine_test_helper
* am confuse
* move func to else
* include hal
* add efi prod check
* remove include
* try extern
* move include
* semicolon stupid
* move extern again
* include
* move mockPinStates
* size
* add if
* add comment
* clean on instantiation
* 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
* add linked list
* macros, and use in buttonshift
* unit_tests macros
* add extern
* add parens
* move extern
* move extern
* move buttonDebounceListHead
* move buttonDebouncePointerHead
* merge gore
* undo
* reduce unused size
* don't store pointer if already initialized
* few changes
* remove oldPin
* fix merge conflict
* merge in changes commited to wrong branch
* fix definition
* out of class?
* brute force programming
* fix few problemos
* am confuse
* am confuse
* am confuse
* am confuse
* oldPin snuck in
* move to public?
* define again
* try constexpr
* def in cpp
* remove constexpr
* fix def
* fix?
* update active
* fix a few things
* ADC: remove ADC_TwoSamplingDelay*
1. it is related to double or triple interlived mode only
2. it should be writen to CCR register, not CR1
* ADC: use designated initializers
* mc33 flash check
* DI sanity checks for setting HV config
* mc33816 microcodee source code update for what we got running on the r0.4 board w/ pt2001
Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
* s
* science
* set pin mode
* turn stuff off so it fits
* filtering maybe
* filtering actually works
* generate filter parameters internally
* shorter window
* guard behind enable flag
* use checked in filter
* add biquad reset
* tracing
* const
* exec order
* do it from a thread
* smaller buffer, comment
* configure with header
* only for proteus
* oops
* unused
* not needed
* guards
* pin config
* don't need that include
* precook filter steady state
* define sample rate
* config enable switch
* 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>