Update example project to new bertos api.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 8 Nov 2010 10:25:55 +0000 (10:25 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 8 Nov 2010 10:25:55 +0000 (10:25 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4532 38d2e660-2303-0410-9eaa-f027e97ec537

boards/at91sam7x-ek/examples/sd_fat/cfg/cfg_adc.h
boards/at91sam7x-ek/examples/sd_fat/cfg/cfg_debug.h
boards/at91sam7x-ek/examples/sd_fat/cfg/cfg_fat.h
boards/at91sam7x-ek/examples/sd_fat/cfg/cfg_lcd_hd44.h
boards/at91sam7x-ek/examples/sd_fat/cfg/cfg_xmodem.h
boards/at91sam7x-ek/examples/sd_fat/main.c
boards/at91sam7x-ek/examples/sd_fat/project.bertos
boards/at91sam7x-ek/examples/sd_fat/sd_fat.mk

index 90aeb7bdfd13119341ca045ebf4d4ccb117eaa7c..df2587be517232fd86b9192faa5c39172c793330 100644 (file)
 
 /**
  * Clock Frequency for ADC conversion.
+ * This frequency will be rounded down to an integer
+ * submultiple of CPU_FREQ.
  *
  * $WIZ$ type = "int"
  * $WIZ$ supports = "at91"
+ * $WIZ$ max = 5000000
  */
 #define CONFIG_ADC_CLOCK        4800000UL
 
  * Minimum time for starting up a conversion [us].
  *
  * $WIZ$ type = "int"
- * $WIZ$ min = 0
+ * $WIZ$ min = 20
  * $WIZ$ supports = "at91"
  */
 #define CONFIG_ADC_STARTUP_TIME 20
 
 /**
- * Minimum time for sample and hold [us].
+ * Minimum time for sample and hold [ns].
  *
  * $WIZ$ type = "int"
- * $WIZ$ min = 0
+ * $WIZ$ min = 600
  * $WIZ$ supports = "at91"
  */
 #define CONFIG_ADC_SHTIME       834
index 7ea52a0b72df7be900b58330a237448bd32ed094..10639848f13d4d660778b5b0f542fad3dbbba055 100644 (file)
  */
 #define CONFIG_KDEBUG_BAUDRATE  115200UL
 
+/**
+ * Clock source for the UART module. You need to write the code to reprogram the respective clock at the required frequency in your project before calling kdbg_init().
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "kdbg_clk_src"
+ * $WIZ$ supports = "msp430"
+ */
+#define CONFIG_KDEBUG_CLOCK_SOURCE  KDBG_UART_SMCLK
+
+/**
+ * Clock frequency. (Only if different from MCLK's frequency, otherwise leave it zero)
+ * $WIZ$ type = "int"; min = 0
+ * $WIZ$ supports = "msp430"
+ */
+#define CONFIG_KDEBUG_CLOCK_FREQ 0UL
+
 #endif /* CFG_DEBUG_H */
index 83772f45047a2d37e8dc8e3d41d9a8f99a2b07b3..fcd717af3591aede4c4b578bab04e6f794d445c2 100644 (file)
 #ifndef CFG_FAT_H
 #define CFG_FAT_H
 
+/**
+ * Module logging level.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_level"
+ */
+#define FAT_LOG_LEVEL      LOG_LVL_ERR
+
+/**
+ * Module logging format.
+ *
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "log_format"
+ */
+#define FAT_LOG_FORMAT     LOG_FMT_VERBOSE
+
+
 /**
  * Use word alignment to access FAT structure.
  * $WIZ$ type = "boolean"
index 78f1f20bb9088b5accd1772a37401e939b29b0b6..7bea43766328eb6b69640e8c29210cc2289f4a06 100644 (file)
  */
 #define CONFIG_LCD_ADDRESS_FAST    1
 
+/**
+ * Number of columns in LCD display. 
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "lcd_hd44_cols"
+ */
+#define CONFIG_LCD_COLS        LCD_HD44_COLS_16
+
+/**
+ * Number of rows in LCD display. 
+ * $WIZ$ type = "enum"
+ * $WIZ$ value_list = "lcd_hd44_rows"
+ */
+#define CONFIG_LCD_ROWS        LCD_HD44_ROWS_2
+
 #endif /* CFG_LCD_H */
 
index c17bda624c436c8254ace0db9faf25816d729845..38db7359a17e9208be9c5c36e31be52aa76ad3fd 100644 (file)
@@ -32,7 +32,6 @@
  *
  * \brief Configuration file for xmodem module.
  *
- *
  * \author Daniele Basile <asterix@develer.com>
  */
 
index 3d719272ac318660d0cbec1a674c6bf7a8d76fcf..c51da3e64d776a8ddfe6d56450d75e41c16eb3de 100644 (file)
@@ -263,7 +263,7 @@ int main(void)
                INISetting ini_set;
                memset(&ini_set, 0, sizeof(ini_set));
 
-               sd_ok = sd_init(&sd, &spi_dma.fd, 1);
+               sd_ok = sd_init(&sd, &spi_dma.fd, 0);
 
                if (sd_ok)
                {
index 4834b5720562a85a9f099a50a76f3b4ef5495ceb..34b2024bdd5ca072ef7d8b139affe64ea063ec3d 100644 (file)
@@ -44,29 +44,29 @@ p21
 ssS'ENABLED_MODULES'
 p22
 (lp23
-S'ser'
+S'adc'
 p24
-aS'tmp123'
+aS'fat'
 p25
-aS'formatwr'
+aS'tmp123'
 p26
-aS'sd'
+aS'ini_reader'
 p27
-aS'adc'
+aS'debug'
 p28
-aS'sprintf'
+aS'ser'
 p29
 aS'kfile'
 p30
-aS'fat'
+aS'sprintf'
 p31
 aS'timer'
 p32
-aS'kfilefifo'
+aS'formatwr'
 p33
-aS'ini_reader'
+aS'kfilefifo'
 p34
-aS'debug'
+aS'sd'
 p35
 asS'CPU_NAME'
 p36
index 6a0cf557ea0e49522ea0c88bcc6db4d7eac03e9f..32ca7a26e331ac07821d38a258316f1a4b0c05d9 100644 (file)
@@ -19,27 +19,29 @@ sd_fat_HW_PATH = boards/at91sam7x-ek
 
 # Files automatically generated by the wizard. DO NOT EDIT, USE sd_fat_USER_CSRC INSTEAD!
 sd_fat_WIZARD_CSRC = \
+       bertos/fs/fatfs/diskio.c \
        bertos/cpu/arm/drv/timer_at91.c \
-       bertos/struct/kfile_fifo.c \
-       bertos/fs/fat.c \
-       bertos/kern/kfile.c \
-       bertos/drv/tmp123.c \
-       bertos/mware/ini_reader.c \
-       bertos/cpu/arm/drv/sysirq_at91.c \
-       bertos/cpu/arm/drv/adc_arm.c \
+       bertos/mware/sprintf.c \
+       bertos/cpu/arm/drv/adc_at91.c \
+       bertos/io/kfile.c \
        bertos/cpu/arm/drv/ser_arm.c \
-       bertos/cpu/arm/drv/timer_arm.c \
        bertos/cpu/arm/drv/ser_at91.c \
        bertos/drv/adc.c \
-       bertos/mware/sprintf.c \
        bertos/drv/timer.c \
        bertos/fs/fatfs/ff.c \
-       bertos/mware/event.c \
-       bertos/cpu/arm/drv/adc_at91.c \
-       bertos/mware/formatwr.c \
        bertos/drv/ser.c \
        bertos/mware/hex.c \
+       bertos/drv/tmp123.c \
+       bertos/mware/ini_reader.c \
+       bertos/cpu/arm/drv/adc_arm.c \
+       bertos/struct/kfile_fifo.c \
+       bertos/mware/formatwr.c \
        bertos/drv/sd.c \
+       bertos/io/kblock.c \
+       bertos/mware/event.c \
+       bertos/cpu/arm/drv/sysirq_at91.c \
+       bertos/cpu/arm/drv/timer_arm.c \
+       bertos/fs/fat.c \
        #
 
 # Files automatically generated by the wizard. DO NOT EDIT, USE sd_fat_USER_PCSRC INSTEAD!