1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
Joakim Gebart
601c3002c3 cpu/kinetis_common: Cast device index enums to unsigned int before comparing for out of range values
Suppresses false warning in Clang:

    warning: comparison of constant 42 with expression of type 'xxx_t'
    is always false [-Wtautological-constant-out-of-range-compare]

See:
 - https://llvm.org/bugs/show_bug.cgi?id=16154
 - https://llvm.org/bugs/show_bug.cgi?id=22062
2015-07-21 07:21:51 +02:00
Joakim Gebart
624c241ec6 cpu/kinetis_common/spi: Fix byte_in unused.
Bug reported by the clang static analyzer.

Description: Value stored to 'byte_in' is never read
File: .../riot/cpu/kinetis_common/spi.c
Line: 1261
2015-07-13 17:24:00 +02:00
Joakim Gebart
697b85c182 kinetis: fix SPI double initialization warnings 2015-05-29 14:23:01 +02:00
Joakim Gebart
ec3679fd13 kinetis: spi_init_slave add missing callback assignment 2015-05-29 14:23:01 +02:00
Joakim Gebart
d4c1436de9 kinetis: fix warnings
- find_closest_x: sign-compare
 - hwtimer_arch: unused-parameter
 - i2c_init_slave: unused-parameter
 - rnga: sign-compare
 - rngb: sign-compare
 - spi_transfer_bytes: sign-compare
 - spi_transfer_regs: sign-compare
 - timer: unused-parameter
2015-05-29 14:21:52 +02:00
Joakim Gebart
fd46cb2364 kinetis: Add SPI_[2-7] to spi_transmission_begin
Fix compiler warning about unhandled switch cases.
2015-04-28 22:21:57 +02:00
Johann Fischer
36e89175b8 cpu/kinetis_common/spi.c: add a option to use hardware cs (PCS0 only)
minor fixes:
  - get rid of compiler warning "value 'SPI_1' not handled in switch"
  - add a giant macro to avoid redundant code in spi_init_master
2015-04-17 09:05:37 +02:00
Johann F
c0628a3058 cpu/kinetis_common: initial import for kinetis_common
add peripheral drivers for Freescale Kinetis MCUs:
    adc driver
    cpuid driver
    gpio driver
    hwtimer_arch driver (hwtimer used Low Power Timer)
    i2c driver (master mode only)
    mcg driver
    pwm driver
    random_rnga driver
    random_rngb driver
    rtc driver
    spi driver
    timer driver (timer used Periodic Interrupt Timer)
    uart driver
  add doc.txt (configuration examples)

  random_rnga: Update RNGA driver in preparation for RNGB driver.
  random_rngb: Add RNGB driver.
  spi: refactor SPI to work for multiple CTARS, add spi_acquire, spi_release
  gpio: Add gpio_irq_enable, gpio_irq_disable. Refactor GPIO.
  gpio: Add gpio_irq_enable, gpio_irq_disable.
  gpio: Refactor ISR functions to work with all GPIOs (0-31) and all ports (PORTA-PORTH)
  adc: Refactor ADC, add calibration and scaling.
    Added integer scaling of results in adc_map.
    Handle precision setting in adc_init.
    Set ADC clock divider depending on module clock.
    Add ADC_1 as a possible device.
    Add ADC calibration procedure according to K60 ref manual.
    Handle ADC pins which are not part of the pin function mux.
  Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-02-04 14:50:54 +01:00