| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Modify them to check whether the relevant interrupts are enabled
before attempting to handle them.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
| |
bug prevented consecutive SerialUSB.read() calls from returning consecutive bytes
|
|
|
|
| |
Thanks to x893 for the suggestion.
|
|\ |
|
| |
| |
| |
| |
| | |
Don't modify the core FreeRTOS code; only change source that's
specific to libmaple.
|
| |
| |
| |
| | |
example blinky.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Thanks to gbulmer for the clarifying remarks.
|
|
|
|
|
| |
Put the PCLK1 and PCLK2 within #ifndef guards. This assumption is
biased towards LeafLabs boards.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The missing includes are a bug in general, and prevent usage of i2c.h
from within Maple IDE in particular.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
#define XXX_BASE ((xxx_reg_map*)0xDEADBEEF)
with
#define XXX_BASE ((struct xxx_reg_map*)0xDEADBEEF)
for increased GDB-friendliness.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
In keeping with convention.
|
|
|
|
|
| |
Various names in timer.h were too unwieldy. Making these slightly
more bearable.
|
|
|
|
| |
From declaration to definition, to keep with convention.
|
|
|
|
|
|
| |
Renamed timer_reg_map_union -> timer_reg_map.
Named the anonymous timer_type.
|
| |
|
|
|
|
|
| |
Moving SPIn Doxygen comments to point of definition in keeping with
libmaple conventions.
|
|
|
|
| |
Named spi_mode, spi_baud_rate, spi_cfg_flag, spi_interrupt.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The various clock divider enums suitable for passing to
rcc_set_prescaler() were badly named. They have been renamed as
follows:
* adc_prescaler_divider -> rcc_adc_divider
* apb1_prescaler_divider -> rcc_apb1_divider
* apb2_prescaler_divider -> rcc_apb2_divider
* ahb_prescaler_divider -> rcc_ahb_divider
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes to struct i2c_dev members:
- uint8 clk_line's type is changing and is being renamed, is now
rcc_clk_id clk_id
- uint8 ev_nvic_line's type is changing to nvic_irq_num
- uint8 er_nvic_line's type is changing to nvic_irq_num
Previous names were badly typed and inconsistent with the rest of
libmaple.
Exposing i2c_init(), also for consistency.
Adding/editing many Doxygen comments, for documentation and general
housekeeping.
|
|
|
|
|
| |
It's an i2c_state; calling it one. Previous uint8 type was broken
since I2C_STATE_ERROR is negative.
|