summaryrefslogtreecommitdiff
path: root/src/kernel
Commit message (Collapse)AuthorAge
* altos: Rename 'log' in ao_log_fireone to 'ao_fireone_data'Keith Packard2019-09-23
| | | | | | Avoids conflict with global 'log' function Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Integrate BMX160 into data codeKeith Packard2019-09-16
| | | | | | Get conversion functions written and fix up a few warnings Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add bmx160 driverKeith Packard2019-09-16
| | | | | | This just adds the driver, it doesn't hook it up yet Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Replace ao_xmem functions with direct mem callsKeith Packard2019-09-15
| | | | | | We no longer need to wrap these functions Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Record all failed sensors and report status at power upKeith Packard2019-07-16
| | | | | | | | 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>
* altos/stmf0: Add 'ao_serial_shutdown'Keith Packard2019-07-16
| | | | | | This powers down the UART logic on request. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow ms5607 driver to either set ao_sensor_errors or panicKeith Packard2019-07-15
| | | | | | | | | | 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>
* altos/micropeak-v2.0: expose log and config commands over USBKeith Packard2019-06-18
| | | | | | This lets AltosUI handle the eeprom data Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Directly compute radio tuning values from frequencyKeith Packard2019-05-03
| | | | | | | | | | | | The 8051 compiler doesn't support 64-bit ints, so the old code used an iterative method in 32-bit values. That could take a long time when the frequency was mis-entered in Hz or MHz instead of kHz. This direct-computation uses 64-bit ints, but takes a fixed amount of time for any inputs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add preliminary TeleStatic v3.0 codeKeith Packard2019-04-21
| | | | | | | This adds the pin definitions and all of the code except for the ads131a04 driver. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add MAX6691 and ADS131A0X data to ring if presentKeith Packard2019-04-21
| | | | | | | Add these two devices as potential data sources to be added into the ring if available. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use ao_data_accel_invert when changing orientation valueKeith Packard2019-04-18
| | | | | | | | Instead of using AO_ACCEL_INVERT, use the macro which flips the values around. This fixes a bug with ADXL375 flight computers (EasyMega v2.0) where the accel cal values would be scrambled when changing orientation. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ARM ABI requires 8-byte aligned stackKeith Packard2019-03-18
| | | | | | This makes doubles on the stack (as for var-args functions) work Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: add ao_time_ns APIKeith Packard2019-02-25
| | | | | | | This provides nano-second resolution times by reading the systick value (which runs at 250ns ticks on stm). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Change default time type to 32-bitsKeith Packard2019-02-25
| | | | | | | Offers additional range for internal use without increasing cost on 32-bit platforms. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix several mis-specified time typesKeith Packard2019-02-25
| | | | | | Make sure AO_TICK_TYPE is used "everywhere", instead of uint16_t or other. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: first cut at ADS124S0X driver interrupt handlingBdale Garbee2019-02-24
|
* altos: Remove AO_LOG_STATE from ao_log_telefiretwoKeith Packard2019-02-18
| | | | | | | | | | Telefiretwo never changes flight state, so these packets weren't going to be written. Also stop passing &log to ao_log_firetwo -- it always got the global anyways, just use it directly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add -Wshadow to CFLAGSKeith Packard2019-02-18
| | | | | | And fix up the related messages. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Declare task stack as union of uint8_t and uint32_tKeith Packard2019-02-18
| | | | | | | Support -Wcast-align and -Wpointer-arith while still allowing architectures to pick whether they want an 8-bit or 32-bit stack. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Stop doing pointer arith on void *Keith Packard2019-02-18
| | | | | | Switch to uint8_t * instead. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Declare all public functions in header filesKeith Packard2019-02-18
| | | | | | | Including interrupt vectors to catch mis-spellings. Working toward supporting -Wmissing-prototypes Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Mark local functions 'static'Keith Packard2019-02-18
| | | | | | Working towards supporting -Wmissing-prototypes Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: add initial support for TeleFireOne v2.0Bdale Garbee2019-02-17
|
* altos: Make HAS_ACCEL_DEBUG build againKeith Packard2018-12-30
| | | | | | Need to not use ao_error_h_sq_avg without HAS_ACCEL Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/easymega-v2.0: Handle different mpu9250 orientationKeith Packard2018-10-20
| | | | | | | The mpu9250 on EasyMega v2.0 is rotated 90° compared with EasyMega v1 and TeleMega IMU devices. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add ADXL375 driver [v2]Keith Packard2018-10-19
| | | | | | | Includes self-test code and multi-byte mode operation for reading sample registers. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Create ao_data_fill shared functionKeith Packard2018-10-19
| | | | | | | This fills a data ring entry with all of the current sensor values other than the ADC. It is used in all of the adc completion functions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up AO_ROMCONFIG bitsKeith Packard2018-10-13
| | | | | | | Remove address parameter (doesn't work with gcc), create shared ao_romconfig in kernel. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm32f4: Align stack to 8 bytesKeith Packard2018-10-13
| | | | | | This makes sure that doubles are aligned properly when passed on the stack. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add generic LED driver.Keith Packard2018-10-13
| | | | | | | | | | | 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>
* altos: Eliminate 'pin' field from GPIO functionsKeith Packard2018-10-13
| | | | | | | 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>
* altos: Remove 8051-ism from ao_usb.hKeith Packard2018-10-13
| | | | | | __at doesn't exist for non-8051 Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Delete random 8051 ISR declarationsKeith Packard2018-10-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow application-specific prompts for ao_cmd_readlineKeith Packard2018-10-13
| | | | | | Lets other readline users specify alternate prompts. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use stdbool true/false instead of TRUE/FALSEKeith Packard2018-10-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make cmd number parsing functions return valueKeith Packard2018-10-13
| | | | | | Don't use a global variable to hold the result. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove 8051 address space specifiersKeith Packard2018-10-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove *_TO_DATA macrosKeith Packard2018-10-13
| | | | | | Now that we don't support 8051, we don't need these Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch to newlib-nano for libc on armKeith Packard2018-10-13
| | | | | | Stop using pdclib Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Force telemetry rate to 38400 when ao_force_freq is setKeith Packard2018-10-04
| | | | | | | | ao_force_freq is used by TeleMini to set the radio to known values. As TeleMini v3.0 also has configurable telemetry rates, this value also needs to be set back to a known value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch global 'log' to 'ao_log_data'Keith Packard2018-08-15
| | | | | | Avoid conflicts with 'log' math function. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove spurious 'const' from ao_state_namesKeith Packard2018-08-15
| | | | | | Current gcc complains about this. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add separate 'ao_launch_tick'. Use in pyro and lockout.Keith Packard2018-08-05
| | | | | | | | | | | | | | | | Prior to this, there was only ao_boost_tick, which got reset at each motor burn start. That meant there wasn't any way to measure total flight time for pyro channels and 'apogee lockout' was based on time since most recent motor start instead of total flight time. Now pyro channels and apogee lockout both use total flight time, while motor burn length still uses time since most recent motor burn start (as it should). Docs and UI updated to use 'launch' instead of 'boost' to try and make the change clear. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Change 'after motor' pyro check to be >= instead of ==Keith Packard2018-08-05
| | | | | | This makes after motor stay valid even if further motors burn. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Compute and show height error tracker in ao_flight_testKeith Packard2018-07-02
| | | | | | | Enable the computation of ao_error_h_sq_avg in ao_flight_test even when an accelerometer is present to allow review of that data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Eliminate height requirement for coast detectKeith Packard2018-05-07
| | | | | | | | | | | We had required a minimum altitude of 100m to transition from boost to coast. With small motors in a heavy multi-staged rocket, this can fail to detect coast in time to light the second motor. Also, this would fail to deploy recovery systems if the flight failed before reaching 100m. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/chaoskey-v1.0: Add endpoint for reading flash contentsKeith Packard2018-05-07
| | | | | | | This creates another IN endpoint which provides the contents of flash for validation of the firmware load on the host. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/kernel: Add USB descriptors for IN3Keith Packard2018-05-07
| | | | | | | This adds the necessary descriptor information to support another IN endpoint for applications. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/kernel: Define usb IN2/IN3 functionsKeith Packard2018-05-07
| | | | | | | These are putchar and flush functions that are used when sending data to the additional IN2 and IN3 endpoints. Signed-off-by: Keith Packard <keithp@keithp.com>