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

54 Commits

Author SHA1 Message Date
Marian Buschsieweke
675dcc381c
cpu/msp430: rework MSP430 x1xx periph drivers
- Move common code for USART (shared SPI / UART peripheral) to its
  own file and allow sharing the USART peripheral to provide both
  UART and SPI in round-robin fashion.
- Configure both UART and SPI bus via a `struct` in the board's
  `periph_conf.h`
    - this allows allocating the two UARTs as needed by the use case
    - since both USARTs signals have a fixed connection to a single
      GPIO, most configuration is moved to the CPU
    - the board now only needs to decide which bus is provided by
      which USART

Note: Sharing an USART used as UART requires cooperation from the app:
- If the UART is used in TX-only mode (no RX callback), the driver
  will release the USART while not sending
- If the UART is used to also receive, the application needs to power
  the UART down while not expecting something to send. An
  `spi_acquire()` will be blocked while the UART is powered up.
2024-01-22 16:59:23 +01:00
Marian Buschsieweke
b51ea4ca24
boards: clean up MSP430 board configuration
Move common configuration for MSP430 based boards to
`boards/common/msp430` and make use of that.
2023-12-10 09:11:24 +01:00
Marian Buschsieweke
7044699388
cpu/msp430: improve periph_timer
- add support for multiple timers
- add support for selecting clock source in the board's `periph_conf.h`
- add support for the prescaler
- implement `periph_timer_query_freqs`
- add a second timer to all MSP430 boards
    - the first timer is fast ticking, high-power
    - the second is slow ticking, low-power
2023-12-10 09:11:23 +01:00
Marian Buschsieweke
45b353c6ef
cpu/msp430: make use of vendor header files
The MSP430 vendor files already provide macros containing register
constants and symbols (provided via linker scripts) containing addresses
of peripheral registers. So lets make use of that rather than
maintaining a long list of constants.
2023-07-04 20:21:05 +02:00
Marian Buschsieweke
ff7f8ae2f0
cpu/msp430: reorganize code
RIOT supports two distinct families of the MSP430: The [MSP430 x1xx]
MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible
MCU families the code was located in the msp430fxyz folder, resulting
in case of the UART driver in particularly bizarre code looking roughly
like this:

    #ifndef UART_USE_USCI
    /* implementation of x1xx peripheral ... */
    #else
    /* implementation of F2xx/G2xx peripheral ... */
    #endif
    /* zero shared code between both variants */

This splits the peripheral drivers for USCI and USART serial IP blocks
into separate files and relocates everything in cpu/msp430, similar to
how cpu/stm32 is organized.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf
2023-06-19 17:14:57 +02:00
Marian Buschsieweke
498668af02
boards: drop unused INFOMEM define 2023-06-08 23:42:50 +02:00
Marian Buschsieweke
df5c319978
cpu/msp430fxyz: clean up clock initialization
Provide a common clock initialization driver rather than leaving
clock initialization to the boards code. A declarative description of
the board's clock configuration using a struct does still allow to
fine-tune settings. In addition, a board is still allowed to just
provide a custom `void clock_init(void)` if there really is the need
to do crazy things.
2023-05-16 10:05:09 +02:00
Marian Buschsieweke
81ebcb5b43
boards/telosb: clean up code
Move the periph configuration from board.h to periph_conf.h as indicated
by the todo note there.
2023-05-04 22:16:22 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
MrKevinWeiss
cd7588b132 boards/telosb: Remove unused UART_x_EN macro 2020-09-09 10:25:37 +02:00
02b1cf170f boards/telosb: fix typos 2019-11-23 22:39:35 +01:00
Hauke Petersen
c2184f3454 boards/cpu/drivers/sys: use generic stdio_ if 2018-08-22 10:54:25 +02:00
Jose Alamos
7b28fbf110 boards: fix Doxygen group directives 2018-08-01 15:24:55 +02:00
1788444f5f boards/telosb: fix driver params usage 2018-02-28 18:31:14 +01:00
Hauke Petersen
65194d1c38 boards: use default value for XTIMER_DEV and _CHAN 2017-08-28 16:32:39 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
882bcff048 boards: replace @brief with @name when necessary 2017-04-13 12:10:30 +02:00
Bas Stottelaar
3b14a584b8 boards: *: remove SPI_*_EN now rework is merged 2017-01-31 19:38:41 +01:00
ebc35a0613 boards: fix doxygen @brief in periph.conf 2017-01-27 10:31:56 +01:00
Hauke Petersen
d5e00e594a cpu/msp430fxyz+boards: adapted to new SPI API
- adapted the SPI driver
- adapted all boards using the CPU
2017-01-25 16:46:05 +01:00
Oleg Hahm
3c6678b037 *: fix mismatching endifs for header guards 2017-01-19 18:30:53 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
PeterKietzmann
5c1c61d634 boards/telosb: add cc2420 configuration 2016-10-07 17:06:56 +02:00
Joakim Nohlgård
4d862955c2 xtimer: Rename XTIMER -> XTIMER_DEV 2016-07-06 22:23:04 +02:00
46bd2f45d9 sys: xtimer: replace XTIMER_MASK with XTIMER_WIDTH in board config 2016-07-06 18:16:15 +02:00
Ian Martin
963f8a495d sys/xtimer: eliminate XTIMER_SHIFT_ON_COMPARE 2016-04-18 12:06:20 -04:00
Hauke Petersen
f5fb3bfb2e boards/telosb: changed default baudrate to 9600 2016-04-01 11:21:41 +02:00
Hauke Petersen
363b883d51 boards: fixed doxygen in msp430 and x86 board.h 2016-03-15 18:37:54 +01:00
Hauke Petersen
45d059cb24 boards/telosb: unified LED defines 2016-03-15 18:37:53 +01:00
Hauke Petersen
db25206a58 boards: use default values for STDIO defines 2016-01-05 12:08:31 +01:00
Hauke Petersen
c62f39aa54 boards/telosb: adjusted to UART changes 2015-10-27 14:59:39 +01:00
Hauke Petersen
e395dfd91e boards: s/GPIO(x,y)/GPIO_PIN(x,y)/ 2015-10-13 14:59:53 +02:00
Hauke Petersen
a3e11cad93 boards: s/TIMER_DEV/TIMER_BASE/ for msp430 boards 2015-09-17 13:57:58 +02:00
Thomas Eichinger
8e29c56e53 telosb: add SPI periph_conf definitions 2015-09-17 11:32:38 +02:00
44cdec0e1e boards: msp430*: added (x)timer XTIMER_SHIFT_ON_COMPARE values 2015-09-16 11:13:41 +02:00
83fb012772 boards: telosb: remove hwtimer from board.h 2015-09-16 10:58:53 +02:00
Hauke Petersen
178b46c877 boards/telosb: now using periph UART driver 2015-09-03 12:00:33 +02:00
Hauke Petersen
a053716e4b board/telosb: added (x)timer configuration 2015-09-02 17:10:28 +02:00
830af458ea oldnet: remove radio_packet_length_t define 2015-08-06 12:13:18 +02:00
Oleg Hahm
5ca37400b8 boards: remove all C++ comments 2015-06-24 15:54:36 +02:00
BigDaddyD
b6bd067863 boards: removed leading underscores from macros
* also added a trailing underscore to header guards for consistency

Commit for PR 2623, repairing header file include guards.
This PR is intended to fix the include guards in files under RIOT/boards

SQUASH ME: fix underscore removal overdos

SQUASH ME: consistent macro naming

SQUASH ME: missed that one

SQUASH ME: fixed overdo

SQUASH ME: consistency
2015-06-24 15:54:36 +02:00
Oleg Hahm
f7b197007d travis: make travis happy for empty header files 2014-12-16 17:02:44 +01:00
Oleg Hahm
ed54a5765a boards: created periph-conf.h for remaining boards 2014-12-16 17:02:44 +01:00
Oleg Hahm
39abba1bc2 licenses: fix miss-spelled & missing boiler plates 2014-11-10 18:59:55 +01:00
BytesGalore
fc56535dd3 boards: add extern "C" to header files 2014-10-31 11:27:59 +01:00
Oleg Hahm
3c0d91720b Revert "boards: introduced a HAS_RADIO define"
This reverts commit 4238f40429.
2014-10-30 23:13:52 +01:00
Oleg Hahm
4238f40429 boards: introduced a HAS_RADIO define 2014-10-30 17:52:37 +01:00
Oleg Hahm
481d4f2ee3 doc: fix ambiguous file name warnings
doxygen does a good job itself, identifying the unique part of the path
to identify a file.
2014-10-23 20:53:00 +02:00
Cenk Gündoğan
7ca2e874e1 converting tabs to spaces in boards (#1439)
This PR converts tabs to white spaces.
The statement I used for the conversion:
'''find . -name "*.[ch]" -exec zsh -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;'''
Afterwards, I had a quick overview of the converted files to prevent odd indentation.
2014-07-31 20:34:28 +02:00
Thomas Eichinger
2ce6f8ddbb fixes bug in telosb board.h introduced by PR #459 2014-01-21 15:01:05 +01:00