aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
Commit message (Collapse)AuthorAgeFilesLines
* stm32.h: Doxygen tweaks.Marti Bolivar2011-08-301-49/+49
| | | | | | | | For some unfathomable reason, Doxygen happily believes in PCLK2, but but not PCLK1, so Breathe can't find the docs for PCLK1, and all the children are unhappy. As a workaround, move all the Doxgyen crap into __DOXYGEN_PREDEFINED_HACK sections immediately preceding the actual definitions.
* dma.c: Fix Doxygen syntax for dma_get_irq_cause().Marti Bolivar2011-08-301-2/+2
|
* util.h: DoxygenMarti Bolivar2011-08-221-0/+13
|
* stm32.h: DoxygenMarti Bolivar2011-08-221-20/+49
|
* stm32.h: DoxygenMarti Bolivar2011-08-221-1/+31
|
* scb.h: DoxygenMarti Bolivar2011-08-221-0/+1
|
* nvic.h: DoxygenMarti Bolivar2011-08-221-2/+9
|
* i2c.h: DoxygenMarti Bolivar2011-08-221-1/+1
|
* gpio.h: DoxygenMarti Bolivar2011-08-221-11/+20
|
* flash.c: DoxygenMarti Bolivar2011-08-221-1/+2
|
* exti.c: Doxygen improvements.Marti Bolivar2011-08-221-3/+4
|
* rcc: Doxygen improvements.Marti Bolivar2011-08-222-20/+21
|
* dma.h: Doxygen improvements.Marti Bolivar2011-08-221-1/+6
|
* Typos.Marti Bolivar2011-08-112-2/+2
|
* exti.c: Optimize multiplexed IRQ handlers.Marti Bolivar2011-08-031-43/+48
| | | | | | | | | | | | | | Rewrite existing IRQ handlers in terms of new functions dispatch_single_exti() and dispatch_extis(). dispatch_single_exti() handles EXTIs which have a dedicated IRQ line, and thus doesn't have to check EXTI_PR; it is mostly equivalent to the (now removed) handle_exti(). dispatch_extis() handles multiple EXTIs sharing an IRQ line. Using dispatch_extis() instead of calling handle_exti() multiple times avoids unnecessary I/O to the (volatile) EXTI_BASE->PR register. These changes are in the flavor of the timer IRQ optimizations performed in f5016b15bef56bbdfd187f9b623177ef6dde7ace.
* exti.c: Cleanups.Marti Bolivar2011-08-031-5/+4
|
* exti.c: Remove enable_irq() and maybe_disable_irq().Marti Bolivar2011-08-031-36/+1
| | | | | These functions incorrectly replicate functionality that is already accomplished by manipulating EXTI_IMR directly.
* exti.c: Clean up some bit-banding usages.Marti Bolivar2011-08-031-9/+9
|
* exti.c: Cleanups.Marti Bolivar2011-08-031-21/+18
| | | | | Add new handle_exti() instead of calling clear_pending() and dispatch_handler() each time.
* util.h: Properly parenthesize IS_POWER_OF_TWO().Marti Bolivar2011-08-031-1/+1
|
* timer.c: Minor IRQ dispatch tweaks.Marti Bolivar2011-07-211-3/+3
| | | | | | Read TIMx_SR before grabbing a pointer to the user handlers instead of after. This should shave a couple of cycles off of the time between IRQ entry and SR read.
* timer.c: Optimize IRQ dispatch routines.Marti Bolivar2011-07-201-59/+66
| | | | | | | | | | | | | | | | | Remove dispatch_irq() and dispatch_cc_irqs(). For IRQs which handle exactly one timer interrupt, add new dispatch_single_irq(). The mere fact that the IRQ has been called suffices to prove that its interrupt enable bit (in TIMx_DIER) and interrupt flag (in TIMx_SR) are set. These facts are combined in dispatch_single_irq(), which only needs to check if the timer_dev handler is non-null before calling it and clearing the SR flag. For IRQs which serve multiple timer interrupts, replace the composition of calls to dispatch_irq() and dispatch_cc_irqs() with individualized routines. These eliminate unnecessary timer register reads/writes, and, in the case of capture/compare interrupts, have a loop unrolling performed.
* timer.c: Fix dispatch_irq() and dispatch_cc_irqs().Marti Bolivar2011-07-191-24/+46
| | | | | Modify them to check whether the relevant interrupts are enabled before attempting to handle them.
* timer.c: Fix off-by-one error in NR_GEN_HANDLERS.Marti Bolivar2011-07-181-1/+1
|
* stm32.h: Add license header.Marti Bolivar2011-07-181-0/+26
|
* stm32.h: Trivial comment tweak.Marti Bolivar2011-07-181-1/+1
|
* Add DELAY_US_MULT, for use in generalizing delay_us().Marti Bolivar2011-07-182-8/+9
| | | | | | | | The delay_us() implementation multiplies its specified delay target by a fixed constant in order to turn it into a busy-loop. This magic number doesn't work properly when the clock configuration isn't the same as a stock LeafLabs board. Add DELAY_US_MULT to the MCU-specific configuration in stm32.h in order to allow other chips to use delay_us().
* Move STM32 config from libmaple.h into stm32.h.Marti Bolivar2011-07-182-39/+39
|
* fixed a bug in usbreceivebytesAndrew J Meyer2011-07-011-1/+5
| | | | bug prevented consecutive SerialUSB.read() calls from returning consecutive bytes
* systick.c: Updating systick_uptime_millis before handling user callback.Marti Bolivar2011-06-241-1/+1
| | | | Thanks to x893 for the suggestion.
* Merge branch 'freertos'Marti Bolivar2011-06-241-0/+13
|\
| * Make FreeRTOS changes comply with the coding standard.Marti Bolivar2011-06-241-2/+4
| | | | | | | | | | Don't modify the core FreeRTOS code; only change source that's specific to libmaple.
| * FreeRTOS: Added FreeRTOS 7.0.1, including hook in libmaple/systick.c and ↵Nis Sarup2011-06-211-0/+11
| | | | | | | | example blinky.
* | systick.h: Comment typoMarti Bolivar2011-06-211-1/+1
|/
* DMA: Fix non-working DMA interrupts.Marti Bolivar2011-06-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | libmaple/dma.c defines DMA interrupts __irq_dma_channel[1-7], consistent with what is specified by support/ld/names.inc. However, names.inc is inconsistent with what support/ld/libcs3_stm32_src/ expects. Specifically, it contradicts the files - support/ld/libcs3_stm32_src/stm32_isrs.S - support/ld/libcs3_stm32_src/stm32_vector_table.S Which use the names __irq_dma1_channel[1-7]. Change names.inc and dma.c to use the correct IRQ names. The original names.inc/libcs3_stm32_src inconsistency was introduced in 43d6921658cd29b8022af4424d340a90fbcb9a7f, but dma.c had the correct names until ec3cf2903f4b03bc1dae5e159495c9e5ef0938ca, where they were renamed for consistency with names.inc. At that point, DMA interrupts stopped working. (This was documented in the commit message). Thanks to forum user robodude666 for tracking this down.
* rcc.c: Trivial comment tweak.Marti Bolivar2011-06-201-1/+0
|
* gpio.h: Fix zero/oh comment mixup.Marti Bolivar2011-06-141-1/+1
|
* adc.h: Clarify adc_smp_rate Doxygen comment.Marti Bolivar2011-06-111-1/+5
| | | | Thanks to gbulmer for the clarifying remarks.
* stm32.h: Don't blindly assume PCLK1 and PCLK2 values.Marti Bolivar2011-06-111-0/+4
| | | | | Put the PCLK1 and PCLK2 within #ifndef guards. This assumption is biased towards LeafLabs boards.
* Keep it 80-column clean.Marti Bolivar2011-06-0727-378/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | Go through overlong source code lines and convert as many of them as appropriate to be 80-column clean. This mostly affects license headers. Overlong lines are determined by running following from the libmaple base directory: $ ack-grep --nocolor --nogroup --cpp --cc --ignore-dir=usb -- '.{80}' Note that this excludes libmaple's usb subdirectory, which is still full of ST code that doesn't follow the libmaple source code guidelines. Contents of ~/.ackrc (these won't matter, but are included for completeness): --ignore-dir=docs --ignore-dir=build --type-set ld=.ld --type-set rst=.rst --type-set txt=.txt --type-set mk=.mk
* delay.h: Add missing include.Marti Bolivar2011-06-061-0/+2
|
* flash.h: Add missing include.Marti Bolivar2011-06-061-1/+2
|
* scb.h: Add missing include.Marti Bolivar2011-06-061-0/+2
|
* bitband.h: Add missing include.Marti Bolivar2011-06-061-0/+2
|
* i2c.h: Add missing includes.Marti Bolivar2011-06-061-0/+5
| | | | | The missing includes are a bug in general, and prevent usage of i2c.h from within Maple IDE in particular.
* usart.h: Allow the environment to determine USART_RX_BUF_SIZE.Marti Bolivar2011-05-271-0/+2
| | | | | | | Place the USART_RX_BUF_SIZE #define within an #ifndef to allow users to pick their own buffer size. See http://forums.leaflabs.com/topic.php?id=803
* Tweak some register map base pointers.Marti Bolivar2011-05-269-18/+18
| | | | | | | | | | | | Replace #define XXX_BASE ((xxx_reg_map*)0xDEADBEEF) with #define XXX_BASE ((struct xxx_reg_map*)0xDEADBEEF) for increased GDB-friendliness.
* Moving Doxygen comments from declarations to definitions.Marti Bolivar2011-05-236-10/+9
|
* adc.c: Giving adc_dev variables static linkage.Marti Bolivar2011-05-231-2/+2
|
* adc: Moving ADC[123] Doxygen comments to definitionsMarti Bolivar2011-05-232-3/+3
|