aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: Remove sam4e sam.h and component-version.h filesKevin O'Connor2019-01-074-4/+4
| | | | | | | | These two files from atmel have different licenses than the other files. Neither files provide any real value, so just remove them to avoid any confusion. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Notify both the bulk_in and bulk_out tasks on a configureKevin O'Connor2019-01-071-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: It's only necessary to program the CR1 register during SPI initKevin O'Connor2019-01-073-11/+9
| | | | | | Only set the CR1 register during spi_prepare(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Pass gpio id to gpio_peripheral()Kevin O'Connor2019-01-047-21/+21
| | | | | | | Pass the gpio id instead of the bank/pin to gpio_peripheral(). This is in keeping with other ARM ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move enable_peripheral_clock to main.cKevin O'Connor2019-01-049-23/+32
| | | | | | | Move and rename function to enable_pclock() - in keeping with other ARM ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move ADC code to new adc.c fileKevin O'Connor2019-01-044-95/+103
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Add support for entering Arduino bootloader via USBKevin O'Connor2018-12-242-1/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Add support for detecting a USB level Arduino bootloader requestKevin O'Connor2018-12-246-0/+33
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Add support for ADCKevin O'Connor2018-12-224-0/+131
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Always read SPI receive bufferYannic Schroeder2018-12-141-2/+3
| | | | | | | Otherwise the first byte read via SPI may be the last byte of the previous transfer Signed-off-by: Yannic Schroeder <schroeder@ibr.cs.tu-bs.de>
* samd21: Fix gpio in supportKevin O'Connor2018-11-302-3/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Add support for flashing an application via the bossac toolKevin O'Connor2018-11-301-3/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Add support for hardware pwmKevin O'Connor2018-11-304-0/+110
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Minor simplification to timer init codeKevin O'Connor2018-11-301-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Add support for SPIKevin O'Connor2018-11-304-0/+102
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Add support for basic i2c support (write only)Kevin O'Connor2018-11-304-0/+125
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Use GPIO() macro when calling gpio_peripheral()Kevin O'Connor2018-11-304-11/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Enable watchdogKevin O'Connor2018-11-301-0/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd21: Try to clarify the "generic clock generator" configurationKevin O'Connor2018-11-301-15/+19
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2ccmds: Validate the i2c addressKevin O'Connor2018-11-301-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spicmds: Check for an incorrect mode in spicmds.cKevin O'Connor2018-11-306-10/+12
| | | | | | | Check the mode parameter in spicmds.c so that the mcu code does not need to check it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Move ADC and SPI code from gpio.c to spi.c and adc.cKevin O'Connor2018-11-305-217/+238
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add support for sending I2C messagesKevin O'Connor2018-11-234-0/+114
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2ccmds: Minor whitespace changesKevin O'Connor2018-11-231-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Enable full speed peripheral clocks on SPI and I2CKevin O'Connor2018-11-213-2/+8
| | | | | | | | Scale the bus speed within the peripheral instead of on the system bus as scaling on the system bus slows down general register access to the peripheral. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add an enable_peripheral_clock() helper functionKevin O'Connor2018-11-214-5/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Minor comment update in hard_pwm.cKevin O'Connor2018-11-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Rework hardware pwm pin definitionsKevin O'Connor2018-11-201-56/+48
| | | | | | | Simultaneously define the hardware pin and the timer registers. This makes the table a little easier to understand. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Split gpio.c into gpio.c, adc.c, hard_pwm.c, and spi.cKevin O'Connor2018-11-206-391/+418
| | | | | | | Split up gpio.c into multiple files in an effort to make the code a little more understandable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add initial support for atmega32u4 chipsKevin O'Connor2018-11-203-12/+32
| | | | | Signed-off-by: Trevor Jones <trevorjones141@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Minor update to help text in KconfigKevin O'Connor2018-11-191-2/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* timer_irq: Increase maximum busy wait time to 2usKevin O'Connor2018-11-161-1/+1
| | | | | | | | | Increase the amount of time to "busy wait" in the timer dispatch loop to 2 micro-seconds. This, in practice, causes stepper step and unstep events to occur within a single hardware interrupt. Doing that helps stabilize the single active stepper performance benchmarks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Convert i2c code to use standard i2ccmds.cKevin O'Connor2018-11-143-10/+28
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add support for atmega328pKevin O'Connor2018-10-292-5/+8
| | | | | | | The atmega328p is basically the same as the atmega328 - add explicit support for it so that avrdude doesn't complain while flashing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Implement I2C support in the SAM4E8E portFlorian.Heilmann2018-10-275-1/+198
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* Add generic i2c interfaceFlorian.Heilmann2018-10-273-0/+80
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* sam3x8e: Don't report an error if bossac errors during device restartKevin O'Connor2018-10-221-1/+1
| | | | | | | Sometime bossac reports an error during chip restart. It appears this error is spurious - just suppress it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam4e8e: Enable SAM4 cache at startupKevin O'Connor2018-10-221-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Divide system clock within timer; not on system busKevin O'Connor2018-10-181-0/+3
| | | | | | | Scaling the timer on the system bus has a notable impact on performance. So, scale the timer within the timer hardware itself. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3x8e: Align loops to a 16 byte boundaryKevin O'Connor2018-10-131-1/+1
| | | | | | | | | It appears the sam3x8e has a primitive cache prefetch mechanism (it prefetches 32 bytes at a time aligned to a 16 byte boundary). Aligning the main loop in timer_dispatch_many() to a 16 byte boundary significantly improves performance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Force sched_try_shutdown to be inlinedKevin O'Connor2018-10-131-1/+1
| | | | | | | | | If sched_try_shutdown() is not inlined into timer_dispatch_many() it can have a significant impact on benchmarks. (Even though the function isn't called in practice, the call causes gcc to organize the function differently.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_irq: Fix jump target alignmentKevin O'Connor2018-10-131-2/+2
| | | | | | The jump target needs to be 4 byte aligned (not 2^4 bytes). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Use __always_inline on timer_read_timeKevin O'Connor2018-10-111-1/+1
| | | | | | | | Some older versions of gcc need the __always_inline directive in order to inline timer_read_time. Inlining that function is important for performance on the stm32f1. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Use -O2 optimization and inline timer_read_time()Kevin O'Connor2018-10-112-2/+1
| | | | | | | | As long as timer_read_time() is inlined, I get better performance with gcc -O2 optimization. The binary is also dramatically smaller and O2 better matches the other platforms. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Use the main lib/cmsis-core directory for cmsis includesKevin O'Connor2018-10-111-2/+2
| | | | | | Use the main cmsis header files with stm32f1. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Add support for building with bootloader supportKevin O'Connor2018-10-114-2/+136
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Move assembler build rules togetherKevin O'Connor2018-10-111-10/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Pull the USB D+ line low briefly to signal a device connectKevin O'Connor2018-10-111-0/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Initial support for serial over USBKevin O'Connor2018-10-113-1/+286
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32f1: Serial should have a higher irq priority than timersKevin O'Connor2018-10-112-3/+2
| | | | | | | | | It's possible for the code to stay in the timer irq for up to 100ms, so serial irqs should have a higher irq priority to prevent them from being starved. (The timer code disables irqs during event dispatch, so serial irqs would only be permitted between events anyway.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>