summaryrefslogtreecommitdiff
path: root/src/kernel
Commit message (Collapse)AuthorAge
* altos: Don't wait while idle if trying to minimize interrupt latencyKeith Packard2016-11-20
| | | | | | | | Keeping the scanout running reasonably means keeping interrupt latency constant, and that requires leaving the CPU running. Don't wait for interrupts when the system is running in this mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/kernel: Make ao_cmd_readline public. Return char from ao_cmd_lex.Keith Packard2016-11-17
| | | | | | | With these two changes, the readline function can be used by other code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Fix testsKeith Packard2016-10-30
| | | | | | | A couple of fixups for ao_flight_test to dump pyro info only when running in debug mode, and to change the aprs testing Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't switch to flight 0 when log fills in flightKeith Packard2016-07-27
| | | | | | | | | If the log is full at startup, we want to transmit flight 0 to let the ground station know. However, we don't want to switch to flight 0 in flight, so save the initial telemetry flight number (0 or the real flight number) at startup and use that throughout the flight. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Expose cc1200 radio test functions for telemini bringupKeith Packard2016-07-27
| | | | | | | | This exposes the cc1200 radio test function so we can load special test firmware in telemini to do the radio cal as it has no USB to perform that interactively. Signed-off-by: Keith Packard <keithp@keithp.com>
* fixup for interleaveKeith Packard2016-07-27
|
* altos: Keep telemetry and command output from interleavingKeith Packard2016-07-27
| | | | | | | | | | When monitoring telemetry, the frame needs to be sent together on one line, not split with the output of a command (like 'a') mixed in. Use a mutex for products with monitoring to keep command output and telemetry output each on separate lines. Signed-off-by: Keith Packard <keithp@keithp.com>
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Leave USB enabled in flight with -DDEBUG=1Keith Packard2016-06-29
| | | | | | This leaves the command line available for diagnostics when debugging. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make task list output more usefulKeith Packard2016-06-29
| | | | | | Add the timeout value and task id Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ao_delay(0) not wait foreverKeith Packard2016-06-29
| | | | | | | | | ao_delay() is implemented on top of ao_sleep_for, and ao_sleep_for uses the timeout value of 0 to indicate an infinite timeout. Calls to ao_delay for 0 ticks would unintentionally hit this case and end up waiting forever.x Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>