summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* altos: Add lambda support to lispKeith Packard2016-11-17
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Separate out values from atomsKeith Packard2016-11-17
| | | | | | | | | | | This enables changing values of atoms declared as constants, should enable lets, and with some work, even lexical scoping. this required changing the constant computation to run ao_lisp_collect() before dumping the block of constant data, and that uncovered some minor memory manager bugs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: add set/setq and ' in readerKeith Packard2016-11-17
| | | | | | Along with other small fixes Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add lisp to include directoriesKeith Packard2016-11-17
| | | | 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/lisp: Change lisp objects to use ao_poly everywhere. Add constKeith Packard2016-11-17
| | | | | | | | | | | This makes all lisp objects use 16-bit ints for references so we can hold more stuff in small amounts of memory. Also adds a separate constant pool of lisp objects for builtins, initial atoms and constant lisp code. Now builds (and runs!) on the nucleo-32 boards. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add lisp readerKeith Packard2016-11-17
|
* Add first lisp bitsKeith Packard2016-11-17
| | | | 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/nucleo-32: Add basic support for STM32F042 Nucleo-32 boardKeith Packard2016-10-30
| | | | | | This hooks up the LED, USB and the USART. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add USART supportKeith Packard2016-10-30
| | | | | | | The STM32F0 usart can be operated much like the STM32L usart, but the registers are all moved around. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Set SPI slave DMA priority to HIGH/VERY_HIGHKeith Packard2016-09-03
| | | | | | | | | Set spi slave DMA priority MOSI to HIGH and MISO to VERY_HIGH. Slave SPI doesn't have the luxury of slowing down when the system is busy, so provide it maximum memory bandwidth to try and keep up with the master. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Set i2c recv DMA to HIGHKeith Packard2016-09-03
| | | | | | | Make sure receive DMA is higher than any TX dma so that it always runs in preference. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Set MISO DMA priority to HIGH to avoid OVRKeith Packard2016-09-03
| | | | | | | | | When the MISO DMA priority is too low, and the processor gets busy, it's possible for SPI input to overrun the processor, which causes the MISO DMA to get out of sync and never finish. Set the MISO DMA priority to HIGH to avoid this. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Create funcs to set SPI DMA parametersKeith Packard2016-09-03
| | | | | | | | Instead of having nearly duplicate versions of the SPI DMA configuration calls, create helper funcs that do most of the work so that the SPI API funcs are shorter and clearer. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Make ao_spi_duplex out pointer constKeith Packard2016-09-03
| | | | | | Provides a bit better typechecking opportunities for this function. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/cc1120: remove unused status from ao_radio_fifo_write_stopKeith Packard2016-08-29
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Switch ADC fast to ADC clockKeith Packard2016-08-08
| | | | | | | Using this slower clock eliminates sampling problems with the ADC and cleans up the chaoskey raw data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Flash all LEDS during power onKeith Packard2016-08-04
| | | | | | | | | | | | | This tests the LEDS to make sure they all work on the following devices: easymega-v1.0 telebt-v3.0 teledongle-v3.0 telemega-v1.0 telemega-v2.0 telemetrum-v2.0 Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use standard FIPS testing for chaoskeyKeith Packard2016-08-02
| | | | | | | Check to make sure we aren't repeating a block coming from the unwhitened source, which is the standard online FIPS test for RNGs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Clean .bin files from flash-loader dirsKeith Packard2016-08-02
| | | | | | | The .bin files are what the DFU utility uses to flash the boot loader using USB. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Hook up clock output supportKeith Packard2016-08-02
| | | | | | | This was used to try and not have two xtals on telemini, but failed because the provided clock has too much noise. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telelcotwo control two boxes instead of two padsKeith Packard2016-08-02
| | | | | | | | telefiretwo is now a single pad box, so telelcotwo needs to switch between boxes instead of pads on the same box. Do this by re-purposing the pad arming switches into a box selector and arming switch. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add 'ao_button_get' to button driverKeith Packard2016-08-02
| | | | | | | This returns the current state of the button; useful to check what the value is at startup. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Stop building cc1111-based telemini v2.0 firmwareKeith Packard2016-07-27
| | | | | | This product never worked, so stop insisting that it actually build. 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: Don't access cc1120 SPI bus during recv after abort has startedKeith Packard2016-07-27
| | | | | | | | | | When the receive timeout happens, the radio may still interrupt while the SPI bus is getting shut down. If this happens, the interrupt handler shouldn't touch the SPI bus at all as it may well be turned off, which would cause the receive function to wedge waiting for a spi byte transfer to happen. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>
* altos: Add STM32F0 beep and SPI byte API.Keith Packard2016-07-14
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telemetrum v3.0Keith Packard2016-07-12
| | | | | | Like Telemetrum v2.0, but with cc1200 instead of cc1120 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/cc1111: Remove 'show tasks' commandKeith Packard2016-06-30
| | | | | | This saves space on cc1111 parts. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use FIFO_THR pin for cc1120 transmit bufferingKeith Packard2016-06-29
| | | | | | | Instead of reading NUM_TXBYTES, set the FIFO_THR pin to indicate when 64 bytes are available in the buffer. 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/stm: clean up ao_exti_enableKeith Packard2016-06-29
| | | | | | Was computing (1 << pin) twice for no good reason. 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/telemini-v2.0: Remove show tasks commandKeith Packard2016-06-29
| | | | | | There's not enough memory for this command, and it isn't necessary. 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: cc1200: use FIFO threshold pin output for APRS bufferingKeith Packard2016-06-29
| | | | | | | | | | Instead of polling the device for fifo space, just use the available pin configuration to figure out if there is enough space for a single APRS buffer. Then set the APRS buffer size to match the fifo threshold setting in the chip so that we know we can write the whole APRS buffer once the pin says there's space. 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/drivers: Use more reliable byte interface for CC1120 receptionKeith Packard2016-06-29
| | | | | | | This replaces direct register access with function calls to allow that code to respect the hardware requirements. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Add better byte-level SPI apiKeith Packard2016-06-29
| | | | | | | | This provides inline functions for sending and receiving individual bytes, and setup/finish functions to wrap them in. This make the byte sending respect the SPI hardware interface requirements. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Clean up spi_enable/disable_index functionsKeith Packard2016-06-29
| | | | | | These had an extra level of switch nesting for no good reason. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: move spi execution to common ao_spi_runKeith Packard2016-06-29
| | | | | | | | This regularizes SPI hardware use and ensures that the device is turned off after it has been used and that the status register is back to 'normal' the next time through. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add STM SPI debuggingKeith Packard2016-06-29
| | | | | | | This dumps out the SPI hardware state and history of SPI operations when compiled with -DDEBUG=1. Without that, this patch does nothing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add STM DMA debuggingKeith Packard2016-06-29
| | | | | | | This provides a command that shows current DMA operations when compiled with -DDEBUG=1. Without that, this patch has no effect. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Change ao_spi_send_sync definition to take const sourceKeith Packard2016-06-29
| | | | | | Provides for a bit better error checking. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Add more SPI status register bitsKeith Packard2016-06-29
| | | | | | These weren't the original version of the docs that we had. Signed-off-by: Keith Packard <keithp@keithp.com>