aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
Commit message (Collapse)AuthorAgeFilesLines
* stm32f1/rcc.h: Add a FIXME.Marti Bolivar2012-05-311-0/+2
| | | | | | Having a separate struct is stupid. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* RCC: DoxygenMarti Bolivar2012-05-315-138/+105
| | | | | | | Various changes to Doxygen structure, to help leaflabs-docs make sense of everything. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* rcc.c: Fix typo.Marti Bolivar2012-05-311-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/rcc.h: Doxygen workarounds.Marti Bolivar2012-05-311-3/+3
| | | | | | | We need the arguments to be the same name everywhere, or Breathe/Doxygen get confused. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/fsmc.h: Better Doxygen for memory bank bases.Marti Bolivar2012-05-311-9/+29
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/fsmc.h: Don't use BIT().Marti Bolivar2012-05-311-23/+23
| | | | | | | As fsmc.h doesn't include util.h or libmaple.h, these usages are actually in error. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f2/fsmc.c: Cosmetics.Marti Bolivar2012-05-311-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/iwdg.h: Remove BIT() usages.Marti Bolivar2012-05-311-3/+2
| | | | | | This cleans up another unnecessary <libmaple/util.h> dependency. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Don't try to build some libmaple files.Marti Bolivar2012-05-311-2/+2
| | | | | | We can't do these on F2 right now. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Lose <libmaple/util.h> dependency in series/flash.h headers.Marti Bolivar2012-05-092-48/+48
| | | | | | Switch from BIT(...) to (1U << ...). Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* flash.h: Doxygen.Marti Bolivar2012-05-093-2/+5
| | | | | | | Document FLASH_BASE once. This is due to restrictions in the documentation build system. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Change __DOXYGEN_PREDEFINED_HACK to __DOXYGEN__.Marti Bolivar2012-05-092-6/+5
| | | | | | avr-gcc does it this way. Seems ok to me. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Make usart_irq() __always_inline.Marti Bolivar2012-05-081-1/+1
| | | | | | | Compiling with -Os can prevent this from inlining, and it's an IRQ handler, so the space is worth spending. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Mark Doxygen for Flash register maps as series-specific.Marti Bolivar2012-05-082-2/+2
| | | | | | | This will let help us verify that we got the right thing when we pull it out of of Doxygen XML for the official HTML documentation. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/util.h: Doxygen cosmetics.Marti Bolivar2012-05-081-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/flash.h: Doxygen for flash_enable_features().Marti Bolivar2012-05-081-4/+14
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/flash.h: Deprecate flash_enable_prefetch().Marti Bolivar2012-05-081-0/+3
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/flash.c: Update Doxygen for flash_set_latency().Marti Bolivar2012-05-081-3/+5
| | | | | | Update for STM32F2 support. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Fix a bunch of Doxygen file-level comments.Marti Bolivar2012-05-0865-85/+92
| | | | | | | | | | | | | Fix @file in many places. Also fix up the descriptions where it's appropriate. This standardizes the @file formatting across the library to explicitly include any parent directories up to the repository root. Besides being nice, this will hopefully let us manage Doxygen's XML output so as to make extracting series-specific pieces via Breathe in the leaflabs-docs repo possible. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/flash.h: Fix Doxygen @fileMarti Bolivar2012-05-081-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/util.h: Doxygen fixups.Marti Bolivar2012-05-081-3/+3
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* ring_buffer.h: Fix Doxygen @file.Marti Bolivar2012-05-081-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: stm32.h: Tweak STM32_F1_LINE_xxx for mnemonic value.Marti Bolivar2012-05-081-6/+6
| | | | | | | | | | Change the values of the STM32_F1_LINE_xxx macros to match the part number better (so performance line, or F103s, now have STM32_F1_LINE_PERFORMANCE==3, F100s have STM32_F1_LINE_VALUE==0, etc.). This will hopefully make debugging or error checking easier for someone at some point. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: stm32.h: Doxygen.Marti Bolivar2012-05-081-5/+5
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32.h: Doxygen.Marti Bolivar2012-05-081-0/+17
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: stm32.h: Cosmetics.Marti Bolivar2012-05-081-4/+10
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: stm32.h: Add Doxygen comments.Marti Bolivar2012-05-081-0/+22
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: stm32.h: Add hooks for USB access line.Marti Bolivar2012-05-081-1/+3
| | | | | | | There are five F1 lines in total. The necessary infrastructure for USB access line (STM32F102 MCUs) support is missing, so add it. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: stm32.h: Fix wrong comment.Marti Bolivar2012-05-081-3/+0
| | | | | | We've got some value line values now. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/bkp.h: Tweak for STM32F1 XL-density.Marti Bolivar2012-05-071-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* adc: Add missing "static" on adc_dev adc3.Marti Bolivar2012-05-062-2/+2
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Fix wrong comment in libmaple/rules.mk.Marti Bolivar2012-05-031-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/adc.h: Cosmetics.Marti Bolivar2012-05-031-9/+9
| | | | | | | | | Add "extern" to mark portable interface routines that are implemented individually by each series. Move some code around. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1/adc.h: Add missing includes.Marti Bolivar2012-05-031-0/+2
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1/adc.c: Cosmetics.Marti Bolivar2012-05-031-4/+6
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F1: adc: Tweaks for XL-density MCUs.Marti Bolivar2012-05-032-5/+3
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f1: Resurrect DMA support. (sets up breaking change)Marti Bolivar2012-05-036-718/+836
| | | | | | | | | | | | | | | | | Breaking change set up: struct dma_handler_config is no longer part of the public API in <libmaple/dma.h>. User code which was touching these was always mistaken; it should be using dma_attach_interrupt() or dma_detach_interrupt() instead. Other than that, just move the nonportable bits in <libmaple/dma.h> and libmaple/dma.c to the appropriate places under libmaple/stm32f1/. (Ouch. This is almost everything.) Patch the (new) STM32F1 <series/dma.h> here and there to make everything compile; this is mostly limited to forward-declaring struct dma_dev and providing a hack _dma_dev_regs() declaration so inline functions in the series header can still access a device's registers. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32VLDiscovery support filesAnton Eltchaninov2012-05-031-0/+15
| | | | | Signed-off-by: Anton Eltchaninov <anton.eltchaninov@gmail.com> Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32.h: Copyrights and cosmetics.Marti Bolivar2012-05-031-3/+9
| | | | | | | | Fix copyright. Fix Doxygen @file. Update file-level documentation, given this file's increased importance as an abstraction for porting between series. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/dma.h: Fix Doxygen @file.Marti Bolivar2012-04-261-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32.h: Various updates, mostly to help STM32F1 line support.Marti Bolivar2012-04-243-31/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add STM32_HAVE_USB feature test macro requirement for <series/stm32.h>. This will let us test if we've got a USB peripheral. wirish/stm32f1/boards_setup.cpp is set up to use this when turning on USB CDC ACM support at init() time. Rework the STM32F1 <series/stm32.h> to make it easier to support the various lines that subdivide that series. We don't really support anything besides performance line yet, but there's been enough enthusiasm for value and connectivity line support in the past that these hooks seem worth adding. This means adding an STM32_F1_LINE macro and STM32_F1_LINE_[PERFORMANCE,VALUE,ACCESS,CONNECTIVITY] macros for values that STM32_F1_LINE can take, and generalizing the rest of the file to begin taking this into account. Some TODOs remain, but filling these in is the responsibility of future libmaple porting efforts. One pleasant consequence of the F1 stm32.h rework is that the build system no longer has to tell us what density of F103 we're building for, so remove that from the relevant support/make/board-includes/ files. Add some tweaks to <libmaple/stm32.h> and the STM32F2 stm32.h header to make sure this went through properly, and continues to go through properly in the future.
* stm32f1: stm32.h: Fix comment typo.Marti Bolivar2012-04-241-1/+1
|
* stm32f1: stm32.h: Put MCU section first, allow overrides.Marti Bolivar2012-04-231-30/+47
| | | | | | | | | | Put the section defining MCU-specific values before the other sections. Surround the density-specific defines with #ifndef/#endif pairs. This allows any of the settings in the STM32F1 stm32.h to be overridden on a per-MCU basis. That's hopefully useful to e.g. people porting libmaple to STM32F100 MCUs, which have slower clocks. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/i2c.h: Rearrange i2c_dev members to improve packing.Marti Bolivar2012-04-111-5/+5
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f2/gpio.h: Cosmetics.Marti Bolivar2012-04-111-2/+2
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32f1/spi.c: cosmetics.Marti Bolivar2012-04-111-15/+16
| | | | | | Fix whitespace, move some definitions around. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/spi: Fixups, move nonportable bits into libmaple/stm32f1.Marti Bolivar2012-04-116-134/+231
| | | | | | | | | | | Standard family support refactoring: add STM32F1 series spi.h, spi.c, and move anything that won't port to STM32F2 there. As part of a general effort to be cleaner, remove the dependency on libmaple/util.h from libmaple/spi.h by not using BIT(). Also forward declare struct gpio_dev for spi_gpio_cfg() to remove that include. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/spi: Fix boilerplate.Marti Bolivar2012-04-112-2/+4
| | | | | | Update Doxygen file headers and license copyright dates. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F2: Add timer support.Marti Bolivar2012-04-113-0/+356
| | | | | | | Standard series peripheral support patch, containing STM32F2 series timer.h and timer.c. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f2/nvic.h: Add fake NVIC_TIMER6 irq number.Marti Bolivar2012-04-111-0/+4
| | | | | | | This is necessary to make some timer code portable, but I'm not sure it's a good idea. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>