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

114 Commits

Author SHA1 Message Date
Marian Buschsieweke
c2c2cc8592
drivers/periph_gpio: let gpio_read() return bool
Since https://github.com/RIOT-OS/RIOT/pull/20935 gpio_write()
uses a `bool` instead of an `int`. This does the same treatment for
`gpio_read()`.

This does indeed add an instruction to `gpio_read()` implementations.
However, users caring about an instruction more are better served with
`gpio_ll_read()` anyway. And `gpio_read() == 1` is often seen in
newcomer's code, which would now work as expected.
2024-10-23 13:24:09 +02:00
Benjamin Valentin
4627f66caa drivers/periph/gpio: make gpio_write() take a bool 2024-10-22 16:39:48 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Marian Buschsieweke
63caa45746
cpu/sam3: assert valid freq in timer_init()
The API of timer_init() expects callers to know what frequencies are
supported and only use valid frequencies. So let's add an `assert()`
to aid debugging if the app uses an invalid.
2023-09-15 12:58:31 +02:00
Benjamin Valentin
124b849503 cpu: call early_init() 2023-01-08 22:26:12 +01:00
Francisco Molina
53c3e38cb9 sys/ztimer: select ztimer_periph_no_rtt only for samd21 2022-03-15 08:15:22 +01:00
Francisco Molina
5e47fc7e22 cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
The sam0 rtt busy loops for 180us every time an alarm is set or
the counter is read, this propagates and leads to timing errors
on ztimer_msec that are higher than > +-1msec.

The same goes for fe310.
2021-12-14 18:43:53 +01:00
Jean-Pierre De Jesus DIAZ
480e22be66 cpu/sam*: fix doxygen grouping warnings
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2021-09-11 12:45:15 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Marian Buschsieweke
ca8641c213
Merge pull request #16258 from maribu/cpu/sam3/periph_rtt
cpu/sam3/periph_rtt: fix rtt_get_alarm()
2021-03-30 17:47:30 +02:00
Marian Buschsieweke
d816666d84
cpu/sam3/periph_rtt: fix rtt_get_alarm()
Previously, the return value was off by one.
2021-03-30 14:49:11 +02:00
Francisco Molina
89c0b2a827
cpu/sam3: add unified RTT configuration 2021-03-30 14:28:58 +02:00
Marian Buschsieweke
d046772e7f
Merge pull request #15348 from maribu/periph_timer_type
drivers/periph_timer: Use uint32_t over unsigned long for frequency
2020-10-30 23:22:51 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02:12 +01:00
8455756618 cpu/sam3/periph/timer: fix trigger of cleared timer 2020-10-30 13:06:12 +01:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Leandro Lanzieri
44be83e4bb
cpu/sam3: Add Kconfig symbols 2020-07-16 15:35:23 +02:00
Benjamin Valentin
51135a50fc cpu/sam3: use TIMER_CHANNEL_NUMOF 2020-06-24 00:45:35 +02:00
Leandro Lanzieri
4d65bc8e0a
cpu: Rename CPU_ARCH to CPU_CORE 2020-06-16 12:05:40 +02:00
Leandro Lanzieri
64552a3b9a
cpu/cortexm_common: Move common modules to Makefile.dep
This moves the following modules to a architecture-specific Makefile.dep
file:
- cortexm_common
- cortexm_common_periph
- newlib
- newlib_nano
- periph
2020-04-01 09:46:21 +02:00
Hauke Petersen
ea2910e2f4 cpu/sam3: add periph_rtt driver implementation 2020-03-11 12:53:20 +01:00
Hauke Petersen
e5d940fce8 cpu/sam3: add opt to use external 32khz oscillator 2020-03-11 12:53:04 +01:00
a3c527fdbc cpu/*: add cortex_mpu to known-to-support CPU families 2020-03-03 22:59:41 +01:00
d7c0102115
cpu/cortexm: move CPU_ARCH/FAM to Makefile.features 2020-02-17 16:02:48 +01:00
Marian Buschsieweke
2247263a78
cpu/sam3/periph: adc_sample() now returns int32_t 2020-01-10 14:13:15 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Francisco Molina
4c0dd49603 cpu/sam3/periph/gpio.c: fix cpp.check shiftTooManyBitsSigned 2019-11-21 11:58:07 +01:00
Yegor Yefremov
fa3b0ff04b doxygen/SPI: don't include overridden typedefs
Add missing #ifndefs to overridden SPI typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Yegor Yefremov
5b0252b150 doxygen/ADC: don't include overridden typedefs
Add missing #ifndefs to overridden ADC resolution typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Francisco Molina
347a0fc804 cpu/ boards/: remove exports for CPU_FAM 2019-10-18 08:55:33 +02:00
Francisco Molina
5e9b92a326 cpu: remove CPU_ARCH exports 2019-10-18 08:55:33 +02:00
Sebastian Meiling
0629d076eb cpu/sam3: adapt timer to return 0 on success
Adapt periph/timer implementation of sam3 based MCUs
to return 0 on success for all functions.
2019-09-11 13:53:04 +02:00
Marian Buschsieweke
df27dbef7a
cpu: Moved stdio_init() into cpu_init()
- Removed stdio_init() from newlib's _init(), as this is too late in the boot
  process to allow DEBUG()ing during periph_init()
- Added stdio_init() to the various cpu_init() routines of the ARM CPUs just
  before periph_init()
2019-09-06 16:54:23 +02:00
smlng
2de4b3011b periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
2019-06-03 13:44:10 +02:00
Martine Lenders
98ddcdc783 sam3: mark closing #endif for MODULE_PERIPH_GPIO_IRQ 2018-10-09 15:11:00 +02:00
Hauke Petersen
e53abca10a cpu/sam3/gpio: use gpio_irq feature 2018-09-21 08:19:41 +02:00
938677cc83 cpu*: fix doxygen grouping 2018-06-11 19:12:02 +02:00
Sören Tempel
3ce89aeb04 cpu/sam3: fix build failure with TOOLCHAIN=llvm 2018-02-21 15:32:00 +01:00
Martine Lenders
39c122155c
Merge pull request #7995 from smlng/make/fix/unused_params
make: fix unused-params error
2017-11-28 14:46:23 +01:00
smlng
7309171303 build: fix unused parameter errors
cpu, sam0_common: fix unused parameter in periph/spi
        cpu, kinetis_common: fix unused parameter in periph/spi
        cpu, cc2538: fix unused param in periph/i2c
        cpu, cc2538: fix unused param in periph/spi
        cpu, sam3: fix unused param in periph/spi
        cpu, stm32_common: fix unused param in periph/pm
        cpu, stm32f3: fix unused params in periph/i2c
        cpu, nrf5x_common: fix unused param in periph/gpio
        cpu, nrf5x_common: fix unused param in periph/spi
        cpu, lpc2387: fix unused params in periph/spi
        cpu, cc2538: fix unused params in radio/netdev
        cpu, cc2650: fix unused params in periph/uart
        cpu, lm4f120: fix unused param in periph/spi
        cpu, lm4f120: fix unused params in periph/timer
        cpu, lm4f120: fix unused params in periph/uart
        cpu, stm32_common: fix unused params in periph/dac
        cpu, stm32l0: fix unused params in periph/i2c
        cpu, msp430fxyz: fix unused params in periph/uart
        cpu, mips: fix unused params
        cpu, cc430: fix unused-params in periph/timer
        cpu, msp430fxyz: fix unused params in periph/spi
        drivers, cc2420: fix unused param
        cpu, mips32r2_common: fix unused params in periph/timer
        cpu, cc2538: fix unused-param in periph/i2c
        cpu, mips32r2_common: fix unused-param in periph/timer
        cpu, msp430fxyz: fix unused params in periph/timer
        cpu, atmega_common: fix unused params in periph/spi
        driver, nrfmin: fix unused params
        cpu, cc2538_rf: fix unused params
        driver, netdev_ieee802514: fix unused param
        cpu, mip_pic32m: fix unused params
        cpu, lpc2387: fix unused params in periph/pwm
        tests/driver_sdcard_spi: fix unused params
        cpu, sam3: fix unused param in periph/pwm
        tests/driver_dynamixel: fix unused params, and style issues
        cpu, cc430: fix unused param in periph/rtc
        cpu, atmega_common: fix unused params in periph/i2c
2017-11-28 14:36:01 +01:00
smlng
e381317fbf make: fix sign-compare errors
cpu, nrf5x_common: fix sign-compare in periph/flashpage
    drivers, periph_common: fix sign-compare in flashpage
    cpu, sam0_common: fix sign-compare error in periph/gpio
    cpu, cc2538: fix sign-compare in periph/timer
    cpu, sam3: fix sign-compare in periph/gpio
    cpu, stm32_common: fix sign-compare in periph/pwm
    cpu, stm32_common: fix sign-compare in periph/timer
    cpu, stm32_common: fix sign-compare in periph/flashpage
    cpu, nrf5x_common: fix sign-compare in radio/nrfmin
    cpu, samd21: fix sign-compare in periph/pwm
    cpu, ezr32wg: fix sign-compare in periph/gpio
    cpu, ezr32wg: fix sign-compare in periph/timer
    drivers, ethos: fix sign-compare
    sys, net: fix sign-compare
    cpu, atmega_common: fix sign-compare error
    cpu, msp430fxyz: fix sign-compare in periph/gpio
    boards, msb-430-common: fix sign-compare in board_init
    driver, cc2420: fix sign-compared
    sys/net: fix sign-compare in gnrc_tftp
    driver, pcd8544: fix sign-compare
    driver, pn532: fix sign-compare
    driver, sdcard_spi: fix sign-compare
    tests: fix sign_compare
    sys/net, lwmac: fix sign_compare
    pkg, lwip: fix sign-compare
    boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error
    tests, sock_ip: fix sign compare
    tests, msg_avail: fix sign compare
    tests, sock_udp: fix sign compare
    boards: fix sign-compare for calliope and microbit matrix
2017-11-28 11:55:48 +01:00
smlng
eb8c55d7f7 cpu, sam3: fix periph/dac poweron 2017-11-13 12:03:05 +01:00
Joakim Nohlgård
e3d5a70e0c cpu/cortexm: Remove leftover _estack declarations
These are leftovers from before the Cortex-M common ISR vectors were
split into vectors_cortexm.c
2017-11-10 15:38:14 +01:00
Hauke Petersen
50ad7e523f cpu/sam3: removed guards from periph drivers 2017-11-09 12:54:01 +01:00
a20745b6c5 cpu: make use of Makefile.periph 2017-11-06 12:01:19 +01:00
870f0e45ba cpu: sam3: reorganize Makefile.features 2017-11-02 12:59:45 +01:00
smlng
140076b802 cpu, sam3: adapt to sam_common 2017-10-09 12:06:35 +02:00