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

321 Commits

Author SHA1 Message Date
Matthew Blue
2a92d480ea cpu/atmega_common: Use updated time.h from avr-libc-2.0.0 2018-05-28 13:04:55 -04:00
364806e585 cpu/atmega_common: add support for eeprom periph interface 2018-05-24 14:07:55 +02:00
Francisco Acosta
8ab908146e
Merge pull request #8959 from aabadie/pr/cpu/guard_atmega_common
cpu/atmega_common: remove useless periph file guard
2018-05-22 19:57:46 +02:00
3f1657ffbb
Merge pull request #8952 from ZetaR60/RIOT_atmega_graceful_clock
boards/common/atmega: gracefully handle CKDIV8 fuse
2018-05-14 16:11:17 +02:00
Matthew Blue
55a7d8f83d boards/jiminy-mega256rfr2: remove context swap defines 2018-05-03 17:29:28 -04:00
Matthew Blue
2979626ef6 boards/common/atmega: gracefully handle CKDIV8 fuse 2018-05-02 14:05:33 -04:00
Matthew Blue
ac2b643308 cpu/atmega_common: return to non-interrupt context swaps 2018-04-27 14:13:34 -04:00
1195ee609f cpu/atmega_common: remove useless periph file guard 2018-04-16 09:58:44 +02:00
Vincent Dupont
0d9badfab5 atmega_common: improve posix_unistd syscalls
Add open implementation and improve fcntl with variable arguments
2018-04-13 10:51:07 +02:00
2866a26a24
Merge pull request #8808 from Josar/atmega_stackPointer
cpu/atmega_common: use __temp_reg__
2018-04-09 12:05:29 +02:00
391cc83881 cpu/atmega_common: provide common stdio initialization 2018-04-03 14:18:32 +02:00
Josarn
2ef1001ec7 cpu/atmega_common: use __temp_reg__ 2018-03-30 10:22:32 +02:00
Matthew Blue
d3dc49e2ab cpu/atmega_common: Support for ATmega1284P 2018-03-25 14:24:40 -04:00
Josarn
d82f1eba4c atmega: add last instruction print
Signed-off-by: Josua Arndt  <josuaarndt@live.de>
2018-03-06 14:57:18 +01:00
Hauke Petersen
47a500d0b1
Merge pull request #8447 from haukepetersen/opt_test_periphuartpower
tests/periph_uart: included power_on/off() in test
2018-03-05 09:49:20 +01:00
Josarn
3bace2bd24 cpu/atmega-common: Adjustments Jiminy-mega256rfr2
Signed-off-by: Josua Arndt  <josuaarndt@live.de>
Signed-off-by: Steffen Robertz <steffen.robertz@online.de>
2018-03-02 13:33:26 +01:00
Hauke Petersen
ce9e6f4eb0 cpu/atmega_common: add empty uart/power_x functions 2018-03-02 10:53:55 +01:00
7847a91e12 cpu: instead of cpp-style, use C-style comments 2018-02-06 16:59:58 +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
32c10ae2c9 core, cpu: rename thread_start_threading() -> cpu_switch_context_exit() 2017-11-16 14:40:16 +01:00
86665b71bf cpu: adapt to COREIF_NG removal 2017-11-16 14:40:16 +01:00
smlng
27c2ee50f9 cpu, atmega_common: fix returns and error codes in periph/i2c 2017-11-13 13:23:06 +01:00
Laurent Navet
9de00af063 cpu/atmega_common: add adc driver 2017-11-10 14:19:08 +01:00
a20745b6c5 cpu: make use of Makefile.periph 2017-11-06 12:01:19 +01:00
Martine Lenders
60d543ab3d
Merge pull request #7862 from roberthartung/atmega_common_fix_periph
atmega_common: renames periph for atmega_common_periph
2017-11-06 11:55:59 +01:00
Robert Hartung
491f420651 cpu/atmega_common: renames periph module 2017-11-06 11:38:26 +01:00
1e52f8d292 cpu: atmega: reorganize Makefile.features 2017-11-02 12:59:45 +01:00
lebrush
c054e38156 Merge pull request #7590 from lebrush/fix/atmega-gpio-misc
GPIO interrupt fixes for atmega328p
2017-09-15 11:59:11 +02:00
Victor Arino
6365466078 cpu/atmega_common: fix GPIO INT filter 2017-09-14 20:40:13 +02:00
Victor Arino
294594908a cpu/atmega_common: support for flank low 2017-09-14 20:40:13 +02:00
Victor Arino
650cf81e8a cpu/atmega_common: fix gpio interrupt for atmega328p 2017-09-14 20:34:11 +02:00
Robert Hartung
914025973d cpu/atmega: use power.h defines instead of direct register access 2017-09-14 14:04:14 +02:00
b2f40534b1 Merge pull request #7541 from lebrush/fix/atmega_typo
Atmega fix typo and empty space
2017-09-01 20:29:12 +02:00
dnahm
b313c02c7c Adapted to comments II 2017-08-31 16:11:34 +02:00
dnahm
fe15574c6b Adapted to comments 2017-08-31 16:11:34 +02:00
dnahm
7bab826c38 cpu/atmega_common: add i2c periph driver 2017-08-31 16:11:34 +02:00
Victor Arino
3ba2177b0d cpu/atmega_common: fix typo 2017-08-30 20:08:37 +02:00
Francisco Acosta
f2efd88f98 Merge pull request #7129 from haukepetersen/opt_periph_sharetimerset
cpu: add and use shared code for timer_set()
2017-08-01 15:09:48 +02:00
Peter Kietzmann
afbb00cca7 Merge pull request #7225 from dnahm/atmega_spi
cpu/atmega_common: adjust spi for at328p and at1281
2017-06-30 08:53:10 +02:00
dnahm
af34c87a8d cpu/atmega_common: adjust spi for at328p and at1281 2017-06-30 08:34:47 +02:00
smlng
01af6d94c4 cpu, periph: retain constness in spi_transfer_bytes 2017-06-29 15:47:13 +02:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
Hauke Petersen
a1499f4190 cpu: add and use shared code for timer_set() 2017-06-02 12:21:56 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
Hauke Petersen
9aad0e528f cpu: cleanup unused/umimplemented isr stack code
- removed ISR_STACKSIZE define where unused (set to 0)
- removed thread_arch_isr_stack_usage(), thread_arch_isr_stack_start(),
  and/or thread_arch_isr_stack_pointer() where not implemented
2017-05-12 18:07:08 +02:00
Martine Lenders
96e0ce8ed3 atmega_common: provide implementation for POSIX syscalls 2017-04-03 20:23:14 +02:00
Oleg Hahm
1660abdc70 doc: cpu: fix doxygen 2017-03-10 14:56:28 +01:00
Joakim Nohlgård
9ec001b84b atmega_common: Update unistd.h with prototypes of all POSIX defined functions and constants 2017-03-07 17:59:57 +01:00
Joakim Nohlgård
738876a98f cpu/atmega_common: Improve POSIX headers 2017-03-07 17:59:57 +01:00
Hauke Petersen
ef3cdde903 cpu/atmega_common: fixed doxygen issues 2017-03-07 08:55:15 +01:00
Hauke Petersen
99c2704583 cpu/atmega: implement UART TX only 2017-02-09 10:42:53 +01:00
Anthony Merlino
23efa92cc9 cpu/atmega_common: Adds toolchain flags originally located in atmega-based boards 2017-02-02 14:12:02 -05:00
Bas Stottelaar
3b14a584b8 boards: *: remove SPI_*_EN now rework is merged 2017-01-31 19:38:41 +01:00
Hauke Petersen
f5595693f6 cpu/atmega_common: adapted SPI driver 2017-01-25 16:46:05 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Oleg Hahm
d0316fa7ae periph timer: remove timer_irq_(en|dis)able 2017-01-14 15:34:53 +01:00
3e365b89fa cpu: atmega_common: adapt to periph/pm 2017-01-12 16:26:01 +01:00
ca7bf15ac4 core: panic: adapt to pariph/pm 2017-01-12 16:26:01 +01:00
0194091673 remove obsolete lpm code 2017-01-12 11:24:15 +01:00
Jon Thacker
c62803d243 atmega_common: disable interrupts prior to rebooting
If the watchdog is being reset in another thread, then
the reboot will never take place. This commit disables interrupts prior
to setting the watchdog timer to 250ms. This functionallity was common
to all Atmega CPUs, so it was moved to atmega_common.
2016-12-20 17:22:39 -06:00
Hauke Petersen
2eebf36eb2 cpu/uart: make use of named return values 2016-10-28 10:32:00 +02:00
Cenk Gündoğan
9ef148e931 cpu/atmega_common: include time.h for time_t 2016-10-20 15:33:01 +02:00
Oleg Hahm
ed3aa6c46e Merge pull request #5835 from mali/timer
cpu/atmega_common: fix timer_set_absolute return code
2016-09-23 19:35:22 +02:00
Ludwig Knüpfer
6d30ced410 Merge pull request #5763 from jthacker/avr_thread_arch_isr_stack_usage
atmega: use software interrupt for context swap
2016-09-21 21:13:05 +02:00
Martine Lenders
8a74475e70 Merge pull request #5761 from mali/rmdeadcode
boards/atmega_common: remove dead code on link
2016-09-12 17:01:15 +02:00
Martine Lenders
03fbe9c2a5 Merge pull request #5766 from zhuoshuguo/fix_cpu_atmega_header_include_guards
fix cpu/atmega header include guardes.
2016-09-12 17:00:56 +02:00
Laurent Navet
4c9c3ab7d6 cpu/atmega_common: fix timer_set_absolute return code
according to timer documentation, timer_set and timer_set_absolute should
return 1 on succes, not 0.
2016-09-10 00:12:39 +02:00
Jon Thacker
e0365e0bf9 atmega: use software interrupt for context swap
Fixes #5745
For AVR based boards, three defines must be defined AVR_CONTEXT_SWAP_INIT,
AVR_CONTEXT_SWAP_INTERRUPT_VECT, and AVR_CONTEXT_SWAP_TRIGGER.
These defines are used to trigger a software interrupt used for context
switching.

When AVR_CONTEXT_SWAP_INTERRUPT_VECT is handled, the scheduler is run
and a context swap will happen if necessary, with the resulting thread
starting following the reti instruction. This results in threads running
at normal priority instead of at interrupt priority.

Atmega devices do provide a pure software interrupt. The method used
here for waspmote-pro and arduino-mega2560 is to use pin change
interrupts, set the pin to act as an output, and toggle the value to
simulate a software interrupt. The main limitation here is that a
physical pin is now occupied and must be defined for each board
supported by RIOT. On the plus side, it provides an easy method for
detecting context swaps with an oscilloscope.
2016-09-07 14:35:53 -05:00
Shuguo Zhuo
db3a349a51 cpu/atmega: revised header include guards. 2016-09-01 18:32:17 +02:00
kYc0o
5e3747ea8b Merge pull request #5590 from mali/atmega_common
cpu/atmega_common: improve to add smaller atmega MCUs.
2016-08-31 18:29:53 +02:00
Jon Thacker
0cc65db1b2 cpu/atmega_common: Add support for double speed baud generator
* Add support for U2X switch to double transmission speed
* Provides lower error rates when needed
* Add support for static baud rate calculation, reduces computation by 10x
* adds support for statically enabling double speed baud
2016-08-20 08:49:30 -05:00
Laurent Navet
eed73beaa1 cpu/atmega_common: prepare for atmega328p inclusion
use generic avr/libc definition for conditionnal compilation.
eg: use #ifdef(PORTG) or #ifdef(TIMER_0_ISRC) instead of #ifdef(Atmega328p)
This is more generic and simplify future boards support.
2016-08-20 12:23:48 +02:00
Laurent Navet
2cd918a07a atmega_common: abstract Power Reduction Register
PR Register is PRR0 on atmega2560 and atmega1281
but PRR on atmega328p.
this abstracts as atmega Power Reduction Register as MEGA_PRR.
2016-08-20 12:21:32 +02:00
Laurent Navet
31029daaab boards/atmega_common: remove dead code on link
Don't include unused functions and data in binary.
2016-08-18 22:08:55 +02:00
kYc0o
03d380845e Merge pull request #5593 from jthacker/atmega_regs_common
cpu/atmega_common: generalize register/peripheral definitions
2016-07-13 20:17:36 +02:00
Joakim Nohlgård
b02e0eca47 ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 2016-07-12 10:17:49 +02:00
Jon Thacker
2aec999900 cpu/atmega_common: generalize register/peripheral definitions
Makes AVR register definitions dependent on what avr-libc defines
for a given MCU, rather then duplicating that effort here.
Definitions done in this way are based on functionality provided,
rather than a specific MCU device.
2016-07-08 10:52:22 -05:00
kYc0o
62a9773a9c boards/waspmote-pro: add support for Waspmote PRO v1.2 2016-07-05 13:05:12 +02:00
kYc0o
be70924800 cpu/atmega2560: update atmega2560 CPU code to use atmega_common code 2016-06-22 14:25:10 +02:00
kYc0o
17c78e70e2 cpu/atmega_common: add common atmega CPU code to atmega_common 2016-06-22 14:25:10 +02:00
zhuoshuguo
1cbe79a373 CPU: fix include header guards
Fix cpu/lpc2387/include/lpc2387.h
2016-06-08 16:38:20 +02:00
MohmadAyman
53df3e8b57 core: cpu: provide function to acquire ISR stack usage 2016-06-01 23:01:35 +02:00
c3f7186d4e unify usage of inline assembly 2016-03-31 22:23:35 +02:00
DipSwitch
5b5810ab7b Merge pull request #5109 from DipSwitch/pr/fix_core_inc_irq
core: Fix/refactor function naming in core/incude/irq.h
2016-03-22 08:12:24 +01:00
Joakim Nohlgård
d0033a5d20 avr: Use TARGET_ARCH instead of custom toolchain specification 2016-03-21 12:19:30 +01:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
2b010b5337 core: rename tcb_t -> thread_t, move into thread.h 2016-03-05 18:20:17 +01:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
28d9eab420 cpu: atmega_common_ add off_t to sys/types.h 2015-11-26 20:41:36 +01:00
4769c3075d cpu: avr_common: add unistd.h 2015-11-25 14:36:45 +01:00
effb15a2cc Merge pull request #3313 from gebart/pr/eINT-fixes
eINT/dINT fixes
2015-09-29 12:39:16 +02:00
Oleg Hahm
d89ac480eb atmega: added panic function 2015-09-20 21:44:26 +02:00
Joakim Gebart
199528d3fb cpu/atmega: remove dINT/eINT definitions 2015-09-19 10:35:58 +02:00
Martine Lenders
aaff370bc9 Merge pull request #3710 from authmillenon/cpu/feat/atmega-errno
atmega_common: give distinct numbers to errnos
2015-09-17 10:14:57 +02:00
7fcb2b718e cpu: atmega: implement irq_arch_in 2015-09-14 10:47:28 +02:00
Oleg Hahm
f3245cecac core: panic: last instruction's address for assert 2015-09-11 23:23:31 +02:00
Oleg Hahm
d7161b6d4b cpu: inline function to print instruction register 2015-09-11 23:23:31 +02:00
Martine Lenders
dc82939eb3 atmega_common: give distinct numbers to errnos 2015-08-25 22:07:22 +02:00
Joakim Gebart
63bde8906e cpu/atmega_common/avr-libc-extra/inttypes.h: Correct format strings for 64 bit numbers 2015-07-07 00:53:26 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
Martine Lenders
b11eb90042 Merge pull request #3005 from authmillenon/od/fix/PRI.64
od: add PRI.64 for unsupported boards
2015-05-23 10:05:59 +02:00
Martine Lenders
6d13c899c5 od: add PRI.64 for unsupported boards 2015-05-22 11:54:23 +02:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +02:00
Joakim Gebart
9ae63bac0b cpu/atmega_common/avr-libc-extra/time.h: trailing whitespace 2015-05-09 09:10:41 +02:00
Joakim Gebart
215ccc1213 core: Introduce atomic counters
- Move generic implementation of atomic_set_return to core/atomic.c
 - Generic implementation of atomic compare and swap in core/atomic.c
 - atomic_cas is used to implement atomic counters in core/include/atomic.h
 - atomic_int_t is an atomic integer type
 - ATOMIC_INIT can be used as an initializer for atomic_int_t
 - ATOMIC_VALUE gets a reference to the value of an atomic integer
2015-05-07 18:52:13 +02:00
BytesGalore
714ee38355 boards: core: cpu: drivers: sys: added missing header guards 2015-01-27 19:10:57 +01:00
Oleg Hahm
04b67f1ff0 doc: avr cleanup 2014-12-06 01:12:31 +01:00
Oleg Hahm
43c86b5a3e doc: fix remaining doxygen warnings 2014-12-04 17:16:57 +01:00
BytesGalore
a4d2ee307c cpu: added extern "C" to headers 2014-11-24 19:10:15 +01:00
René Kijewski
fdb1190cfa avr: define ssize_t 2014-11-11 10:45:56 +01:00
Oleg Hahm
c33e1b5dad Merge pull request #1844 from OlegHahm/doxygen_cleanup
Doxygen cleanup
2014-10-24 16:04:01 +02:00
Oleg Hahm
cb48f7cd47 doc: fix warning from avr libc 2014-10-23 20:53:01 +02:00
Oleg Hahm
bbf82ab254 doc: put atmega cpu file into the right group 2014-10-23 20:53:00 +02:00
Oleg Hahm
db8f3d2650 cpu: use typed function pointer for thread_arch_init 2014-10-23 18:26:21 +02:00
Martine Lenders
97bf8b09ad atmega_common: add ENOTSUP and ECANCELED to errno.h 2014-10-01 19:24:12 +02:00
René Kijewski
4e50d74272 core: Provide ssize_t in a common place
Now you can include `kernel_types.h` if you need the `ssize_t`, without
 facing problems due to the terrible MSP toolchain.
2014-09-26 14:04:30 +02:00
Hinnerk van Bruinehsen
9933dd0b78 cpu: arm/cortex-mX/atmega: use uintptr_t for sp cast 2014-09-14 02:34:04 +02:00
Hinnerk van Bruinehsen
3d686c7cf1 cpu: atmega: doxygen: blacklist upstream headers 2014-09-06 12:38:04 +02:00
Hinnerk van Bruinehsen
a6b77b4745 cpu: atmega_common: Initial import 2014-08-27 16:22:48 +02:00