From 305600095e208997dbdc4f7a0008af29d3d8bfcb Mon Sep 17 00:00:00 2001 From: asterix Date: Wed, 12 May 2010 10:51:16 +0000 Subject: [PATCH] Update hw files and cfg. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3659 38d2e660-2303-0410-9eaa-f027e97ec537 --- .../examples/gps/cfg/cfg_context_switch.h | 62 +++++++++++++++++ .../examples/gps/cfg/cfg_hashtable.h | 52 ++++++++++++++ .../ek-lm3s1968/examples/gps/cfg/cfg_keytag.h | 61 +++++++++++++++++ .../ek-lm3s1968/examples/gps/cfg/cfg_parser.h | 46 +++++++++++++ boards/ek-lm3s1968/examples/gps/cfg/cfg_pid.h | 57 ++++++++++++++++ .../examples/gps/cfg/cfg_spi_dma.h | 68 +++++++++++++++++++ boards/ek-lm3s1968/hw/hw_led.h | 56 +++++++++++++++ 7 files changed, 402 insertions(+) create mode 100644 boards/ek-lm3s1968/examples/gps/cfg/cfg_context_switch.h create mode 100644 boards/ek-lm3s1968/examples/gps/cfg/cfg_hashtable.h create mode 100644 boards/ek-lm3s1968/examples/gps/cfg/cfg_keytag.h create mode 100644 boards/ek-lm3s1968/examples/gps/cfg/cfg_parser.h create mode 100644 boards/ek-lm3s1968/examples/gps/cfg/cfg_pid.h create mode 100644 boards/ek-lm3s1968/examples/gps/cfg/cfg_spi_dma.h create mode 100644 boards/ek-lm3s1968/hw/hw_led.h diff --git a/boards/ek-lm3s1968/examples/gps/cfg/cfg_context_switch.h b/boards/ek-lm3s1968/examples/gps/cfg/cfg_context_switch.h new file mode 100644 index 00000000..46abc5d2 --- /dev/null +++ b/boards/ek-lm3s1968/examples/gps/cfg/cfg_context_switch.h @@ -0,0 +1,62 @@ +/** + * \file + * + * + * \brief Configuration file for the context switch benchmark. + * + * \author Daniele Basile + */ + +#ifndef CFG_CONTEXT_SWITCH_H +#define CFG_CONTEXT_SWITCH_H + +/** + * Use hp timer for the bechmark, otherwise it use + * one led. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_USE_HP_TIMER 1 + + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_CTX_DEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_CTX_DEBUG_BAUDRATE 115200UL + +#endif /* CFG_CONTEXT_SWITCH_H */ diff --git a/boards/ek-lm3s1968/examples/gps/cfg/cfg_hashtable.h b/boards/ek-lm3s1968/examples/gps/cfg/cfg_hashtable.h new file mode 100644 index 00000000..7560617d --- /dev/null +++ b/boards/ek-lm3s1968/examples/gps/cfg/cfg_hashtable.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for hashtable module. + * + * \author Daniele Basile + */ + +#ifndef CFG_HASHTABLE_H +#define CFG_HASHTABLE_H + +/** + * Enable/disable support to declare special hash tables which maintain a copy of + * the key internally instead of relying on the hook to extract it from the data. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_HT_OPTIONAL_INTERNAL_KEY 1 + +#endif /* CFG_HASHTABLE_H */ + + + diff --git a/boards/ek-lm3s1968/examples/gps/cfg/cfg_keytag.h b/boards/ek-lm3s1968/examples/gps/cfg/cfg_keytag.h new file mode 100644 index 00000000..8bedadf6 --- /dev/null +++ b/boards/ek-lm3s1968/examples/gps/cfg/cfg_keytag.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief Configuration file for keytag module. + * + * \author Daniele Basile + */ + +#ifndef CFG_KEYTAG_H +#define CFG_KEYTAG_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_KEYTAG_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_KEYTAG_LOG_FORMAT LOG_FMT_TERSE + +/** + * Max buffer lenght + * $WIZ$ type = "int" + */ +#define CONFIG_TAG_MAX_LEN 14U + +#endif /* CFG_KEYTAG_H */ + diff --git a/boards/ek-lm3s1968/examples/gps/cfg/cfg_parser.h b/boards/ek-lm3s1968/examples/gps/cfg/cfg_parser.h new file mode 100644 index 00000000..572b4a24 --- /dev/null +++ b/boards/ek-lm3s1968/examples/gps/cfg/cfg_parser.h @@ -0,0 +1,46 @@ +/** + * \file + * + * + * \brief Configuration file for parser module. + * + * \author Daniele Basile + */ + +#ifndef CFG_PARSER_H +#define CFG_PARSER_H + + + +#endif /* CFG_PARSER_H */ + + + diff --git a/boards/ek-lm3s1968/examples/gps/cfg/cfg_pid.h b/boards/ek-lm3s1968/examples/gps/cfg/cfg_pid.h new file mode 100644 index 00000000..5a8375bb --- /dev/null +++ b/boards/ek-lm3s1968/examples/gps/cfg/cfg_pid.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for PWM module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PID_H +#define CFG_PID_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define PID_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define PID_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PID_H */ diff --git a/boards/ek-lm3s1968/examples/gps/cfg/cfg_spi_dma.h b/boards/ek-lm3s1968/examples/gps/cfg/cfg_spi_dma.h new file mode 100644 index 00000000..0a69f757 --- /dev/null +++ b/boards/ek-lm3s1968/examples/gps/cfg/cfg_spi_dma.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for spi dma module. + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef CFG_SPI_DMA_H +#define CFG_SPI_DMA_H + +/** + * Size of the outbound FIFO buffer for SPI DMA [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_SPI_DMA_TXBUFSIZE 512 + + +/** + * Max size received for each DMA transfer [bytes]. + * Longer buffers will be split in two or more transfers of this size. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_SPI_DMA_MAX_RX 512 + + +/** + * Default transmit timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SPI_DMA_TX_TIMEOUT -1 + + +#endif /* CFG_SER_H */ diff --git a/boards/ek-lm3s1968/hw/hw_led.h b/boards/ek-lm3s1968/hw/hw_led.h new file mode 100644 index 00000000..507ebe6f --- /dev/null +++ b/boards/ek-lm3s1968/hw/hw_led.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Led on/off macros. + * + * \author Daniele Basiel + */ + +#ifndef HW_LED_H +#define HW_LED_H + +#include + +#include + +#define LED_ON() GPIO_PORTG_DATA_R |= BV(2) +#define LED_OFF() GPIO_PORTG_DATA_R &= ~BV(2) + +#define LED_INIT() \ + do { \ + SYSCTL_RCGC2_R = SYSCTL_RCGC2_GPIOG; \ + (void)SYSCTL_RCGC2_R; \ + GPIO_PORTG_DIR_R = BV(2); \ + GPIO_PORTG_DEN_R = BV(2); \ + } while(0) + +#endif /* HW_LED_H */ -- 2.25.1