summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * altos/lpc: Reset SPI device at startup timeKeith Packard2013-05-19
| | | | | | | | | | | | Wasn't doing the reset sequence correctly (write 0, then write 1). Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Configuring wrong pin for SPI1 MOSIKeith Packard2013-05-19
| | | | | | | | | | | | Was setting configuration for PIO1_21 instead of PIO0_21. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Allow for alternate SPI SCLK0 pin usageKeith Packard2013-05-19
| | | | | | | | | | | | | | SPI SCLK0 can appear on three different pins; let the application configure which one it wants. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Leave SPI enabled all the timeKeith Packard2013-05-19
| | | | | | | | | | | | Might be able to turn it off with some care; more experimentation required. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Create TX/RX busy macros for SPI driverKeith Packard2013-05-19
| | | | | | | | | | | | | | Check for both fifo status *and* device busy to make sure the device is idle before we touch any registers. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Fix beeper driverKeith Packard2013-05-19
| | | | | | | | | | | | | | | | Set prescale limit, not current prescale value (pr instead of pc). Flip output 1 on PWM match (set emc toggle for channel 1). Don't hold counter in reset (turn off CRST bit). Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Missing parens around ao_gpio_set macroKeith Packard2013-05-19
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: SPI runs off main clock (48MHz), not sysclk (24MHz)Keith Packard2013-05-19
| | | | | | | | | | | | Update SPI speed definitions to match Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Pull ADC data from the correct registersKeith Packard2013-05-19
| | | | | | | | | | | | | | | | Was just stepping through register space arbitrarily, which would have worked for EasyMini, but might have failed later if the ADC pin usage wasn't consecutive. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Don't use loader to place USB endpoint data in USB ramKeith Packard2013-05-19
| | | | | | | | | | | | | | Instead, just assign a fixed address in registers.ld. This avoids a confusing section in the elf file. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Add EXTI_PIN_NOCONFIGURE to exti interface, use for MS5607Keith Packard2013-05-19
| | | | | | | | | | | | | | | | This asks the EXTI code to not mess with the pin configuration so that the MS5607 driver can get interrupts on the MISO pin while still using it for SPI. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Make EXTI code work.Keith Packard2013-05-19
| | | | | | | | | | | | | | | | Clear rise/fall bits in ISR to avoid re-entering. Block interrupts around enable/disable bits. Create shared _ao_exti_set_enable function to control mask changes. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Use ao_spi_get/put_bit in MS5607 driverKeith Packard2013-05-19
| | | | | | | | | | | | Replace open-coded ao_spi_get/put and ao_gpio_set sequences Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/attiny: Fix ao_spi_get_bit/ao_spi_put_bit macrosKeith Packard2013-05-19
| | | | | | | | | | | | | | | | These were never written, so just use ao_spi_get/put_mask. A precursor to changing how the MS5607 drives the SPI bus Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: ignore built files in easymini-v0.1Keith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Build easymini-v0.1Keith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Initialize SPI for easyminiKeith Packard2013-05-18
| | | | | | | | | | | | Doesn't work very well without this Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Stick USB control structure in USB memoryKeith Packard2013-05-18
| | | | | | | | | | | | | | No reason to have that in regular ram, and it means we've got space for large enough stacks now Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Add easymini-v0.1 productKeith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Use separate interrupt stackKeith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Try a smaller stack.Keith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Add pin interrupt driverKeith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Add beep driverKeith Packard2013-05-18
| | | | | | | | | | | | Hardwired to our current beeper pin Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Add ADC driverKeith Packard2013-05-18
| | | | | | | | | | | | Uses burst mode to get the whole set of values in one interrupt Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: add gpio int, spi, adc and ct32b defines to lpc.hKeith Packard2013-05-18
| | | | | | | | | | | | Lots more devices Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Clean up broken IOCONF definesKeith Packard2013-05-18
| | | | | | | | | | | | Missing comment closes Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Fix ao_enable_input, add ao_enable_analogKeith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: LPC interrupt priorities are just 0-3Keith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Add LPC spi driverKeith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Use ao_port_t in m25 driverKeith Packard2013-05-18
| | | | | | | | | | | | This uses ao_port_t for all of the chip select masks Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Use ao_data_pres macro in ao_log_tinyKeith Packard2013-05-18
| | | | | | | | | | | | Now it works on easymini too Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Check for packet mode before trying to disable it in flight codeKeith Packard2013-05-18
| | | | | | | | | | | | This is only relevant for telemini Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: ao_data_get is in ao_data.c now, not ao_adc.cKeith Packard2013-05-18
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Allow architecture to define the type of port registersKeith Packard2013-05-18
| | | | | | | | | | | | LPC11U14 has 32-bit ports, STM32 has 16 bit ports. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Move ao_data.c from stm to coreKeith Packard2013-05-18
| | | | | | | | | | | | This should be used on every processor Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Get USB workingKeith Packard2013-05-17
| | | | | | | | | | | | | | The lpc demo now has a USB command line. Also allocates system stack so we know when ram is tight at build time Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Allow target-specific USB endpoint specificationsKeith Packard2013-05-17
| | | | | | | | | | | | | | The LPC has only a small number of endpoints, and those are not configurable. Let the LPC USB driver pick the IN and OUT endpoints by itself. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Finish off LPC USB register definitionsKeith Packard2013-05-17
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Start adding USB register definesKeith Packard2013-05-17
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Start adding USB register definitionsKeith Packard2013-05-17
| | | | | | | | | | | | Just the bare struct, no defines yet. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Take advantage of USART TX fifoKeith Packard2013-05-17
| | | | | | | | | | | | | | The USART has a 16-byte TX fifo; keep rough track of how full it is to avoid waiting for an interrupt after every TX byte. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Get USART runningKeith Packard2013-05-17
| | | | | | | | | | | | Adds a simple demo thread that spews data to the serial port Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/lpc: Get 100Hz timer runningKeith Packard2013-05-17
| | | | | | | | | | | | Use systick, which is built into the ARM core Signed-off-by: Keith Packard <keithp@keithp.com>
| * lpcxpresso: Add ao_demo.cKeith Packard2013-05-17
| | | | | | | | | | | | Kinda necessary for the demo to build Signed-off-by: Keith Packard <keithp@keithp.com>
| * lpc: Initial lpcxpresso bitsKeith Packard2013-05-17
| | | | | | | | | | | | This gets the LPC11U14 clock set to the PLL and blinks the LED. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Set the path for the STM32L compiler explicitlyKeith Packard2013-05-21
|/ | | | | | This makes sure we use the known toolchain for STM32L builds Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/cc1111: Hack on USB driver to make Windows happyKeith Packard2013-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows modem driver is quite chatty at startup time, getting and setting the comm parameters each time the device is opened. Sometimes, when setting the parameters, the cc1111 would STALL EP0. Most of the time, Windows would happily pass this as an error back to AltosUI which would then re-try the open (and succeed, most of the time). Sometimes, Windows would stall for 30 seconds before passing the error back. This made the whole UI freeze, and I suspect most people assumed our app had died. A bit of analysis with the beagle USB sniffer and I discovered the STALL settings, but there wasn't any correlation between the data on the wire and when the STALL would be generated. So, I found a couple of other cc1111 USB stacks on the net and just looked to see how our driver differed. There wasn't anything clearly related, but there were a list of small differences: 1) Other drivers didn't bother waiting for the hardware to ack the USBADDR setting; doing it this way means we can set the address *before* acking the setup packet. It'll get set eventually, at which point the device will start responding to packets again. Easy to fix, and saves a bit of code space too. 2) The other drivers set the STALL bit for setup packets which aren't understood. This shouldn't have any effect on 'good' systems as those shouldn't ever be generating bogus setup packets anyways. The driver already handled the STALL state in the interrupt handler, the only requirement was to figure out when to explicitly set the STALL bit. That required moving the state updating code from the start of the ep0 setup handling to the end, after the setup packet had been examined and data queued in or out as appropriate. 3) Our driver explicitly queued an IN packet for any setup request that wasn't waiting for an OUT pack. This appears to tie in with the USBADDR change above as before I made that change, this change caused the driver to fail to respond to most setup packets. This was simple once the above change was made, just move the generation of the IN packet inside the code that switched to the IN state. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Generate unmodulated carrier for CC1120 test modeKeith Packard2013-05-15
| | | | | | | This sets the deviation to 0, enables the preamble and turns on the transmitter. It will sit there happily sending a bare carrier forever Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move MS5607 info from 'v' to 'c s'Keith Packard2013-05-15
| | | | | | Makes more sense there. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove some MMA655x debugging printfsKeith Packard2013-05-15
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>