aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* usb_cdcacm: Rename "notification" -> "management".Marti Bolivar2012-08-012-11/+11
| | | | | | This keeps things in line with the specification, helping readability. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Move CDC ACM config. descriptor into usb_cdcacm.c.Marti Bolivar2012-07-312-15/+15
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Move bootloader details out of libmaple.h.Marti Bolivar2012-07-312-8/+12
| | | | | | Finally! Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* HardwareSerial: make read() block until data arrive.Marti Bolivar2012-07-311-0/+3
| | | | | | | This makes the HardwareSerial behavior match that of SerialUSB, and should help avoid confusion. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Move bootloader reset signal detection to Wirish.Marti Bolivar2012-07-313-127/+140
| | | | | | | | Use usb_cdcacm hooks to move the DTR edge and "1EAF" magic packet detection to usb_serial.cpp. We'll later be able to extend this system to support Leonardo-style reset signalling. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_cdcacm: Add usb_cdcacm_peek().Marti Bolivar2012-07-312-27/+39
| | | | | | | | | | | We need this so the bootloader reset signal detector can look ahead in the byte stream without stealing bytes from the user when "1EAF" isn't received. While we're doing this, take the time to fix a bunch of RX-related code (dead code removal, adding volatile, etc.) Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_cdacm: Use config instead of magic numbers.Marti Bolivar2012-07-311-2/+2
| | | | | | Sigh. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_cdcacm: Add hook system.Marti Bolivar2012-07-312-0/+44
| | | | | | | | Provide hooks so users can reach into the CDC ACM callbacks with their own code. We'll use this to move the bootloader reset signals to Wirish. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_cdcacm: Expose some internal configuration and values.Marti Bolivar2012-07-312-84/+93
| | | | | | | | | Mark the API as unstable so people don't rely on these too hard. (This header is not part of the official libmaple docs). We'll need some of this configuration elsewhere later, and it doesn't make much sense to expose it piecemeal. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_cdcacm.c: Add another verification TODO.Marti Bolivar2012-07-311-0/+2
| | | | | | | Not sure what the comment above the new TODO is supposed to mean, but it looks like something that should be checked. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_cdcacm.c: Resolve TODO and improve comments.Marti Bolivar2012-07-311-5/+7
| | | | | | | | | The disc pin code was copy-pasted when the CDC ACM pieces were extracted from the rest of the USB code, and I didn't really understand what was going on when I moved it over. Having checked the spec, the comments can be safely improved. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Hack: Provide a hook so Mini doesn't disable JTAG/SWD.Marti Bolivar2012-07-311-1/+3
| | | | | | | The nonexistence of a configuration system is starting to become kind of a pain. Oh well; let's keep piling hacks on until things break. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* usb_serial.cpp: Minor tweak.Marti Bolivar2012-07-251-2/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Add pin alias enums to other boards.Marti Bolivar2012-07-245-0/+41
| | | | | | | | Repeat Anton's VLDiscovery trick on the rest of the boards. Leave out st_stm3220g_eval since that's just a teaser to get people to play with F2. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Cosmetics.Marti Bolivar2012-07-241-23/+22
| | | | | | | Move the actual QUIET setting to above mdebug(); that was confusing. Rename _wait_for_ask to _wait_for_ack. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Updates for F2 and F4.Marti Bolivar2012-07-241-7/+51
| | | | | | | | | | | | | Support the extended erase memory command, which replaced the erase memory command in the bootloader protocol as of version 3.0. This takes a long time, so tweak _wait_for_ask to take an extra timeout for special cases like this. Use this under if __name__ == '__main__' to support F2 and F4. Additionally, produce a human-readable report of the target chip from its chip ID. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Improve error message on failed init.Marti Bolivar2012-07-241-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Use new-style classes.Marti Bolivar2012-07-241-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Don't use Psyco.Marti Bolivar2012-07-241-8/+0
| | | | | | This script is I/O bound. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Use print function.Marti Bolivar2012-07-241-10/+12
| | | | | | Towards py3k compatibility. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32loader.py: Remove unused code.Marti Bolivar2012-07-241-10/+0
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* reset.py: Remove advisory for 64-bit Linux.Marti Bolivar2012-07-201-2/+0
| | | | | | We test on that platform now, and it does work. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* <libmaple/scb.h>: Add FIXME to check for F2 compatibility.Marti Bolivar2012-07-131-0/+4
| | | | Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
* <libmaple/scb.h>: Don't use BIT().Marti Bolivar2012-07-131-60/+60
| | | | | | Also, assert copyright LeafLabs 2012. Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
* <libmaple/scb.h>: Assert LeafLabs copyright.Marti Bolivar2012-07-131-0/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
* Add win-list-com-ports.py.Marti Bolivar2012-07-131-0/+29
| | | | | | | Utility for listing COM ports available on the system. Taken from Eli Bendersky. Signed-off-by: Marti Bolivar <mbolivar@lozenge.(none)>
* ADC: Doxygen fixupsMarti Bolivar2012-06-293-16/+22
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Update the README.Marti Bolivar2012-06-291-19/+10
| | | | | | | | We're more portable since last writing. We also shamefully ignore the bugtracker and blocking changes pages, so drop those for now. Other tweaks and fixups. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* CREDITS: sort names alphabetically.Marti Bolivar2012-06-291-4/+4
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libraries/Wire: Cosmetics, include style touchups.Marti Bolivar2012-06-295-26/+25
| | | | | | | | Switch to the new include style. Move includes in headers inside the include guards, for the GCC multiple include parser optimization. Make 80-column clean. Add newlines at end of files. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Add new hard/soft Wire I2C library.Trystan Jones2012-06-299-251/+626
| | | | | | | | | | | Added a generic pure abstract class to provide the interface for all Wire implementations. Modified the old Wire library using software interface to use the new Base Wire abstract class. Added a new library which allows the use of the Wire class to use the I2C hardware. Changed default pin numbers for Software Wire library to match pin numbers used for I2C/TWI shields created for the Arduino. Signed-off-by: Trystan Jones <crenn6977@gmail.com>
* Doxygen hacks and fixups.Marti Bolivar2012-06-2810-25/+24
| | | | | | | | - Shut Doxygen up in various places - Fix some genuine docs bugs - Ignore sources we're not responsible for Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Cosmetics.Marti Bolivar2012-06-281-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* HACKING: mention contrib/astylerc.Marti Bolivar2012-06-281-0/+4
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Add contrib/astylerc.Marti Bolivar2012-06-281-0/+22
| | | | | | | This is an astyle options file that roughly aligns with the coding style guidelines. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Add CREDITS file.Marti Bolivar2012-06-282-0/+84
| | | | | | | | | | | | | | | | | It's about time. This initial file is based on the output of $ git log | grep Author | sort | uniq It leaves out credit for patches that were later reverted or moved out of libmaple. It also doesn't credit the many patches and other bugfixes from users who've e.g. written in the forum describing their changes, but didn't submit actual patches. Names aren't always available in cases like those, but if the contributors come forward, we'd be happy to add them. Add note in HACKING about adding yourself to CREDITS. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* reset.py: Use the real print function (requires Python 2.6+).Marti Bolivar2012-06-281-14/+16
| | | | | | | | | | | | | | | | | | | | | | Use "from __future__ import print_function" so the recent py3k compatibility patches to reset.py preserve the old output in Python 2. This increases our minimum Python version to 2.6, but avoids ugly output Python 2, where print statements with a tuple argument print the tuple with parentheses etc. Python 2.6 came out almost four years ago, and it's widely available: - even on older Linux distros (e.g. Ubuntu 10.04 and Debian Squeeze have 2.6 default at time of writing), - on OS X since 10.6, - and Windows users will probably be installing from python.org anyway, so they've likely got a reasonably recent vintage. Dropping 2.5 support thus doesn't seem likely to cause problems. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* ventosus2012-06-281-12/+12
| | | | | | | Make the reset script work for both python2 and python3 Make the reset script work for both python2 and python3 by putting brackets around print statements and properly encoding the string sent with ser.write Signed-off-by: Hanspeter Portner <agenthp@users.sf.net>
* Point to libmaple contributing doc more prominently.Marti Bolivar2012-06-272-0/+11
| | | | | | | It's wasting the users' and my time to have to point to this document on every single pull request. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Clean up micros().Marti Bolivar2012-06-271-7/+4
| | | | | | Don't leave US_PER_MS user-visible. Remove an unnecessary variable. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* LD: Don't --print-gc-sections.Marti Bolivar2012-06-261-1/+3
| | | | | | That's too noisy. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Fix botched TARGET_LDFLAGS.Marti Bolivar2012-06-261-3/+3
| | | | | | | Works with officially supported CodeSourcery toolchain. May need tweaks for users with a more modern arm-none-eabi-g++. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Merge branch 'wip-family-support'Marti Bolivar2012-06-26268-5439/+17325
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the long-lived (too long; future changes like these will need to proceed more incrementally) development branch of libmaple, containing experimental STM32F2 and STM32F1 value line support, into master. This required many changes to the structure of the library. The most important structural reorganizations occurred in: - 954f9e5: moves public headers to include directories - 3efa313: uses "series" instead of "family" - c0d60e3: adds board files to the build system, to make it easier to add new boards - 096d86c: adds build logic for targeting different STM32 series (e.g. STM32F1, STM32F2) This last commit in particular (096d86c) is the basis for the repartitioning of libmaple into portable sections, which work on all supported MCUs, and nonportable sections, which are segregated into separate directories and contain all series-specific code. Moving existing STM32F1-only code into libmaple/stm32f1 and wirish/stm32f1, along with adding equivalents under .../stm32f2 directories, was the principal project of this branch. Important API changes occur in several places. Existing code is still expected to work on STM32F1 targets, but there have been many deprecations. A detailed changelog explaining the situation needs to be prepared. F2 and F1 value line support is not complete; the merge is proceeding prematurely in this respect. We've been getting more libmaple patches from the community lately, and I'm worried that the merge conflicts with the old tree structure will become painful to manage. Conflicts: Makefile Resolved Makefile conflicts manually; this required propagating -Xlinker usage into support/make/target-config.mk. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * STM32F1: Bring back HardwareSPI.Marti Bolivar2012-06-262-3/+6
| | | | | | | | | | | | We're going to merge into master without F2 support for this. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * Bring back and fix up util.c functionality.Marti Bolivar2012-06-264-77/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rip out the existing nonportable pieces, and shove them under wirish/stm32f1, using weak symbols so users who only want libmaple proper don't end up with build errors. Add stubbed-out (and only partially functional) definitions for F2 targets under wirish/stm32f2. The behavior on F103 targets is the same as it was before (though the assertion framework has always been broken and badly needs replacement, that awaits another commit). We additionally now skip re-enabling USB on F1 targets without USB, to make things work on value line MCUs. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * util.c: Fix Doxygen header.Marti Bolivar2012-06-261-1/+1
| | | | | | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * Bring back the libraries.Marti Bolivar2012-06-261-6/+6
| | | | | | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * Bring back throb().Marti Bolivar2012-06-261-2/+2
| | | | | | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * stm32f1: gpio.h: Add another hack mode macro.Marti Bolivar2012-06-261-0/+1
| | | | | | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
| * libmaple/util.c: Add FIXMEs.Marti Bolivar2012-06-261-0/+2
| | | | | | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>