summaryrefslogtreecommitdiff
path: root/src/kernel
Commit message (Collapse)AuthorAge
...
* altos: Add debug check for irq block when editing task queuesKeith Packard2016-06-29
| | | | | | | List manipulation operations are not atomic, so interrupts need to be blocked while changing them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move comment in ao_sleep_for next to related codeKeith Packard2016-06-29
| | | | | | The comment got moved to the wrong place Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Block interrupts while waking tasks sleeping on timers.Keith Packard2016-06-29
| | | | | | | | Interrupts may not be blocked in the timer ISR, but they need to be while walking the pending timer list and moving tasks back to the run queue. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure AO_MMA655X_INVERT is declared where neededKeith Packard2016-05-02
| | | | | | | | Add #define AO_MMA655X_INVERT 0 to existing products which didn't declare it at all. This will make sure the value is set correctly for each new board. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm32l: Add support for software-driven HW flow controlKeith Packard2016-04-25
| | | | | | | | This allows applications to request that the flow control bits be driven from software rather than hardware, permitting more flexible pin configuration. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: avoid mixed declarations and code in ao_task.cKeith Packard2016-04-19
| | | | | | sdcc can't handle this. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelcotwo: Add idle timeoutKeith Packard2016-04-19
| | | | | | | | Puts TeleLCOTwo in a low power state (drawing about 80µA) after a timeout (default two minutes) to keep from killing the battery if the device is left turned on. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Support pad/lco boxes with fixed box numbersKeith Packard2016-04-19
| | | | | | | This allows for a configuration without adjustable box numbers on either end of the link, simplifying the UI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use mini logging for detherm, just without ADCKeith Packard2016-04-02
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add Detherm log format (easymini without ADC)Keith Packard2016-04-02
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow for flight hardware without any ADC valuesKeith Packard2016-04-02
| | | | | | | Detherm has no ADC connections, so we don't need to disable the ADC when going to landed state. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Validate current task SP in interrupt by looking at PSPKeith Packard2016-03-26
| | | | | | | | | We use a separate stack pointer for task code, which means we can verify that it is in range in any interrupt handler. This adds checks for the task stack (under #ifdef DEBUG) that run in ao_wakeup as well as at every timer interrupt. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Expose fast timer API from kernel/Keith Packard2016-03-18
| | | | | | This allows multiple SoCs to provide the same driver interface Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fixed timing of panic display LED to be readableBart Massey2016-03-07
| | | | | | | | | | | When we don't have a beeper, there's no way to signal a 'warble' for panic. So, elide that bit. Second, panic can't use the scheduler and timer because those may not be running (or may have failed), and so it uses a delay loop. Add a configurable scale value to the panic loop so that the LED blinks can be read. For stm32f0 devices, scale that by the sysclk value to automatically make them of reasonable length.
* altos/chaoskey: Add another USB endpoint to read raw dataKeith Packard2016-03-02
| | | | | | | | | | | This replaces having the single output switch based on a pin value and allows us to box the device and still fetch raw data. For now, this will use a special libusb2 program, ao-chaosread, to pull bits as I haven't figure out how to make linux provide two /dev entries for one USB device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Another fix for non CDC-ACM devicesKeith Packard2016-02-08
| | | | | | | Need to set the bInterfaceNumber for the actual interface to zero when there isn't an INT interface before it. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow USB drivers to skip CDC-ACM -specific descriptorsKeith Packard2016-02-07
| | | | | | | | For devices not providing the standard CDC-ACM interface, let them skip the various descriptors and interfaces to provide a more limited set of capabilities. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add power management APIsKeith Packard2016-02-07
| | | | | | | This provides sequenced suspend/resume functionality, allowing modules to register for power management at configuration time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Insert inter telemetry-packet delayKeith Packard2016-01-10
| | | | | | The receivers take some time to reset the radio between packets, so make sure we don't send back-to-back telemetry too quickly by delaying after sending each telemetry packet.
* altos: Only set CMAC RSSI value on valid packet receivedKeith Packard2015-05-24
| | | | | | | | This ignores spurious packets for the purpose of showing the RSSI value in telelco/telefire, avoiding warning about 'low RSSI' when the radio receives noise. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add the ability to configure a different USB vendor IDKeith Packard2015-03-19
| | | | | | | ChaosKey will use an OpenMoko vid/pid, so we need the ability to configure a different USB vendor ID for each product. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Missing pad field in TMv2 data packetKeith Packard2015-03-02
| | | | | | | | | | The normal ARM padding would have filled this in correctly, but it's best to be explicit about the structure. This also adds a test to make sure the resulting telemetry declaration is exactly 32 bytes, Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make APRS format (compressed/uncompressed) configurableKeith Packard2015-03-02
| | | | | | | | This provides a choice of compressed vs uncompressed when sending APRS packets to deal with receivers that still do not have support for the more useful compressed format. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow software to offer other USB interface classes than CDCKeith Packard2015-02-28
| | | | | | | This lets some boards offer non-CDC class USB interfaces so that the modem driver doesn't pick them up. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: embed ao_alarm and ao_clear_alarm in ao_sleep_forKeith Packard2015-02-14
| | | | | | | sdcc won't embed these itself, and thus consumes too much flash for telemetrum-v1.0 Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Replace ao_alarm/ao_clear_alarm with ao_sleep_forKeith Packard2015-02-13
| | | | | | | | | | | | | | | | Having arbitrary alarms firing in the middle of complicated device logic makes no sense at all. Therefore only correct use of ao_alarm and ao_clear_alarm was around a specific ao_sleep call, with correct recovery in case the alarm fires. This patch replaces all uses of ao_alarm/ao_sleep/ao_clear_alarm with ao_sleep_for, a new function which takes the alarm timeout directly. A few cases which weren't simply calling ao_sleep have been reworked to pass the timeout value down to the place where sleep *is* being called, and having that code deal with the return correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Separate out ao_tracker force from dbgKeith Packard2015-02-07
| | | | | | | Allow enabling telemetry when USB is connected without also enabling the motion debugging output. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Always include a check for stdio overflowKeith Packard2015-02-01
| | | | | | | For some reason, the check for running out of space to record stdio devices was disabled when only one device was expected. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Re-implement fast ADC code for stmf0Keith Packard2015-01-27
| | | | | | | This creates a ring buffer for ADC data so that ADC fetching can run in parallel with other activities. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add support for TeleBT v3.0Keith Packard2015-01-24
| | | | | | | Add support to the BTM driver for non-CC1111 interrupts Add HW flow control to STM serial driver Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get rid of some accidental debug codeKeith Packard2015-01-22
| | | | | | | I was debugging the accelerometer calibration code and left some printfs in it, which made TM run out of flash space. Signed-off-by: Keith Packard <keithp@keithp.com>
* Set version to 1.5.9.11.5.9.1Keith Packard2015-01-16
|
* altos: Allow TeleMega to be built without MPU6000Keith Packard2014-11-16
| | | | | | | Robert Braibish's board has a dead MPU6000; this fix lets the TeleMega firmware build without that driver so the rest of the board could be verified. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use other TeleDongle LED for CRC-invalid packet reportingKeith Packard2014-11-06
| | | | | | | Instead of blinking out some fake-o RSSI indication, just blink the red LED when a packet with a bad CRC is received. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Declare port register type only in arch headerKeith Packard2014-11-06
| | | | | | | Instead of defaulting to 8 bits, explicitly require declaration of the type of the port register for each architecture. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix up telemetry delay computationsKeith Packard2014-10-25
| | | | | | | | | | | | | | | | With RDF, APRS and telemetry all being sent at varying rates, computing when to send the next radio data is not as simple as sending telemetry and then figuring out whether to send RDF and/or APRS. Fix this by computing times for the next telemetry/rdf/aprs packet, and only sending each when that time has passed. Compute the delay until the next radio activity as the minimum time to any transmission. This also adds code to the config bits to reset the radio times whenever something changes that might affect which radio data to send next. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove old AO_SEND_ALL_BARO bitsKeith Packard2014-10-25
| | | | | | | This was used for testing the original TeleMini which couldn't log data at full speed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Sort out ao_gps_print altitude fetchingKeith Packard2014-10-25
| | | | | | | | | | ao_gps_print is used by both teledongle/telebt and the host-based GPS test code. The first instance uses the old internal GPS structure, containing just a 16-bit altitude while the second uses an ao_telemetry structure, which contains 32 bits split into two members. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Expose telemetry altitude macros even without GPSKeith Packard2014-10-24
| | | | | | This allows for APRS testing in the new teledongle code Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix syntax error with ao_log_mega change.Keith Packard2014-10-04
| | | | | | Missed a semi-colon. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Record 32-bits for gyro calibration valuesKeith Packard2014-10-04
| | | | | | | | | The gyro ground calibration values are scaled by 512 to provide a bit more precision for the computations. This means they don't fit in 16 bits, so change the format of the flight log record. Also change the reported format so that AltosUI has a chance of figuring it out. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure we don't beep out continuity twice in idle modeKeith Packard2014-09-11
| | | | | | | | | | | | | | If the battery voltage report takes longer than the initialiation sequence, we could get to the state reporting after the state had switched from startup to idle. This would result in continuity being reported the first time through the loop. Then, as the state had already changed, we'd pass through the while test and go back to report continuity a second time. Fixed by using the state remembered before beeping out the voltage to decide whether to report the continuity. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix ability to disable telemetry by setting interval to 0Keith Packard2014-09-11
| | | | | | | | | For non-zero telemetry intervals, the radio code limits the value based on the data rate. However, a zero interval means that telemetry should be entirely disabled, so that value should be left alone when checking. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow negative values for pyro configuration dataKeith Packard2014-09-03
| | | | | | | All of the integer pyro configuration parameters may be negative, so parse that correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't add AO_LOG_FLIGHT to existing GPS logsKeith Packard2014-09-01
| | | | | | | When appending to a TeleGPS log, don't stick another flight value into the log. That just confuses the ground station software. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure pyro remains valid during delayKeith Packard2014-08-29
| | | | | | | Keep checking pyro status while waiting for delay to expire to make sure nothing changes. Disable pyro channel if something does. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telerepeat-v1.0Keith Packard2014-08-17
| | | | | | | This uses TeleBT hardware to provide a telemetry repeater, receiving packets on one frequency and re-transmitting them on another. Signed-off-by: Keith Packard <keithp@keithp.com>
* telegps-v1.0: Provide one log and append to itKeith Packard2014-08-17
| | | | | | | | Instead of creating per-flight logs, create a single log and append data to it each time TeleGPS is powered on. This avoids potentially running out of log space just because the device is powered off/on. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Report additional pyro channels via beeperKeith Packard2014-08-14
| | | | | | | Send a beep for each additional pyro channel, low for no igniter, mid for igniter. Does not change the reporting for the apogee/main channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Have MicroKite just start recording at startupKeith Packard2014-08-14
| | | | | | | This avoids having MicroKite try to detect boost and has it just start recording data immediately. Signed-off-by: Keith Packard <keithp@keithp.com>