summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* 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>
* altos/stm: use 0xff for dma mutex value for allocated mutexesKeith Packard2016-06-29
| | | | | | | DMA channels which are 'allocated' can't be shared. Instead of using the value '1' in the related 'mutex', use 0xff which won't match any task. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: remove ao_dma_abortKeith Packard2016-06-29
| | | | | | This function isn't used anywhere. 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/stmf0: Remove ao_usb_freeKeith Packard2016-06-11
| | | | | | This can't work without a lot more effort. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Rework the sram allocation to save a few text bytesKeith Packard2016-06-11
| | | | | | | Boot loaders were going over 4096 bytes of ROM. I suspect we'll need more serious work soon. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/cc1115l: Reduce trace buffer sizeKeith Packard2016-06-10
| | | | | | A 32-element trace buffer is all the larger we can fit in teledongle. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Handle USB reset in STM32L usb driverKeith Packard2016-06-10
| | | | | | | Just like lpc and stmf0, deal with the host resetting the bus while rebooting by restoring all usb-related data to the initial values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lpc: Handle USB reset by resetting internal stateKeith Packard2016-06-10
| | | | | | | Just like stmf0, this clears internal state at USB reset time so the driver can survive host OS reboots. Signed-off-by: Keith Packard <keithp@keithp.com>
* stmf0: Do not send more data than requested for GET_DESCRIPTORKeith Packard2016-06-09
| | | | | | | | When Linux boots, it asks for only the first 8 bytes of the device descriptor; we must limit the amount of data sent back to that amount or USB will get wedged. Signed-off-by: Keith Packard <keithp@keithp.com>
* stmf0: Clear all USB state when resetting chip. Wakeup all sleepersKeith Packard2016-06-09
| | | | | | | | | When USB is reset, but the board is not power cycled, all of the internal USB state needs to be reset, and any tasks blocked on sending or receiving packets need to be awoken so they can go wait for USB to start running again. Signed-off-by: Keith Packard <keithp@keithp.com>
* telegps-v1.0: Document how SN 1959 was fixedKeith Packard2016-06-09
| | | | | | | SN1959 was fixed by jumpering pin 8 to pin 10 so that the DONE_INT_PIN could be switched from PIO 2 to PIO 4 as pin 8 appeared to have failed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Fill preload map on site or lat/lon changeKeith Packard2016-05-27
| | | | | | | | This loads the map view with the selected area when the site entry is changed or the user hits return in the lat/lon fields. This lets you see the target launch site without having to load the whole preload set. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/cc1111: Use SW to drive UART RTS pinKeith Packard2016-05-09
| | | | | | Can't get the hw to work. Signed-off-by: Keith Packard <keithp@keithp.com>
* Ignore some built files for 1.6.3Keith Packard2016-05-06
| | | | 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>
* Revert "altos/stm: Run scheduler code on interrupt stack"Keith Packard2016-04-30
| | | | | | This reverts commit 6a9546413d6a236c010e806b50506d870961d074. This causes the device to stop reliably handling interrupts.
* altos: Clear packet queue when starting packet masterKeith Packard2016-04-25
| | | | | | | | This avoids overfilling the packet buffer when disconnected. Applications using packet mode shouldn't expect that output be saved across master sessions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telebt-v3.0: Flip CTS/RTS pins for BT moduleKeith Packard2016-04-25
| | | | | | | These are wired backwards, so ask that the right pins be used, which requires switching to software control of the pins. 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: Use TXE instead of TC for serial on STM32lKeith Packard2016-04-25
| | | | | | | Using TXE allows for full-speed communication, rather than waiting for each byte to be transmitted before inserting the next into the queue. Signed-off-by: Keith Packard <keithp@keithp.com>
* Debug bits for telebtKeith Packard2016-04-25
|
* 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/telefiretwo-v0.2: Change alarm names in commentKeith Packard2016-04-19
| | | | | | The PCB is labeled 'A' and 'B'. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Fix external interruptsKeith Packard2016-04-19
| | | | | | | | Missing a reserved address in the registers broke everything nicely, but the priority values were also wrong - stm32f0 exposes 8 bits per priority, like the stm32l, but it uses only the top two bits. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add TeleFireTwo v0.2 projectKeith Packard2016-04-19
| | | | | | | This is much like TeleFireTwo v0.1, with only one pyro channel and added siren and strobe 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: Use simpler debounce logic for buttonsKeith Packard2016-04-19
| | | | | | | | | | | Instead of waiting for a while after the transition to decide if it has stuck, signal the event right away and then ignore other transitions for the debounce interval. This seems to work just as reliably, but has the benefit of eliminating button latency at press time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add ao_lco_two.c; alternate LCO interface codeKeith Packard2016-04-19
| | | | | | | | The LCO interface is likely to end up very device specific as the interactions depends on the input devices. Here's a version for TeleLCOTwo, which has two arming switches and a firing button. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix telefiretwo .gitignoreKeith Packard2016-04-19
| | | | | | Was ignoring the wrong built files Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleLCOTwo firmwareKeith Packard2016-04-19
| | | | | | The LCO side of a two-channel launch controller setup. 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: Allow for pad boxes with different sensor configurationsKeith Packard2016-04-19
| | | | | | | | This allows for a pad box without a resistor from power to each FET. That resistor is needed to detect welded relays, but in a solid-state system, that's not a possibility. Signed-off-by: Keith Packard <keithp@keithp.com>