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

27 Commits

Author SHA1 Message Date
Francisco Molina
bc737a1f76
cpu/cc2538: add periph_uart_nonblocking
Add periph_uart_nonblocking. Since cc2538 has a transmit FIFO write
to the FIFO first and to a tsrb buffer only when the transmit FIFO
is full.

Rely on the FIFO TXIFLSEL condition to fill up FIFO as space becomes
available.
2020-12-11 09:36:16 +01:00
6e658868e0
cpu/cc2538: enable UART IRQ only if cb is not NULL 2020-11-28 10:30:33 +01:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Francisco Molina
da171f2254
cpu/cc2538/uart: uart_write wait for all bytes to be sent
uart_write should block until all bytes are sent out, so wait for
transmit fifo to empty before returning.
2020-07-22 12:56:12 +02:00
Dylan Laduranty
077a15f254 cpu/cc2538: use generic hw fc module 2020-03-10 14:22:34 +01:00
MrKevinWeiss
0aa6b04249 cpu/cc2538: Add periph_uart_mode implementation
This commit adds the periph_uart_mode USEMODULE
It implements all functionality defined in the common uart driver
This means all parity modes, data bits, and stop bits
2019-05-15 09:26:56 +02:00
danpetry
cd449e388b cpu/cc2538: Adapted UART driver incl. board config
Changed the style of the UART configuration for different boards,
from a define based configuration to one based on an array of
structs, one struct for each UART, with the format of the struct defined
in cc2538/include/periph_cpu.h.

  - Defined the fields of the struct in periph_cpu.h
  - Removed the compilation includes that were in uart.c for each UART
  - Implemented a generic ISR subroutine for clarity
  - combined uart_base and uart_init in uart.c
  - used bitmask for the interrupt setup
  - took the uart Rx, Tx, and IRQ numbers out of the config
  (as this has to match the .dev field). Replaced with
  macros from the uart number
  - took out some unused code
  - implemented power on/off commands
  - removed reset function - now bytes are just discarded on error
  - Rx now not initialised if Rx callback = NULL, as per
  drivers/periph/uart.h
  - device is now enabled after callbacks are set, not before
  - asserts raised if rts and cts are enabled for UART0
  - BIT macro removed
2018-02-08 14:36:51 +01:00
smlng
ba324ef07c cpu, cc2538: adapt uart to RIOT gpio API 2017-12-14 10:32:04 +01:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
Hauke Petersen
3a00fe8e49 cpus: make use of cortexm_isr_end() 2016-12-21 11:28:46 +01:00
Hauke Petersen
2eebf36eb2 cpu/uart: make use of named return values 2016-10-28 10:32:00 +02:00
Ian Martin
a553fe0f84 cpu/cc2538: fix build errors when UART1 or the 32 kHz crystal is enabled 2016-03-28 17:31:58 -04:00
Ian Martin
705879741c cpu/cc2538: use the MCU's default UART FIFO interrupt levels 2016-03-07 17:52:06 -05:00
Ian Martin
5f05a956db cpu/cc2538: clear only the latched UART interrupt flags
Otherwise incoming bytes can remain in the receive FIFO indefinitely.
2016-03-07 17:52:06 -05:00
Ian Martin
04bd6e5f7c cpu/cc2538: avoid using bitfields with the LCRH register
Otherwise the UART ignores the new baudrate divisor.
2016-02-26 11:42:32 -05:00
Oleg Hahm
4780b5cba1 cc2538: fix pedantic compiler warnings 2015-12-07 20:28:53 +01:00
Hauke Petersen
a58d577cb1 cpu/cc2538: adapted UART driver 2015-10-27 14:59:38 +01:00
Ian Martin
40b93ea6ad cpu/cc2538: uart init overhaul 2015-09-29 12:26:13 -04:00
Ian Martin
aca53006b0 cpu/cc2538: preserve UART_CTL flags when clearing an error condition 2015-09-29 12:26:13 -04:00
Ian Martin
b2c51bed6a cpu/cc2538: eliminate unused macros UART_1_CTS_PORT and UART_1_RTS_PORT 2015-09-29 12:26:13 -04:00
Ian Martin
d70705f840 cpu/cc2538: round when computing the UART baudrate divisor 2015-09-29 12:26:13 -04:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +02:00
Hauke Petersen
e7fbaf3815 cpu: removed NAKED attribute from ISRs
- removed the __attribute__((naked)) from ISRs
- removed ISR_ENTER() and ISR_EXIT() macros

Rationale: Cortex-Mx MCUs save registers R0-R4 automatically
on calling ISRs. The naked attribute tells the compiler not
to save any other registers. This is fine, as long as the
code in the ISR is not nested. If nested, it will use also
R4 and R5, which will then lead to currupted registers on
exit of the ISR. Removing the naked will fix this.
2014-10-30 19:33:32 +01:00
Hauke Petersen
9051c7be4b Merge pull request #1861 from haukepetersen/fix_cc2538_irqvector
cpu/cc2538: cleaned up IRQ vector definition
2014-10-24 14:40:10 +02:00
Hauke Petersen
ca20603d54 cpu/cc2538: made ISR names configurable by a board 2014-10-24 14:00:53 +02:00
Hauke Petersen
ccd601b429 cpu/cc2538: centralized all cpu specific includes
- added all CPU specific includes to cpu-conf.h
- removed now not needed includes from cpu .c files
2014-10-23 14:04:57 +02:00
Ian Martin
0605a7eb95 Add support for the Texas Instruments CC2538 ARM Cortex-M3 MCU and developer kit. 2014-10-13 09:29:49 -04:00