aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* atsamd: Initial support for SAMD51Kevin O'Connor2019-01-2816-61/+432
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Add a get_pclock_frequency() helper functionKevin O'Connor2019-01-285-7/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Select the 8K bootloader by defaultKevin O'Connor2019-01-281-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Pass the power management id to enable_pclock()Kevin O'Connor2019-01-289-32/+33
| | | | | | | Pass the power management id instead of the APBCMASK bit to the enable_pclock() function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsamd: Clarify clock generation codeKevin O'Connor2019-01-281-30/+35
| | | | | | | Implement gen_clock() and route_pclock() helpers in an effort to make the code more readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usbserial: Allow USB ids to be specified via KconfigKevin O'Connor2019-01-252-7/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* simulator: Fix simulator buildKevin O'Connor2019-01-251-0/+3
| | | | | | Commit b6ccd268 inadvertently broke the simulator build - fix it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Only prompt for CLEAR_PRESCALER and SIMULAVR with LOW_LEVEL_OPTIONSKevin O'Connor2019-01-251-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Move SERIAL_BAUD to src/Kconfig and show with LOW_LEVEL_OPTIONSKevin O'Connor2019-01-257-24/+8
| | | | | | | | Move the definition of SERIAL_BAUD to the main src/Kconfig file. Only show this as an option if the user selects the ability to configure low-level options. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Rename AVR_SERIAL and AVR_USBSERIAL to SERIAL and USBSERIALKevin O'Connor2019-01-252-8/+8
| | | | | | | Rename the config options to be more consistent with other architectures. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Add support for the SAM3X8C micro-controllerKevin O'Connor2019-01-223-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Add support for USB on SAM3XKevin O'Connor2019-01-195-26/+268
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* atsam: Add MACH_SAM3X, MACH_SAM4, MACH_SAM4E, MACH_SAM4S definitionsKevin O'Connor2019-01-188-46/+64
| | | | | | | Add additional Kconfig definitions to make it easier to select the correct code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Implement a median filter on ADC readingsKevin O'Connor2019-01-142-19/+69
| | | | | | | The lpc176x ADC is extremely noisy. Implement a 5 order median filter on each ADC read to weed out obviously incorrect readings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add mechanism for entering the bootloader from a USB signalKevin O'Connor2019-01-131-0/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adccmds: Run gpio_adc_setup() before oid_alloc()Kevin O'Connor2019-01-131-1/+2
| | | | | | | | Order the adc config code so that a shutdown from gpio_adc_setup() doesn't result in analog_in_shutdown() running on a 'struct analog_in' that hasn't yet been configured. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* src: Rename source folders for atsam and atsamd architecturesFlorian Heilmann2019-01-1233-74/+80
| | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* stepper: Fix bug when using a non-zero CONFIG_STEP_DELAY on AVRKevin O'Connor2019-01-111-1/+1
| | | | | | | | Make sure to explicitly cast to 32bit integers when doing math on 16bit integers that require the extra precision as the AVR uses a 16bit int. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Support configuring the stepper pulse length from KconfigKevin O'Connor2019-01-093-15/+41
| | | | | | | Allow the stepper pulse length to be configured at compile time from the Kconfig menu system. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2ccmds: Pass the i2c address as a 7-bit number (0-127)Kevin O'Connor2019-01-074-7/+5
| | | | | | | | | | | | | | | | The sam3 i2c code and the linux code use a 7-bit i2c address, while the avr, lpc176x, and samd21 i2c code uses an 8-bit address with the least significant bit always zero. A similar issue occurred in the host code (sx1509.py and replicape.py use 7-bit addresses while uc1701.py and mcp4451.py use 8-bit addresses). Consistently use 7-bit addresses in all the code. This breaks compatibility between host and mcu software, so make a change to the config_i2c command to force users to synchronize software updates. This also breaks common Smoothieboard configs, so update the mcp4451 code to validate the i2c_address. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Implement board reset via SAM RSTC hardwareKevin O'Connor2019-01-071-1/+6
| | | | | | | Use the RSTC hardware block to perform a full reset on a "reset" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Add USB support for the SAM4 "UDP" hardwareKevin O'Connor2019-01-076-2/+256
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Add support for sam4s8c chipsKevin O'Connor2019-01-0710-8/+222
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Add additional SPI and USART buses to spi.cKevin O'Connor2019-01-071-0/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Merge sam4e_spi.c into spi.cKevin O'Connor2019-01-074-163/+193
| | | | | | Determine at runtime if the SPI or USART devices should be used. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Add enable_pclock() helper functionKevin O'Connor2019-01-0710-22/+32
| | | | | | Add a helper function to enable peripheral clocks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Enable i2c on sam3x8eKevin O'Connor2019-01-073-17/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Merge sam4e8e support into sam3 codeKevin O'Connor2019-01-0723-551/+125
| | | | | | | Most of the peripherals on the sam4e8e are similar to the ones on the sam3x8e mcu. Merge the code together and use just one code directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Rename lib/cmsis-sam4e/ to lib/sam4e/Kevin O'Connor2019-01-071-8/+5
| | | | | | This is in preparation for merging the sam3 and sam4 code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3: Rename src/sam3x8e to src/sam3Kevin O'Connor2019-01-0711-10/+10
| | | | | | | This is in preparation for merging sam3 and sam4 code into one directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam4e8e: Move the sam4 cache setup to its own sam4_cache.c fileKevin O'Connor2019-01-073-7/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam4e8e: Use just a single 'chan' member in 'struct gpio_adc'Kevin O'Connor2019-01-072-61/+47
| | | | | | | Remove the 'pin' and 'afec' variables from 'struct gpio_adc'. This is in preparation to merge the sam3x8e and sam4e8e code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam4e8e: Move ADC code to new file afec.cKevin O'Connor2019-01-074-212/+219
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam4e8e: Rename gpio_set_peripheral() to gpio_peripheral()Kevin O'Connor2019-01-075-27/+24
| | | | | | | Use the same definition for gpio_peripheral() that the sam3x8e code uses. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam4e8e: Move gpio_set_peripheral() definition from gpio.h to internal.hKevin O'Connor2019-01-076-38/+51
| | | | | | | | Use internal.h in a similar way to the internal.h in sam3x8e. Also, move the twi pin definitions from internal.h to i2c.c (as they are only used there). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3x8e: Move adc support to a new adc.c fileKevin O'Connor2019-01-073-85/+93
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3x8e: Pass the gpio id directly to gpio_peripheral()Kevin O'Connor2019-01-074-9/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sam3x8e: Add an internal.h header file with local definitionsKevin O'Connor2019-01-075-15/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>