From 327e0ae4dd9088fc23bdb2bc230d43d1f1ca4a74 Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 22 Mar 2011 14:42:08 +0000 Subject: [PATCH] Update to new name. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4795 38d2e660-2303-0410-9eaa-f027e97ec537 --- .../sam3x-ek_display/cfg/cfg_led_7seg.h | 80 +++++++++++++++++++ .../sam3x-ek_display/sam3x-ek_display.mk | 78 +++++++++--------- .../sam3x-ek_display/sam3x-ek_display_user.mk | 24 +++--- 3 files changed, 130 insertions(+), 52 deletions(-) create mode 100644 boards/sam3x-ek/examples/sam3x-ek_display/cfg/cfg_led_7seg.h diff --git a/boards/sam3x-ek/examples/sam3x-ek_display/cfg/cfg_led_7seg.h b/boards/sam3x-ek/examples/sam3x-ek_display/cfg/cfg_led_7seg.h new file mode 100644 index 00000000..d854b11d --- /dev/null +++ b/boards/sam3x-ek/examples/sam3x-ek_display/cfg/cfg_led_7seg.h @@ -0,0 +1,80 @@ +/** + * \file cfg_led_7seg.h + * + * + * \brief Configuration file for led 7 segment display. + * + * \author Fabio Bizzi + * + * \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 + diff --git a/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display.mk b/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display.mk index d1145926..8e22b906 100644 --- a/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display.mk +++ b/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display.mk @@ -1,24 +1,24 @@ # # Wizard autogenerated makefile. -# DO NOT EDIT, use the display_user.mk file instead. +# DO NOT EDIT, use the sam3x-ek_display_user.mk file instead. # # Constants automatically defined by the selected modules -display_DEBUG = 1 +sam3x-ek_display_DEBUG = 1 # Our target application -TRG += display +TRG += sam3x-ek_display -display_PREFIX = "arm-none-eabi-" +sam3x-ek_display_PREFIX = "arm-none-eabi-" -display_SUFFIX = "" +sam3x-ek_display_SUFFIX = "" -display_SRC_PATH = boards/sam3x-ek/examples/display +sam3x-ek_display_SRC_PATH = boards/sam3x-ek/examples/sam3x-ek_display -display_HW_PATH = boards/sam3x-ek +sam3x-ek_display_HW_PATH = boards/sam3x-ek -# Files automatically generated by the wizard. DO NOT EDIT, USE display_USER_CSRC INSTEAD! -display_WIZARD_CSRC = \ +# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_display_USER_CSRC INSTEAD! +sam3x-ek_display_WIZARD_CSRC = \ bertos/struct/heap.c \ bertos/cpu/cortex-m3/hw/switch_ctx_cm3.c \ bertos/mware/event.c \ @@ -26,8 +26,6 @@ display_WIZARD_CSRC = \ bertos/gfx/text.c \ bertos/cpu/cortex-m3/drv/timer_cm3.c \ bertos/drv/timer.c \ - bertos/drv/adc.c \ - bertos/cpu/cortex-m3/drv/adc_sam3.c \ bertos/mware/formatwr.c \ bertos/mware/sprintf.c \ bertos/gfx/line.c \ @@ -41,61 +39,61 @@ display_WIZARD_CSRC = \ bertos/gui/menu.c \ # -# Files automatically generated by the wizard. DO NOT EDIT, USE display_USER_PCSRC INSTEAD! -display_WIZARD_PCSRC = \ +# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_display_USER_PCSRC INSTEAD! +sam3x-ek_display_WIZARD_PCSRC = \ \ # -# Files automatically generated by the wizard. DO NOT EDIT, USE display_USER_CPPASRC INSTEAD! -display_WIZARD_CPPASRC = \ +# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_display_USER_CPPASRC INSTEAD! +sam3x-ek_display_WIZARD_CPPASRC = \ \ # -# Files automatically generated by the wizard. DO NOT EDIT, USE display_USER_CXXSRC INSTEAD! -display_WIZARD_CXXSRC = \ +# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_display_USER_CXXSRC INSTEAD! +sam3x-ek_display_WIZARD_CXXSRC = \ \ # -# Files automatically generated by the wizard. DO NOT EDIT, USE display_USER_ASRC INSTEAD! -display_WIZARD_ASRC = \ +# Files automatically generated by the wizard. DO NOT EDIT, USE sam3x-ek_display_USER_ASRC INSTEAD! +sam3x-ek_display_WIZARD_ASRC = \ \ # -display_CPPFLAGS = -D'CPU_FREQ=(84000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(display_HW_PATH) -I$(display_SRC_PATH) $(display_CPU_CPPFLAGS) $(display_USER_CPPFLAGS) +sam3x-ek_display_CPPFLAGS = -D'CPU_FREQ=(84000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(sam3x-ek_display_HW_PATH) -I$(sam3x-ek_display_SRC_PATH) $(sam3x-ek_display_CPU_CPPFLAGS) $(sam3x-ek_display_USER_CPPFLAGS) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_LDFLAGS = $(display_CPU_LDFLAGS) $(display_WIZARD_LDFLAGS) $(display_USER_LDFLAGS) +sam3x-ek_display_LDFLAGS = $(sam3x-ek_display_CPU_LDFLAGS) $(sam3x-ek_display_WIZARD_LDFLAGS) $(sam3x-ek_display_USER_LDFLAGS) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_CPPAFLAGS = $(display_CPU_CPPAFLAGS) $(display_WIZARD_CPPAFLAGS) $(display_USER_CPPAFLAGS) +sam3x-ek_display_CPPAFLAGS = $(sam3x-ek_display_CPU_CPPAFLAGS) $(sam3x-ek_display_WIZARD_CPPAFLAGS) $(sam3x-ek_display_USER_CPPAFLAGS) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_CSRC = $(display_CPU_CSRC) $(display_WIZARD_CSRC) $(display_USER_CSRC) +sam3x-ek_display_CSRC = $(sam3x-ek_display_CPU_CSRC) $(sam3x-ek_display_WIZARD_CSRC) $(sam3x-ek_display_USER_CSRC) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_PCSRC = $(display_CPU_PCSRC) $(display_WIZARD_PCSRC) $(display_USER_PCSRC) +sam3x-ek_display_PCSRC = $(sam3x-ek_display_CPU_PCSRC) $(sam3x-ek_display_WIZARD_PCSRC) $(sam3x-ek_display_USER_PCSRC) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_CPPASRC = $(display_CPU_CPPASRC) $(display_WIZARD_CPPASRC) $(display_USER_CPPASRC) +sam3x-ek_display_CPPASRC = $(sam3x-ek_display_CPU_CPPASRC) $(sam3x-ek_display_WIZARD_CPPASRC) $(sam3x-ek_display_USER_CPPASRC) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_CXXSRC = $(display_CPU_CXXSRC) $(display_WIZARD_CXXSRC) $(display_USER_CXXSRC) +sam3x-ek_display_CXXSRC = $(sam3x-ek_display_CPU_CXXSRC) $(sam3x-ek_display_WIZARD_CXXSRC) $(sam3x-ek_display_USER_CXXSRC) # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_ASRC = $(display_CPU_ASRC) $(display_WIZARD_ASRC) $(display_USER_ASRC) +sam3x-ek_display_ASRC = $(sam3x-ek_display_CPU_ASRC) $(sam3x-ek_display_WIZARD_ASRC) $(sam3x-ek_display_USER_ASRC) # CPU specific flags and options, defined in the CPU definition files. # Automatically generated by the wizard. PLEASE DO NOT EDIT! -display_CPU_CPPASRC = bertos/cpu/cortex-m3/hw/crt_cm3.S bertos/cpu/cortex-m3/hw/vectors_cm3.S -display_CPU_CPPAFLAGS = -g -gdwarf-2 -mthumb -mno-thumb-interwork -display_CPU_CPPFLAGS = -O0 -g3 -gdwarf-2 -mthumb -mno-thumb-interwork -fno-strict-aliasing -fwrapv -fverbose-asm -Ibertos/cpu/cortex-m3/ -D__ARM_SAM3X8__ -display_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 -display_PROGRAMMER_CPU = sam3 -display_CPU_LDFLAGS = -mthumb -mno-thumb-interwork -nostartfiles -Wl,--no-warn-mismatch -Wl,-dT bertos/cpu/cortex-m3/scripts/sam3x8_rom.ld -display_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh -display_CPU = cortex-m3 -display_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh -display_DEBUG_SCRIPT = bertos/prg_scripts/arm/debug.sh -display_FLASH_SCRIPT = bertos/prg_scripts/arm/flash-sam3.sh - -include $(display_SRC_PATH)/display_user.mk +sam3x-ek_display_CPU_CPPASRC = bertos/cpu/cortex-m3/hw/crt_cm3.S bertos/cpu/cortex-m3/hw/vectors_cm3.S +sam3x-ek_display_CPU_CPPAFLAGS = -g -gdwarf-2 -mthumb -mno-thumb-interwork +sam3x-ek_display_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_display_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_display_PROGRAMMER_CPU = sam3 +sam3x-ek_display_CPU_LDFLAGS = -mthumb -mno-thumb-interwork -nostartfiles -Wl,--no-warn-mismatch -Wl,-dT bertos/cpu/cortex-m3/scripts/sam3x8_rom.ld +sam3x-ek_display_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh +sam3x-ek_display_CPU = cortex-m3 +sam3x-ek_display_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh +sam3x-ek_display_DEBUG_SCRIPT = bertos/prg_scripts/arm/debug.sh +sam3x-ek_display_FLASH_SCRIPT = bertos/prg_scripts/arm/flash-sam3.sh + +include $(sam3x-ek_display_SRC_PATH)/sam3x-ek_display_user.mk diff --git a/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display_user.mk b/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display_user.mk index a7eb3145..4c087254 100644 --- a/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display_user.mk +++ b/boards/sam3x-ek/examples/sam3x-ek_display/sam3x-ek_display_user.mk @@ -4,43 +4,43 @@ # # Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help -display_PROGRAMMER_TYPE = none -display_PROGRAMMER_PORT = none +sam3x-ek_display_PROGRAMMER_TYPE = none +sam3x-ek_display_PROGRAMMER_PORT = none # Files included by the user. -display_USER_CSRC = \ - $(display_SRC_PATH)/main.c \ - $(display_SRC_PATH)/bitmaps.c \ +sam3x-ek_display_USER_CSRC = \ + $(sam3x-ek_display_SRC_PATH)/main.c \ + $(sam3x-ek_display_SRC_PATH)/bitmaps.c \ bertos/icons/logo.c \ bertos/fonts/gohu.c \ # # Files included by the user. -display_USER_PCSRC = \ +sam3x-ek_display_USER_PCSRC = \ # # Files included by the user. -display_USER_CPPASRC = \ +sam3x-ek_display_USER_CPPASRC = \ # # Files included by the user. -display_USER_CXXSRC = \ +sam3x-ek_display_USER_CXXSRC = \ # # Files included by the user. -display_USER_ASRC = \ +sam3x-ek_display_USER_ASRC = \ # # Flags included by the user. -display_USER_LDFLAGS = \ +sam3x-ek_display_USER_LDFLAGS = \ # # Flags included by the user. -display_USER_CPPAFLAGS = \ +sam3x-ek_display_USER_CPPAFLAGS = \ # # Flags included by the user. -display_USER_CPPFLAGS = \ +sam3x-ek_display_USER_CPPFLAGS = \ -Os \ -fno-strict-aliasing \ -fwrapv \ -- 2.25.1