Fix and update project.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 20 Dec 2011 13:55:59 +0000 (13:55 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 20 Dec 2011 13:55:59 +0000 (13:55 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5192 38d2e660-2303-0410-9eaa-f027e97ec537

16 files changed:
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_adc.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_dac.h [new file with mode: 0644]
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_http.h [new file with mode: 0644]
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_i2s.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_ini_reader.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_led_7seg.h [new file with mode: 0644]
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_lwip.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_nand.h [new file with mode: 0644]
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_proc.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_pwm.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_sd.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_ser.h
boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_wm8731.h [new file with mode: 0644]
boards/sam3x-ek/templates/sam3x-ek_empty/project.bertos
boards/sam3x-ek/templates/sam3x-ek_empty/sam3x-ek_empty.mk
boards/sam3x-ek/templates/sam3x-ek_empty/sam3x-ek_empty_user.mk

index df2587be517232fd86b9192faa5c39172c793330..62ee6ed73f34bc223e71e3c0d47003c48fc3b704 100644 (file)
  */
 #define CONFIG_ADC_STROBE  0
 
+
+/**
+ * Start up timer[s] = startup value / ADCClock [Hz]
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3_adc_sut"
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_SUT         ADC_SUT512
+
+/**
+ * Analog Settling Time[s] = settling value / ADCClock[Hz]
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3_adc_stt"
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_STTLING     ADC_AST17
+
+/**
+ * Tracking Time[s] = (TRACKTIM + 1) / ADCClock[Hz]
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_TRACKTIM    0
+
+/**
+ * Transfer Period[s] = (TRANSFER * 2 + 3) ADCClock[Hz]
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ supports = "sam3"
+ */
+#define CONFIG_ADC_TRANSFER    1
+
 #endif /* CFG_ADC_H */
diff --git a/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_dac.h b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_dac.h
new file mode 100644 (file)
index 0000000..1ae1e98
--- /dev/null
@@ -0,0 +1,88 @@
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
+ * All Rights Reserved.
+ * -->
+ *
+ * \brief Configuration file for DAC module.
+ *
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_DAC_H
+#define CFG_DAC_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define DAC_LOG_LEVEL      LOG_LVL_WARN
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define DAC_LOG_FORMAT     LOG_FMT_TERSE
+
+/**
+ * DAC Refresh Period = 1024*REFRESH/DACC Clock
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ supports = "sam3x"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 65536
+ */
+#define CONFIG_DAC_REFRESH            16
+
+/**
+ * DAC Startup Time Selection.
+ * see datasheet table.
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ supports = "sam3x"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 63
+ */
+#define CONFIG_DAC_STARTUP             0
+
+/**
+ * DAC Trigger Selection.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sam3x_dac_tc"
+ * $WIZ$ supports = "sam3x"
+ */
+#define CONFIG_DAC_TIMER  DACC_TRGSEL_TIO_CH0
+
+#endif /* CFG_DAC_H */
diff --git a/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_http.h b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_http.h
new file mode 100644 (file)
index 0000000..0aba5f0
--- /dev/null
@@ -0,0 +1,64 @@
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \brief Configuration file for the HTTP module.
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_HTTP_H
+#define CFG_HTTP_H
+
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define HTTP_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define HTTP_LOG_FORMAT     LOG_FMT_VERBOSE
+
+/**
+ * Default start page to load
+ *
+ * $WIZ$ type = "str"
+ */
+#define HTTP_DEFAULT_PAGE      "index.htm"
+
+#endif /* CFG_HTTP_H */
index 6657157e5c73704c9b2d265f6e3d4e910f3b12f2..934da1b90ea9992f122719b7313b87a0f39d6073 100644 (file)
  *
  *
  * \author Luca Ottaviano <lottaviano@develer.com>
+ * \author Daniele Basile <asterix@develer.com>
  */
 
 #ifndef CFG_I2S_H
 #define CFG_I2S_H
 
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define I2S_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define I2S_LOG_FORMAT     LOG_FMT_TERSE
+
 /**
  * Length of each play buffer.
  *
 #define CONFIG_SAMPLE_FREQ     44100UL
 
 /**
- * Module logging level.
+ * Sample bits per channel.
  *
- * $WIZ$ type = "enum"
- * $WIZ$ value_list = "log_level"
+ * $WIZ$ type = "int"
+ * * $WIZ$ min = 8
+ * $WIZ$ max = 32
  */
-#define I2S_LOG_LEVEL      LOG_LVL_INFO
+#define CONFIG_WORD_BIT_SIZE               16
 
 /**
- * Module logging format.
+ * Number of channel.
  *
- * $WIZ$ type = "enum"
- * $WIZ$ value_list = "log_format"
+ * $WIZ$ type = "int"
  */
-#define I2S_LOG_FORMAT     LOG_FMT_TERSE
+#define CONFIG_CHANNEL_NUM                  2
+
+/**
+ * Size of trasmit start delay
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 255
+ */
+#define CONFIG_DELAY                        0
+
+/**
+ * Generate frame sync every 2 x CONFIG_PERIOD bits (zero based)
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 512
+ */
+#define CONFIG_PERIOD                      15
+
+/**
+ * Number of words transmitted in frame
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 16
+ */
+#define CONFIG_WORD_PER_FRAME               1
+
+/**
+ * Size of Synchro data register (zero based)
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 15
+ */
+#define CONFIG_FRAME_SYNC_SIZE             15
+
+
+/**
+ * Extra Size of Synchro data register (CONFIG_FRAME_SYNC_SIZE + CONFIG_EXTRA_FRAME_SYNC_SIZE * 16 + 1) (zero based)
+ *
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ * $WIZ$ max = 15
+ */
+#define CONFIG_EXTRA_FRAME_SYNC_SIZE       0
 
 #endif /* CFG_I2S_H */
index d0be4389c550aa1c9dc9eda11ff9bdc5138f01b4..048139a4c6707e87dc705ecc72095b105339037c 100644 (file)
  */
 #define CONFIG_INI_MAX_LINE_LEN 64
 
+/**
+ * Make case insensitive comparisons.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_INI_CASE_INSENSITIVE    0
+
 #endif /* CFG_INI_READER_H */
diff --git a/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_led_7seg.h b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_led_7seg.h
new file mode 100644 (file)
index 0000000..d854b11
--- /dev/null
@@ -0,0 +1,80 @@
+/**
+ * \file cfg_led_7seg.h
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
+ * -->
+ *
+ * \brief Configuration file for led 7 segment display.
+ *
+ * \author Fabio Bizzi <fbizzi@bizzi.org>
+ *
+ * \addtogroup SevenSegDisplay 7 Segments LED Displays Driver
+ * \{
+ *
+ */
+
+#ifndef CFG_LED_7SEG_H
+#define CFG_LED_7SEG_H
+
+/**
+ * Use a Common Cathode display.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_LED_7SEG_CCAT       0
+
+/**
+ * Number of digit present in the LED display.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 1
+ * $WIZ$ max = 8
+ */
+#define CONFIG_LED_7SEG_DIGIT      4
+
+/**
+ * Max lenght of the string to be displayed.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 16
+ * $WIZ$ max = 255
+ */
+#define CONFIG_LED_7SEG_STRLEN     255
+
+/**
+ * Default scrolling speed (ms * CONFIG_LED_7SEG_RTIME).
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_LED_7SEG_SSPEED      10
+
+/**
+ * Default refresh time (ms).
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_LED_7SEG_RTIME      5
+
+#endif /* CFG_LED_7SEG_H */
+ /** \} */ //defgroup drivers
+
index b6b55f65269d3df5bcc07c6073240abbb54a1d7c..73acb913534f4b4c33be90e72e0a8d99ea43e2db 100644 (file)
  * $WIZ$ type = "boolean"
  */
 #define LWIP_SOCKET                     1
+#if LWIP_SOCKET
+       /*
+        * The sockets.c file requires this macro to be defined to really
+        * set errno on errors.
+        */
+       #define ERRNO
+#endif
 
 /**
  * Enable BSD-style sockets functions names.
diff --git a/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_nand.h b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_nand.h
new file mode 100644 (file)
index 0000000..bd3b262
--- /dev/null
@@ -0,0 +1,111 @@
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
+ * -->
+ *
+ * \author Stefano Fedrigo <aleph@develer.com>
+ *
+ * \brief Configuration file for NAND driver module.
+ */
+
+#ifndef CFG_NAND_H
+#define CFG_NAND_H
+
+/**
+ * Page data size
+ *
+ * Size of the data section of a programmable page in bytes.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_DATA_SIZE         2048
+
+/**
+ * Page spare area size
+ *
+ * Size of the spare section of a programmable page in bytes.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_SPARE_SIZE        64
+
+/**
+ * Pages per block
+ *
+ * Number of pages in a erase block.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_PAGES_PER_BLOCK   64
+
+/**
+ * Number of blocks
+ *
+ * Total number of erase blocks in one NAND chip.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_NUM_BLOCK        2048
+
+/**
+ * Number of reserved blocks
+ *
+ * Blocks reserved for remapping defective NAND blocks.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_NUM_REMAP_BLOCKS  128
+
+/**
+ * NAND operations timeout
+ *
+ * How many milliseconds the cpu waits for
+ * completion of NAND operations.
+ *
+ * $WIZ$ type = "int"
+ */
+#define CONFIG_NAND_TMOUT      100
+
+/**
+ * Module logging level
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define CONFIG_NAND_LOG_LEVEL      LOG_LVL_WARN
+
+/**
+ * Module logging format
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define CONFIG_NAND_LOG_FORMAT     LOG_FMT_TERSE
+
+#endif /* CFG_NAND_H */
index 3c9439fb0b002097067e74d87e98ffb16ea57e89..fca6edef6abf100c97d7ffc8d86bbff7b8a2e1a3 100644 (file)
  */
 #define CONFIG_KERN_PRI 0
 
+/**
+ * Priority-inheritance protocol.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_KERN_PRI_INHERIT 0
+
 /**
  * Dynamic memory allocation for processes.
  * $WIZ$ type = "boolean"
index 595189e64433402dfc0c33c2879385dee3f45351..68d62837c8ee73db35a3bf91e60acc068f465558 100644 (file)
  */
 #define PWM_LOG_FORMAT     LOG_FMT_VERBOSE
 
+/**
+ * Enable the OLD pwm API.
+ * Not recommended for new projects.
+ *
+ * $WIZ$ type = "boolean"
+ */
+#define CFG_PWM_ENABLE_OLD_API 1
+
 #endif /* CFG_PWM_H */
index 8c40f827113d4abca74f04d5aae8c2cae601c211..ac2abb1d39ffd67ac2567ac79f9555b68961485d 100644 (file)
  */
 #define CONFIG_SD_AUTOASSIGN_FAT   1
 
+/**
+ * SD bus mode.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "sd_mode"
+ */
+#define CONFIG_SD_MODE     SD_SPI_MODE
+
 /**
  * Enable backward compatibility for sd_init().
  * If enabled, sd_init() will allocate internally an Sd context,
index 91a10e0b2d8ade049eeb03b95150797d6728a29f..e7d5cc43d9f179db1ec9d66d2fa1adcc27af6cbf 100644 (file)
  *
  * $WIZ$ type = "enum"
  * $WIZ$ value_list = "ser_order_bit"
- * $WIZ$ supports = "avr"
+ * $WIZ$ supports = "avr and not xmega32d"
  */
 #define CONFIG_SPI_DATA_ORDER  SER_MSB_FIRST
 
 /**
  * SPI clock division factor.
  * $WIZ$ type = "int"
- * $WIZ$ supports = "avr"
+ * $WIZ$ supports = "avr and not xmega32d"
  */
 #define CONFIG_SPI_CLOCK_DIV   16
 
  * SPI clock polarity: normal low or normal high.
  * $WIZ$ type = "enum"
  * $WIZ$ value_list = "ser_spi_pol"
- * $WIZ$ supports = "avr"
+ * $WIZ$ supports = "avr and not xmega32d"
  */
 #define CONFIG_SPI_CLOCK_POL        SPI_NORMAL_LOW
 
  * sample on second clock edge.
  * $WIZ$ type = "enum"
  * $WIZ$ value_list = "ser_spi_phase"
- * $WIZ$ supports = "avr"
+ * $WIZ$ supports = "avr and not xmega32d"
  */
 #define CONFIG_SPI_CLOCK_PHASE     SPI_SAMPLE_ON_FIRST_EDGE
 
diff --git a/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_wm8731.h b/boards/sam3x-ek/templates/sam3x-ek_empty/cfg/cfg_wm8731.h
new file mode 100644 (file)
index 0000000..76280b6
--- /dev/null
@@ -0,0 +1,133 @@
+/**
+ * \file
+ * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
+ * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
+ *
+ * -->
+ *
+ * \brief Configuration file for the WM8731 module.
+ *
+ * \author Daniele Basile <asterix@develer.com>
+ */
+
+#ifndef CFG_WM8731_H
+#define CFG_WM8731_H
+
+/**
+ * Module logging level.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define WM8731_LOG_LEVEL      LOG_LVL_INFO
+
+/**
+ * Module logging format.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define WM8731_LOG_FORMAT     LOG_FMT_TERSE
+
+
+/**
+ * Digital control: ADC High pass filter
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_WM8731_DAPC     0
+
+
+/**
+ * Digital control: De-emphasis control
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "wm8731_deemp"
+ */
+#define CONFIG_WM8731_DEEMP     WM8731_DEEMP_DISABLE
+
+/**
+ * Digital control: DAC soft mute control
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_WM8731_DACMU     0
+
+
+/**
+ * Analog control: Microphone boost
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_WM8731_MICBOOST     0
+
+/**
+ * Analog control: Microphone/Line Input select to ADC
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "wm8731_insel"
+ */
+#define CONFIG_WM8731_INSEL     WM8731_INSEL_MIC
+
+
+/**
+ * Analog control: out selector
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "wm8731_bypass"
+ */
+#define CONFIG_WM8731_BYPASS     WM8731_DACSEL
+
+/**
+ * Analog control: Side tone attenuation
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "wm8731_sideatt"
+ */
+#define CONFIG_WM8731_SIDEATT     WM8731_SIDEATT_6dB
+
+
+/**
+ * Digital Audio interface format.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "wm8731_fmt"
+ */
+#define CONFIG_WM8731_INTERFACE_FORMAT    WM8731_FORMAT_I2S
+
+/**
+ * Digital Audio data bit length.
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "wm8731_databit"
+ */
+#define CONFIG_WM8731_IWL_BITS            WM8731_IWL_16_BIT
+
+/**
+ * Enable Master mode.
+ * $WIZ$ type = "boolean"
+ */
+#define CONFIG_WM8731_MS     0
+
+
+/**
+ * Data sampling rate, refer to datasheet for this value.
+ * $WIZ$ type = "hex"
+ */
+#define CONFIG_WM8731_SAMPLING_RATES     0x6
+
+#endif /* CFG_WM8731_H */
index bfc606c9fec57658cac7256beec5f22c79adc38e..719dc260b4b4bb11989474d290f92b1c3ce7f957 100644 (file)
@@ -12,7 +12,7 @@ p5
 I4
 sS'PROJECT_NAME'
 p6
-Vempty
+Vsam3x-ek_empty
 p7
 sS'TOOLCHAIN'
 p8
@@ -23,18 +23,18 @@ Varm-none-eabi-gcc
 p11
 ssS'PROJECT_SRC_PATH_FROM_MAKEFILE'
 p12
-Vboards/sam3x-ek/templates/empty
+Vboards/sam3x-ek/templates/sam3x-ek_empty
 p13
 sS'ENABLED_MODULES'
 p14
 (lp15
 S'debug'
 p16
-aS'timer'
-p17
 aS'formatwr'
-p18
+p17
 aS'lcd_hx8347'
+p18
+aS'timer'
 p19
 asS'CPU_NAME'
 p20
@@ -60,4 +60,4 @@ p29
 (lp30
 S'codelite'
 p31
-as.
+as.
\ No newline at end of file
index 2f397bbc41afa2c6566c77219fd09905e0da7c8e..2d8f22110d047b1a7188dd6b1abb409077ef4f6a 100644 (file)
@@ -1,87 +1,87 @@
 #
 # Wizard autogenerated makefile.
-# DO NOT EDIT, use the empty_user.mk file instead.
+# DO NOT EDIT, use the sam3x-ek_empty_user.mk file instead.
 #
 
 # Constants automatically defined by the selected modules
-empty_DEBUG = 1
+sam3x-ek_empty_DEBUG = 1
 
 # Our target application
-TRG += empty
+TRG += sam3x-ek_empty
 
-empty_PREFIX = "arm-none-eabi-"
+sam3x-ek_empty_PREFIX = "arm-none-eabi-"
 
-empty_SUFFIX = ""
+sam3x-ek_empty_SUFFIX = ""
 
-empty_SRC_PATH = boards/sam3x-ek/templates/empty
+sam3x-ek_empty_SRC_PATH = boards/sam3x-ek/templates/sam3x-ek_empty
 
-empty_HW_PATH = boards/sam3x-ek
+sam3x-ek_empty_HW_PATH = boards/sam3x-ek
 
-# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_CSRC INSTEAD!
-empty_WIZARD_CSRC = \
+# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_empty_USER_CSRC INSTEAD!
+sam3x-ek_empty_WIZARD_CSRC = \
+       bertos/cpu/cortex-m3/drv/timer_cm3.c \
        bertos/drv/lcd_hx8347.c \
+       bertos/drv/timer.c \
        bertos/mware/event.c \
-       bertos/cpu/cortex-m3/drv/timer_cm3.c \
        bertos/mware/formatwr.c \
-       bertos/drv/timer.c \
        bertos/mware/hex.c \
        #
 
-# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_PCSRC INSTEAD!
-empty_WIZARD_PCSRC = \
+# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_empty_USER_PCSRC INSTEAD!
+sam3x-ek_empty_WIZARD_PCSRC = \
         \
        #
 
-# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_CPPASRC INSTEAD!
-empty_WIZARD_CPPASRC = \
+# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_empty_USER_CPPASRC INSTEAD!
+sam3x-ek_empty_WIZARD_CPPASRC = \
         \
        #
 
-# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_CXXSRC INSTEAD!
-empty_WIZARD_CXXSRC = \
+# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_empty_USER_CXXSRC INSTEAD!
+sam3x-ek_empty_WIZARD_CXXSRC = \
         \
        #
 
-# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_ASRC INSTEAD!
-empty_WIZARD_ASRC = \
+# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_empty_USER_ASRC INSTEAD!
+sam3x-ek_empty_WIZARD_ASRC = \
         \
        #
 
-empty_CPPFLAGS = -D'CPU_FREQ=(84000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(empty_HW_PATH) -I$(empty_SRC_PATH) $(empty_CPU_CPPFLAGS) $(empty_USER_CPPFLAGS)
+sam3x-ek_empty_CPPFLAGS = -D'CPU_FREQ=(84000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(sam3x-ek_empty_HW_PATH) -I$(sam3x-ek_empty_SRC_PATH) $(sam3x-ek_empty_CPU_CPPFLAGS) $(sam3x-ek_empty_USER_CPPFLAGS)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_LDFLAGS = $(empty_CPU_LDFLAGS) $(empty_WIZARD_LDFLAGS) $(empty_USER_LDFLAGS)
+sam3x-ek_empty_LDFLAGS = $(sam3x-ek_empty_CPU_LDFLAGS) $(sam3x-ek_empty_WIZARD_LDFLAGS) $(sam3x-ek_empty_USER_LDFLAGS)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_CPPAFLAGS = $(empty_CPU_CPPAFLAGS) $(empty_WIZARD_CPPAFLAGS) $(empty_USER_CPPAFLAGS)
+sam3x-ek_empty_CPPAFLAGS = $(sam3x-ek_empty_CPU_CPPAFLAGS) $(sam3x-ek_empty_WIZARD_CPPAFLAGS) $(sam3x-ek_empty_USER_CPPAFLAGS)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_CSRC = $(empty_CPU_CSRC) $(empty_WIZARD_CSRC) $(empty_USER_CSRC)
+sam3x-ek_empty_CSRC = $(sam3x-ek_empty_CPU_CSRC) $(sam3x-ek_empty_WIZARD_CSRC) $(sam3x-ek_empty_USER_CSRC)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_PCSRC = $(empty_CPU_PCSRC) $(empty_WIZARD_PCSRC) $(empty_USER_PCSRC)
+sam3x-ek_empty_PCSRC = $(sam3x-ek_empty_CPU_PCSRC) $(sam3x-ek_empty_WIZARD_PCSRC) $(sam3x-ek_empty_USER_PCSRC)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_CPPASRC = $(empty_CPU_CPPASRC) $(empty_WIZARD_CPPASRC) $(empty_USER_CPPASRC)
+sam3x-ek_empty_CPPASRC = $(sam3x-ek_empty_CPU_CPPASRC) $(sam3x-ek_empty_WIZARD_CPPASRC) $(sam3x-ek_empty_USER_CPPASRC)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_CXXSRC = $(empty_CPU_CXXSRC) $(empty_WIZARD_CXXSRC) $(empty_USER_CXXSRC)
+sam3x-ek_empty_CXXSRC = $(sam3x-ek_empty_CPU_CXXSRC) $(sam3x-ek_empty_WIZARD_CXXSRC) $(sam3x-ek_empty_USER_CXXSRC)
 
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_ASRC = $(empty_CPU_ASRC) $(empty_WIZARD_ASRC) $(empty_USER_ASRC)
+sam3x-ek_empty_ASRC = $(sam3x-ek_empty_CPU_ASRC) $(sam3x-ek_empty_WIZARD_ASRC) $(sam3x-ek_empty_USER_ASRC)
 
 # CPU specific flags and options, defined in the CPU definition files.
 # Automatically generated by the wizard. PLEASE DO NOT EDIT!
-empty_CPU_CPPASRC = bertos/cpu/cortex-m3/hw/crt_cm3.S bertos/cpu/cortex-m3/hw/vectors_cm3.S 
-empty_CPU_CPPAFLAGS = -g -gdwarf-2 -mthumb -mno-thumb-interwork
-empty_CPU_CPPFLAGS = -O0 -g3 -gdwarf-2 -mthumb -mno-thumb-interwork -fno-strict-aliasing -fwrapv -fverbose-asm -Ibertos/cpu/cortex-m3/ -D__ARM_SAM3X8__
-empty_CPU_CSRC = bertos/cpu/cortex-m3/hw/init_cm3.c bertos/cpu/cortex-m3/drv/irq_cm3.c bertos/cpu/cortex-m3/drv/clock_sam3.c 
-empty_PROGRAMMER_CPU = sam3
-empty_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
-empty_CPU = cortex-m3
-empty_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
-empty_DEBUG_SCRIPT = bertos/prg_scripts/arm/debug.sh
-empty_CPU_LDFLAGS = -mthumb -mno-thumb-interwork -nostartfiles -Wl,--no-warn-mismatch -Wl,-dT bertos/cpu/cortex-m3/scripts/sam3x8_rom.ld
-empty_FLASH_SCRIPT = bertos/prg_scripts/arm/flash-sam3.sh
-
-include $(empty_SRC_PATH)/empty_user.mk
+sam3x-ek_empty_CPU_CPPASRC = bertos/cpu/cortex-m3/hw/crt_cm3.S bertos/cpu/cortex-m3/hw/vectors_cm3.S
+sam3x-ek_empty_CPU_CPPAFLAGS = -g -gdwarf-2 -mthumb -mno-thumb-interwork
+sam3x-ek_empty_CPU_CPPFLAGS = -O0 -g3 -gdwarf-2 -mthumb -mno-thumb-interwork -fno-strict-aliasing -fwrapv -fverbose-asm -Ibertos/cpu/cortex-m3/ -D__ARM_SAM3X8__
+sam3x-ek_empty_CPU_CSRC = bertos/cpu/cortex-m3/hw/init_cm3.c bertos/cpu/cortex-m3/drv/irq_cm3.c bertos/cpu/cortex-m3/drv/clock_sam3.c
+sam3x-ek_empty_PROGRAMMER_CPU = sam3
+sam3x-ek_empty_CPU_LDFLAGS = -mthumb -mno-thumb-interwork -nostartfiles -Wl,--no-warn-mismatch -Wl,-dT bertos/cpu/cortex-m3/scripts/sam3x8_rom.ld
+sam3x-ek_empty_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
+sam3x-ek_empty_CPU = cortex-m3
+sam3x-ek_empty_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
+sam3x-ek_empty_DEBUG_SCRIPT = bertos/prg_scripts/arm/debug.sh
+sam3x-ek_empty_FLASH_SCRIPT = bertos/prg_scripts/arm/flash-sam3.sh
+
+include $(sam3x-ek_empty_SRC_PATH)/sam3x-ek_empty_user.mk
index cb9088ab0cb0451dfaefb62fdf8bca23da1f1fa1..e61bde7fc322e64794220680d3cd1d6a3fff4048 100644 (file)
@@ -4,42 +4,42 @@
 #
 
 # Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help
-empty_PROGRAMMER_TYPE = none
-empty_PROGRAMMER_PORT = none
+sam3x-ek_empty_PROGRAMMER_TYPE = none
+sam3x-ek_empty_PROGRAMMER_PORT = none
 
 # Files included by the user.
-empty_USER_CSRC = \
-       $(empty_SRC_PATH)/main.c \
+sam3x-ek_empty_USER_CSRC = \
+       $(sam3x-ek_empty_SRC_PATH)/main.c \
        bertos/cpu/cortex-m3/drv/dmac_sam3.c \
        bertos/cpu/cortex-m3/drv/hsmci_sam3.c \
        #
 
 # Files included by the user.
-empty_USER_PCSRC = \
+sam3x-ek_empty_USER_PCSRC = \
        #
 
 # Files included by the user.
-empty_USER_CPPASRC = \
+sam3x-ek_empty_USER_CPPASRC = \
        #
 
 # Files included by the user.
-empty_USER_CXXSRC = \
+sam3x-ek_empty_USER_CXXSRC = \
        #
 
 # Files included by the user.
-empty_USER_ASRC = \
+sam3x-ek_empty_USER_ASRC = \
        #
 
 # Flags included by the user.
-empty_USER_LDFLAGS = \
+sam3x-ek_empty_USER_LDFLAGS = \
        #
 
 # Flags included by the user.
-empty_USER_CPPAFLAGS = \
+sam3x-ek_empty_USER_CPPAFLAGS = \
        #
 
 # Flags included by the user.
-empty_USER_CPPFLAGS = \
+sam3x-ek_empty_USER_CPPFLAGS = \
        -fno-strict-aliasing \
        -fwrapv \
        #