From 00b69b8c107e75eb31255d60916fcbc374ba9b10 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 13 May 2011 18:14:26 -0400 Subject: Docs: More complete board-specific values list. --- docs/source/lang/api/board-values.rst | 41 +++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) (limited to 'docs/source/lang') diff --git a/docs/source/lang/api/board-values.rst b/docs/source/lang/api/board-values.rst index 05e3837..5fbf20f 100644 --- a/docs/source/lang/api/board-values.rst +++ b/docs/source/lang/api/board-values.rst @@ -1,10 +1,12 @@ .. _lang-board-values: -Board-Specific Constants -======================== +Board-Specific Values +===================== There are a number of board-specific values: constants or variables -which are different depending on which LeafLabs board you have. +which are different depending on which LeafLabs board you have. The +exact values for each board are given in your :ref:`board's hardware +documentation `. This page lists and documents the board-specific values. You should use these when appropriate in your own programs. This will help make @@ -21,14 +23,21 @@ Documentation `. Constants --------- +.. TODO [systick.rst] Add a link to systick.rst instead of systick.h +.. below, when systick.rst exists. + +- ``CYCLES_PER_MICROSECOND``: Number of CPU cycles per microsecond on + your board. + - ``CLOCK_SPEED_MHZ``: Clock speed of your board, in megahertz (MHz). This is the same as ``CYCLES_PER_MICROSECOND``. - ``CLOCK_SPEED_HZ``: Clock speed of your board, in hertz (Hz). This - is the same as ``CLOCK_SPEED_MHZ * 1000000``. + is the same as ``CLOCK_SPEED_MHZ`` × 1,000,000. -- ``CYCLES_PER_MICROSECOND``: Number of CPU cycles per microsecond on - your board. +- ``SYSTICK_RELOAD_VAL``: Value used when reloading the :ref:`SysTick + ` timer's counter. For :ref:`lang-millis` to work + properly, this must be ``CYCLES_PER_MICROSECOND`` × 1,000 - 1. .. _lang-board-values-but: @@ -70,7 +79,7 @@ Constants .. _lang-board-values-usart: -- USART (serial port) related constants: +- :ref:`USART ` (serial port) related constants: * ``BOARD_USART1_TX_PIN``, ``BOARD_USART2_TX_PIN``, ``BOARD_USART3_TX_PIN``: TX pins for the 3 USARTS. @@ -87,6 +96,24 @@ Constants * ``BOARD_NR_USARTS``: Number of serial ports on the board. This number includes UARTs 4 and 5 if they are available. +- :ref:`SPI ` related constants: + + * ``BOARD_SPI1_NSS_PIN``, ``BOARD_SPI1_MOSI_PIN``, + ``BOARD_SPI1_MISO_PIN``, ``BOARD_SPI1_SCK_PIN``: SPI1 + peripheral's NSS, MOSI, MISO, and SCK pins, respectively. + + * ``BOARD_SPI2_NSS_PIN``, ``BOARD_SPI2_MOSI_PIN``, + ``BOARD_SPI2_MISO_PIN``, ``BOARD_SPI2_SCK_PIN``: SPI2 + peripheral's NSS, MOSI, MISO, and SCK pins, respectively. + + * ``BOARD_SPI3_NSS_PIN``, ``BOARD_SPI3_MOSI_PIN``, + ``BOARD_SPI3_MISO_PIN``, ``BOARD_SPI3_SCK_PIN``: SPI3 + peripheral's NSS, MOSI, MISO, and SCK pins, respectively + (available on high-density devices like Maple Native and Maple + RET6 edition only). + + * ``BOARD_NR_SPI``: Number of SPI peripherals on the board. + .. _lang-board-values-debug: - Debug (JTAG, SW-Debug) related constants: ``BOARD_JTMS_SWDIO_PIN``, -- cgit v1.2.3