summaryrefslogtreecommitdiff
path: root/src/stm/ao_serial_stm.c
Commit message (Collapse)AuthorAge
* altos/stmf0: Initialize UART RTS/CTS before turning it onKeith Packard2017-06-27
| | | | | | If you try this after the UART is running, it won't work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stm: Interrupt priority is in the upper bits of the priority maskKeith Packard2017-02-20
| | | | | | | | | | Because the STM32L only offers 16 priority levels, the bottom four bits of each priority mask are not used. All of the interrupt priority settings in the system were using values < 16, making them all effectively the same. Fix that by moving them into the upper 4 bits and using symbolic constants everywhere. 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/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: 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/stm: Add ability to delay STDIO usage for serial portsKeith Packard2015-02-01
| | | | | | | | Bluetooth needs to delay adding the serial port to stdio until the link is up and running. The cc1111 serial driver had DELAY_SERIAL_*_STDIN bits which have been added to the STM serial driver. 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: Do not release interrupts from any pollchar functionKeith Packard2013-03-31
| | | | | | | | | | | getchar relies on interrupts being blocked across the pollchar calls and into the sleep call or it may go to sleep with data pending. This prefixes all pollchar functions with _ to indicate that they are to be called with interrupts blocked and eliminates all interrupt manipulation calls from within the pollchar functions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add support for 115200 baud serial ratesKeith Packard2012-11-30
| | | | | | Necessary for flashing skytraq chips Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make stdio 8-bit clean by making pollchar return intKeith Packard2012-11-30
| | | | | | | | | | We were stealing one value (0xff) in the return value from pollchar to indicate 'not ready yet'. Instead of doing that, use the integer value -1 and have pollchar return an int instead of a char. That necessitated cleaning a few other bits to make sure that 0xff wouldn't get promoted to -1 on accident. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch drivers to ao_arch_block/release_interruptsKeith Packard2012-10-25
| | | | | | Stop using cli/sei, which are avr-specific Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Massive product config cleanupKeith Packard2012-04-14
| | | | | | | | Support multiple serial ports more cleanly Split out parts of ao.h into separate feature header files Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make STM clock configuration per-product. Fix 32MHz CPU speedKeith Packard2012-04-09
| | | | | | | | | | This moves all of the STM clock configuration into ao_pins.h so that each product can configure it separately. While doing this, I discovered that the flash memory mode (64-bit, prefetch, latency 1) wasn't actually getting set, which is why the CPU refused to work at 32MHz. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Oops. Set per-USART STM baud rate register instead of usart1Keith Packard2012-04-02
| | | | | | | Was accidentally always setting usart1 instead of the per-usart register. Didn't work too well for other usarts... Signed-off-by: Keith Packard <keithp@keithp.com>
* Use 16-bits for STM32 LED mask. Export serial I/O functionsKeith Packard2012-03-28
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Allow any STM usart to be used for stdioKeith Packard2012-03-28
| | | | | | | This also adds the alternate pin configurations for the other two usarts Signed-off-by: Keith Packard <keithp@keithp.com>
* Actually enable usarts with the new usart codeKeith Packard2012-03-28
| | | | | | | And move USART1 to PB6/PB7 to avoid conflicting with the LCD pins. Signed-off-by: Keith Packard <keithp@keithp.com>
* Clean up multiple serial port support for STM32LKeith Packard2012-03-28
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Add support for multiple serial ports on STM32LKeith Packard2012-03-28
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Basic OS running on STM32LKeith Packard2012-03-28
| | | | | | This gets stm-demo working Signed-off-by: Keith Packard <keithp@keithp.com>
* Add stm-demo programKeith Packard2012-03-28
| | | | | | This runs AltOS and talks over the serial port. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add STM platform and stm-bringup demo programKeith Packard2012-03-28
The stm-bringup doesn't run altos, it just initializes the device and writes stuff over a serial port. Works on the STM32L Discovery board at least, should do stuff on other boards too. Signed-off-by: Keith Packard <keithp@keithp.com>