From 450741a2b0b851ba6f71cb6e87fd5f61fe311beb Mon Sep 17 00:00:00 2001 From: asterix Date: Wed, 4 Aug 2010 09:33:23 +0000 Subject: [PATCH] Add arduino mega board preset, signed-off by Fabio Bizzi. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4136 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/avr/info/ATmega1280.cdef | 55 ++++ boards/arduino-mega/.image.png | Bin 0 -> 43594 bytes boards/arduino-mega/.spec | 31 ++ boards/arduino-mega/benchmark/.spec | 3 + .../benchmark/context_switch/.spec | 15 + .../benchmark/context_switch/cfg/cfg_adc.h | 110 +++++++ .../benchmark/context_switch/cfg/cfg_afsk.h | 113 +++++++ .../benchmark/context_switch/cfg/cfg_ax25.h | 76 +++++ .../benchmark/context_switch/cfg/cfg_battfs.h | 68 ++++ .../context_switch/cfg/cfg_context_switch.h | 71 ++++ .../context_switch/cfg/cfg_dataflash.h | 56 ++++ .../context_switch/cfg/cfg_dc_motor.h | 111 +++++++ .../benchmark/context_switch/cfg/cfg_debug.h | 55 ++++ .../benchmark/context_switch/cfg/cfg_fat.h | 140 ++++++++ .../context_switch/cfg/cfg_flash25.h | 52 +++ .../context_switch/cfg/cfg_formatwr.h | 65 ++++ .../benchmark/context_switch/cfg/cfg_gfx.h | 67 ++++ .../context_switch/cfg/cfg_hashtable.h | 51 +++ .../benchmark/context_switch/cfg/cfg_heap.h | 51 +++ .../benchmark/context_switch/cfg/cfg_i2c.h | 88 +++++ .../benchmark/context_switch/cfg/cfg_i2s.h | 75 +++++ .../context_switch/cfg/cfg_ini_reader.h | 49 +++ .../benchmark/context_switch/cfg/cfg_kbd.h | 59 ++++ .../benchmark/context_switch/cfg/cfg_keytag.h | 61 ++++ .../benchmark/context_switch/cfg/cfg_kfile.h | 61 ++++ .../context_switch/cfg/cfg_lcd_32122a.h | 63 ++++ .../context_switch/cfg/cfg_lcd_hd44.h | 55 ++++ .../benchmark/context_switch/cfg/cfg_lm75.h | 57 ++++ .../benchmark/context_switch/cfg/cfg_md2.h | 54 +++ .../benchmark/context_switch/cfg/cfg_menu.h | 67 ++++ .../context_switch/cfg/cfg_monitor.h | 48 +++ .../benchmark/context_switch/cfg/cfg_nmea.h | 85 +++++ .../benchmark/context_switch/cfg/cfg_parser.h | 46 +++ .../benchmark/context_switch/cfg/cfg_phase.h | 56 ++++ .../context_switch/cfg/cfg_pocketbus.h | 71 ++++ .../benchmark/context_switch/cfg/cfg_proc.h | 107 ++++++ .../benchmark/context_switch/cfg/cfg_pwm.h | 57 ++++ .../benchmark/context_switch/cfg/cfg_ramp.h | 116 +++++++ .../context_switch/cfg/cfg_randpool.h | 56 ++++ .../benchmark/context_switch/cfg/cfg_sem.h | 48 +++ .../benchmark/context_switch/cfg/cfg_ser.h | 222 +++++++++++++ .../benchmark/context_switch/cfg/cfg_signal.h | 48 +++ .../context_switch/cfg/cfg_spi_bitbang.h | 52 +++ .../context_switch/cfg/cfg_stepper.h | 70 ++++ .../context_switch/cfg/cfg_tas5706a.h | 51 +++ .../benchmark/context_switch/cfg/cfg_thermo.h | 71 ++++ .../benchmark/context_switch/cfg/cfg_timer.h | 68 ++++ .../benchmark/context_switch/cfg/cfg_wdt.h | 48 +++ .../benchmark/context_switch/cfg/cfg_xmodem.h | 79 +++++ .../context_switch/context_switch.mk | 89 +++++ .../context_switch/context_switch_user.mk | 44 +++ .../benchmark/context_switch/main.c | 56 ++++ .../benchmark/context_switch/project.bertos | 63 ++++ .../benchmark/kernel_footprint/.spec | 14 + .../benchmark/kernel_footprint/cfg/cfg_adc.h | 110 +++++++ .../benchmark/kernel_footprint/cfg/cfg_afsk.h | 113 +++++++ .../benchmark/kernel_footprint/cfg/cfg_ax25.h | 76 +++++ .../kernel_footprint/cfg/cfg_battfs.h | 68 ++++ .../kernel_footprint/cfg/cfg_context_switch.h | 71 ++++ .../kernel_footprint/cfg/cfg_dataflash.h | 56 ++++ .../kernel_footprint/cfg/cfg_dc_motor.h | 111 +++++++ .../kernel_footprint/cfg/cfg_debug.h | 55 ++++ .../benchmark/kernel_footprint/cfg/cfg_fat.h | 140 ++++++++ .../kernel_footprint/cfg/cfg_flash25.h | 52 +++ .../kernel_footprint/cfg/cfg_formatwr.h | 65 ++++ .../benchmark/kernel_footprint/cfg/cfg_gfx.h | 67 ++++ .../kernel_footprint/cfg/cfg_hashtable.h | 51 +++ .../benchmark/kernel_footprint/cfg/cfg_heap.h | 51 +++ .../benchmark/kernel_footprint/cfg/cfg_i2c.h | 88 +++++ .../benchmark/kernel_footprint/cfg/cfg_i2s.h | 75 +++++ .../kernel_footprint/cfg/cfg_ini_reader.h | 49 +++ .../benchmark/kernel_footprint/cfg/cfg_kbd.h | 59 ++++ .../kernel_footprint/cfg/cfg_keytag.h | 61 ++++ .../kernel_footprint/cfg/cfg_kfile.h | 61 ++++ .../kernel_footprint/cfg/cfg_lcd_32122a.h | 63 ++++ .../kernel_footprint/cfg/cfg_lcd_hd44.h | 55 ++++ .../benchmark/kernel_footprint/cfg/cfg_lm75.h | 57 ++++ .../benchmark/kernel_footprint/cfg/cfg_md2.h | 54 +++ .../kernel_footprint/cfg/cfg_monitor.h | 48 +++ .../benchmark/kernel_footprint/cfg/cfg_nmea.h | 85 +++++ .../kernel_footprint/cfg/cfg_parser.h | 46 +++ .../kernel_footprint/cfg/cfg_phase.h | 56 ++++ .../kernel_footprint/cfg/cfg_pocketbus.h | 71 ++++ .../benchmark/kernel_footprint/cfg/cfg_proc.h | 107 ++++++ .../benchmark/kernel_footprint/cfg/cfg_pwm.h | 57 ++++ .../benchmark/kernel_footprint/cfg/cfg_ramp.h | 116 +++++++ .../kernel_footprint/cfg/cfg_randpool.h | 56 ++++ .../benchmark/kernel_footprint/cfg/cfg_sem.h | 48 +++ .../benchmark/kernel_footprint/cfg/cfg_ser.h | 222 +++++++++++++ .../kernel_footprint/cfg/cfg_signal.h | 48 +++ .../kernel_footprint/cfg/cfg_spi_bitbang.h | 52 +++ .../kernel_footprint/cfg/cfg_stepper.h | 70 ++++ .../kernel_footprint/cfg/cfg_tas5706a.h | 51 +++ .../kernel_footprint/cfg/cfg_thermo.h | 71 ++++ .../kernel_footprint/cfg/cfg_timer.h | 68 ++++ .../benchmark/kernel_footprint/cfg/cfg_wdt.h | 48 +++ .../kernel_footprint/cfg/cfg_xmodem.h | 79 +++++ .../kernel_footprint/kernel_footprint.mk | 88 +++++ .../kernel_footprint/kernel_footprint_user.mk | 44 +++ .../benchmark/kernel_footprint/main.c | 57 ++++ .../benchmark/kernel_footprint/project.bertos | 83 +++++ boards/arduino-mega/examples/.spec | 3 + boards/arduino-mega/examples/aprs/.spec | 21 ++ boards/arduino-mega/examples/aprs/aprs.mk | 89 +++++ .../arduino-mega/examples/aprs/aprs_user.mk | 44 +++ .../arduino-mega/examples/aprs/cfg/cfg_adc.h | 110 +++++++ .../arduino-mega/examples/aprs/cfg/cfg_afsk.h | 114 +++++++ .../arduino-mega/examples/aprs/cfg/cfg_ax25.h | 76 +++++ .../examples/aprs/cfg/cfg_battfs.h | 68 ++++ .../examples/aprs/cfg/cfg_context_switch.h | 71 ++++ .../examples/aprs/cfg/cfg_dataflash.h | 56 ++++ .../examples/aprs/cfg/cfg_dc_motor.h | 111 +++++++ .../examples/aprs/cfg/cfg_debug.h | 55 ++++ .../arduino-mega/examples/aprs/cfg/cfg_fat.h | 140 ++++++++ .../examples/aprs/cfg/cfg_flash25.h | 52 +++ .../examples/aprs/cfg/cfg_formatwr.h | 65 ++++ .../arduino-mega/examples/aprs/cfg/cfg_gfx.h | 67 ++++ .../examples/aprs/cfg/cfg_hashtable.h | 52 +++ .../arduino-mega/examples/aprs/cfg/cfg_heap.h | 51 +++ .../arduino-mega/examples/aprs/cfg/cfg_i2c.h | 90 +++++ .../arduino-mega/examples/aprs/cfg/cfg_i2s.h | 75 +++++ .../examples/aprs/cfg/cfg_ini_reader.h | 49 +++ .../arduino-mega/examples/aprs/cfg/cfg_kbd.h | 59 ++++ .../examples/aprs/cfg/cfg_keytag.h | 61 ++++ .../examples/aprs/cfg/cfg_kfile.h | 61 ++++ .../examples/aprs/cfg/cfg_lcd_32122a.h | 63 ++++ .../examples/aprs/cfg/cfg_lcd_hd44.h | 55 ++++ .../arduino-mega/examples/aprs/cfg/cfg_lm75.h | 57 ++++ .../arduino-mega/examples/aprs/cfg/cfg_md2.h | 54 +++ .../arduino-mega/examples/aprs/cfg/cfg_menu.h | 67 ++++ .../examples/aprs/cfg/cfg_monitor.h | 48 +++ .../arduino-mega/examples/aprs/cfg/cfg_nmea.h | 85 +++++ .../examples/aprs/cfg/cfg_parser.h | 46 +++ .../examples/aprs/cfg/cfg_phase.h | 56 ++++ .../examples/aprs/cfg/cfg_pocketbus.h | 71 ++++ .../arduino-mega/examples/aprs/cfg/cfg_proc.h | 107 ++++++ .../arduino-mega/examples/aprs/cfg/cfg_pwm.h | 57 ++++ .../arduino-mega/examples/aprs/cfg/cfg_ramp.h | 116 +++++++ .../examples/aprs/cfg/cfg_randpool.h | 56 ++++ .../arduino-mega/examples/aprs/cfg/cfg_sem.h | 48 +++ .../arduino-mega/examples/aprs/cfg/cfg_ser.h | 222 +++++++++++++ .../examples/aprs/cfg/cfg_signal.h | 48 +++ .../examples/aprs/cfg/cfg_spi_bitbang.h | 52 +++ .../examples/aprs/cfg/cfg_stepper.h | 70 ++++ .../examples/aprs/cfg/cfg_tas5706a.h | 51 +++ .../examples/aprs/cfg/cfg_thermo.h | 71 ++++ .../examples/aprs/cfg/cfg_timer.h | 68 ++++ .../arduino-mega/examples/aprs/cfg/cfg_wdt.h | 48 +++ .../examples/aprs/cfg/cfg_xmodem.h | 79 +++++ boards/arduino-mega/examples/aprs/main.c | 130 ++++++++ .../arduino-mega/examples/aprs/project.bertos | 83 +++++ boards/arduino-mega/hw/hw_afsk.c | 97 ++++++ boards/arduino-mega/hw/hw_afsk.h | 111 +++++++ boards/arduino-mega/hw/hw_buzzer.h | 52 +++ boards/arduino-mega/hw/hw_dataflash.c | 126 +++++++ boards/arduino-mega/hw/hw_dataflash.h | 48 +++ boards/arduino-mega/hw/hw_dc_motor.h | 85 +++++ boards/arduino-mega/hw/hw_ft245rl.h | 65 ++++ boards/arduino-mega/hw/hw_i2c_bitbang.h | 66 ++++ boards/arduino-mega/hw/hw_kbd.h | 72 ++++ boards/arduino-mega/hw/hw_lcd_32122a.h | 155 +++++++++ boards/arduino-mega/hw/hw_lcd_hd44.h | 157 +++++++++ boards/arduino-mega/hw/hw_led.h | 47 +++ boards/arduino-mega/hw/hw_lm75.h | 49 +++ boards/arduino-mega/hw/hw_mcp41.c | 53 +++ boards/arduino-mega/hw/hw_mcp41.h | 75 +++++ boards/arduino-mega/hw/hw_ntc.c | 46 +++ boards/arduino-mega/hw/hw_ntc.h | 136 ++++++++ boards/arduino-mega/hw/hw_phase.c | 46 +++ boards/arduino-mega/hw/hw_phase.h | 80 +++++ boards/arduino-mega/hw/hw_rit128x96.h | 78 +++++ boards/arduino-mega/hw/hw_sd.h | 53 +++ boards/arduino-mega/hw/hw_ser.h | 53 +++ boards/arduino-mega/hw/hw_sipo.h | 109 ++++++ boards/arduino-mega/hw/hw_spi.h | 115 +++++++ boards/arduino-mega/hw/hw_stepper.h | 309 ++++++++++++++++++ boards/arduino-mega/hw/hw_tas5706a.h | 65 ++++ boards/arduino-mega/hw/hw_thermo.h | 182 +++++++++++ boards/arduino-mega/hw/hw_tlv5618.h | 69 ++++ boards/arduino-mega/hw/hw_tmp123.h | 52 +++ boards/arduino-mega/hw/kbd_map.h | 71 ++++ boards/arduino-mega/hw/mcp41_map.h | 59 ++++ boards/arduino-mega/hw/ntc_map.h | 61 ++++ boards/arduino-mega/hw/phase_map.h | 58 ++++ boards/arduino-mega/hw/pwm_map.h | 61 ++++ boards/arduino-mega/hw/thermo_map.h | 70 ++++ boards/arduino-mega/templates/.spec | 3 + boards/arduino-mega/templates/empty/.spec | 8 + .../templates/empty/cfg/cfg_adc.h | 110 +++++++ .../templates/empty/cfg/cfg_afsk.h | 113 +++++++ .../templates/empty/cfg/cfg_ax25.h | 76 +++++ .../templates/empty/cfg/cfg_battfs.h | 68 ++++ .../templates/empty/cfg/cfg_context_switch.h | 71 ++++ .../templates/empty/cfg/cfg_dataflash.h | 56 ++++ .../templates/empty/cfg/cfg_dc_motor.h | 111 +++++++ .../templates/empty/cfg/cfg_debug.h | 55 ++++ .../templates/empty/cfg/cfg_fat.h | 140 ++++++++ .../templates/empty/cfg/cfg_flash25.h | 52 +++ .../templates/empty/cfg/cfg_formatwr.h | 65 ++++ .../templates/empty/cfg/cfg_gfx.h | 67 ++++ .../templates/empty/cfg/cfg_hashtable.h | 51 +++ .../templates/empty/cfg/cfg_heap.h | 51 +++ .../templates/empty/cfg/cfg_i2c.h | 88 +++++ .../templates/empty/cfg/cfg_i2s.h | 75 +++++ .../templates/empty/cfg/cfg_ini_reader.h | 49 +++ .../templates/empty/cfg/cfg_kbd.h | 59 ++++ .../templates/empty/cfg/cfg_keytag.h | 61 ++++ .../templates/empty/cfg/cfg_kfile.h | 61 ++++ .../templates/empty/cfg/cfg_lcd_32122a.h | 63 ++++ .../templates/empty/cfg/cfg_lcd_hd44.h | 55 ++++ .../templates/empty/cfg/cfg_lm75.h | 57 ++++ .../templates/empty/cfg/cfg_md2.h | 54 +++ .../templates/empty/cfg/cfg_monitor.h | 48 +++ .../templates/empty/cfg/cfg_nmea.h | 85 +++++ .../templates/empty/cfg/cfg_parser.h | 46 +++ .../templates/empty/cfg/cfg_phase.h | 56 ++++ .../templates/empty/cfg/cfg_pocketbus.h | 71 ++++ .../templates/empty/cfg/cfg_proc.h | 107 ++++++ .../templates/empty/cfg/cfg_pwm.h | 57 ++++ .../templates/empty/cfg/cfg_ramp.h | 116 +++++++ .../templates/empty/cfg/cfg_randpool.h | 56 ++++ .../templates/empty/cfg/cfg_sem.h | 48 +++ .../templates/empty/cfg/cfg_ser.h | 222 +++++++++++++ .../templates/empty/cfg/cfg_signal.h | 48 +++ .../templates/empty/cfg/cfg_spi_bitbang.h | 52 +++ .../templates/empty/cfg/cfg_stepper.h | 70 ++++ .../templates/empty/cfg/cfg_tas5706a.h | 51 +++ .../templates/empty/cfg/cfg_thermo.h | 71 ++++ .../templates/empty/cfg/cfg_timer.h | 68 ++++ .../templates/empty/cfg/cfg_wdt.h | 48 +++ .../templates/empty/cfg/cfg_xmodem.h | 79 +++++ boards/arduino-mega/templates/empty/empty.mk | 89 +++++ .../templates/empty/empty_user.mk | 43 +++ boards/arduino-mega/templates/empty/main.c | 89 +++++ .../templates/empty/project.bertos | 77 +++++ boards/arduino-mega/templates/kernel/.spec | 9 + .../templates/kernel/cfg/cfg_adc.h | 110 +++++++ .../templates/kernel/cfg/cfg_afsk.h | 113 +++++++ .../templates/kernel/cfg/cfg_ax25.h | 76 +++++ .../templates/kernel/cfg/cfg_battfs.h | 68 ++++ .../templates/kernel/cfg/cfg_context_switch.h | 71 ++++ .../templates/kernel/cfg/cfg_dataflash.h | 56 ++++ .../templates/kernel/cfg/cfg_dc_motor.h | 111 +++++++ .../templates/kernel/cfg/cfg_debug.h | 55 ++++ .../templates/kernel/cfg/cfg_fat.h | 140 ++++++++ .../templates/kernel/cfg/cfg_flash25.h | 52 +++ .../templates/kernel/cfg/cfg_formatwr.h | 65 ++++ .../templates/kernel/cfg/cfg_gfx.h | 67 ++++ .../templates/kernel/cfg/cfg_hashtable.h | 51 +++ .../templates/kernel/cfg/cfg_heap.h | 51 +++ .../templates/kernel/cfg/cfg_i2c.h | 88 +++++ .../templates/kernel/cfg/cfg_i2s.h | 75 +++++ .../templates/kernel/cfg/cfg_ini_reader.h | 49 +++ .../templates/kernel/cfg/cfg_kbd.h | 59 ++++ .../templates/kernel/cfg/cfg_keytag.h | 61 ++++ .../templates/kernel/cfg/cfg_kfile.h | 61 ++++ .../templates/kernel/cfg/cfg_lcd_32122a.h | 63 ++++ .../templates/kernel/cfg/cfg_lcd_hd44.h | 55 ++++ .../templates/kernel/cfg/cfg_lm75.h | 57 ++++ .../templates/kernel/cfg/cfg_md2.h | 54 +++ .../templates/kernel/cfg/cfg_monitor.h | 48 +++ .../templates/kernel/cfg/cfg_nmea.h | 85 +++++ .../templates/kernel/cfg/cfg_parser.h | 46 +++ .../templates/kernel/cfg/cfg_phase.h | 56 ++++ .../templates/kernel/cfg/cfg_pocketbus.h | 71 ++++ .../templates/kernel/cfg/cfg_proc.h | 107 ++++++ .../templates/kernel/cfg/cfg_pwm.h | 57 ++++ .../templates/kernel/cfg/cfg_ramp.h | 116 +++++++ .../templates/kernel/cfg/cfg_randpool.h | 56 ++++ .../templates/kernel/cfg/cfg_sem.h | 48 +++ .../templates/kernel/cfg/cfg_ser.h | 222 +++++++++++++ .../templates/kernel/cfg/cfg_signal.h | 48 +++ .../templates/kernel/cfg/cfg_spi_bitbang.h | 52 +++ .../templates/kernel/cfg/cfg_stepper.h | 70 ++++ .../templates/kernel/cfg/cfg_tas5706a.h | 51 +++ .../templates/kernel/cfg/cfg_thermo.h | 71 ++++ .../templates/kernel/cfg/cfg_timer.h | 68 ++++ .../templates/kernel/cfg/cfg_wdt.h | 48 +++ .../templates/kernel/cfg/cfg_xmodem.h | 79 +++++ .../arduino-mega/templates/kernel/kernel.mk | 90 +++++ .../templates/kernel/kernel_user.mk | 43 +++ boards/arduino-mega/templates/kernel/main.c | 122 +++++++ .../templates/kernel/project.bertos | 85 +++++ 283 files changed, 20374 insertions(+) create mode 100644 bertos/cpu/avr/info/ATmega1280.cdef create mode 100644 boards/arduino-mega/.image.png create mode 100644 boards/arduino-mega/.spec create mode 100644 boards/arduino-mega/benchmark/.spec create mode 100644 boards/arduino-mega/benchmark/context_switch/.spec create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_adc.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_afsk.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_ax25.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_battfs.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_context_switch.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_dataflash.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_dc_motor.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_debug.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_fat.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_flash25.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_formatwr.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_gfx.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_hashtable.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_heap.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2c.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2s.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_ini_reader.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_kbd.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_keytag.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_kfile.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_32122a.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_hd44.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_lm75.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_md2.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_menu.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_monitor.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_nmea.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_parser.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_phase.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_pocketbus.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_proc.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_pwm.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_ramp.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_randpool.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_sem.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_ser.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_signal.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_spi_bitbang.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_stepper.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_tas5706a.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_thermo.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_timer.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_wdt.h create mode 100644 boards/arduino-mega/benchmark/context_switch/cfg/cfg_xmodem.h create mode 100644 boards/arduino-mega/benchmark/context_switch/context_switch.mk create mode 100644 boards/arduino-mega/benchmark/context_switch/context_switch_user.mk create mode 100644 boards/arduino-mega/benchmark/context_switch/main.c create mode 100644 boards/arduino-mega/benchmark/context_switch/project.bertos create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/.spec create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_adc.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_afsk.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ax25.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_battfs.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_context_switch.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dataflash.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dc_motor.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_debug.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_fat.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_flash25.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_formatwr.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_gfx.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_hashtable.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_heap.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2c.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2s.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ini_reader.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kbd.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_keytag.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kfile.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_32122a.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_hd44.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lm75.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_md2.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_monitor.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_nmea.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_parser.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_phase.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pocketbus.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_proc.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pwm.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ramp.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_randpool.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_sem.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ser.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_signal.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_spi_bitbang.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_stepper.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_tas5706a.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_thermo.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_timer.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_wdt.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_xmodem.h create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint.mk create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint_user.mk create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/main.c create mode 100644 boards/arduino-mega/benchmark/kernel_footprint/project.bertos create mode 100644 boards/arduino-mega/examples/.spec create mode 100644 boards/arduino-mega/examples/aprs/.spec create mode 100644 boards/arduino-mega/examples/aprs/aprs.mk create mode 100644 boards/arduino-mega/examples/aprs/aprs_user.mk create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_adc.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_afsk.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_ax25.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_battfs.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_context_switch.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_dataflash.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_dc_motor.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_debug.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_fat.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_flash25.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_formatwr.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_gfx.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_hashtable.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_heap.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_i2c.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_i2s.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_ini_reader.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_kbd.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_keytag.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_kfile.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_lcd_32122a.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_lcd_hd44.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_lm75.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_md2.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_menu.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_monitor.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_nmea.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_parser.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_phase.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_pocketbus.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_proc.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_pwm.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_ramp.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_randpool.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_sem.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_ser.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_signal.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_spi_bitbang.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_stepper.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_tas5706a.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_thermo.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_timer.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_wdt.h create mode 100644 boards/arduino-mega/examples/aprs/cfg/cfg_xmodem.h create mode 100644 boards/arduino-mega/examples/aprs/main.c create mode 100644 boards/arduino-mega/examples/aprs/project.bertos create mode 100644 boards/arduino-mega/hw/hw_afsk.c create mode 100644 boards/arduino-mega/hw/hw_afsk.h create mode 100644 boards/arduino-mega/hw/hw_buzzer.h create mode 100644 boards/arduino-mega/hw/hw_dataflash.c create mode 100644 boards/arduino-mega/hw/hw_dataflash.h create mode 100644 boards/arduino-mega/hw/hw_dc_motor.h create mode 100644 boards/arduino-mega/hw/hw_ft245rl.h create mode 100644 boards/arduino-mega/hw/hw_i2c_bitbang.h create mode 100644 boards/arduino-mega/hw/hw_kbd.h create mode 100644 boards/arduino-mega/hw/hw_lcd_32122a.h create mode 100644 boards/arduino-mega/hw/hw_lcd_hd44.h create mode 100644 boards/arduino-mega/hw/hw_led.h create mode 100644 boards/arduino-mega/hw/hw_lm75.h create mode 100644 boards/arduino-mega/hw/hw_mcp41.c create mode 100644 boards/arduino-mega/hw/hw_mcp41.h create mode 100644 boards/arduino-mega/hw/hw_ntc.c create mode 100644 boards/arduino-mega/hw/hw_ntc.h create mode 100644 boards/arduino-mega/hw/hw_phase.c create mode 100644 boards/arduino-mega/hw/hw_phase.h create mode 100644 boards/arduino-mega/hw/hw_rit128x96.h create mode 100644 boards/arduino-mega/hw/hw_sd.h create mode 100644 boards/arduino-mega/hw/hw_ser.h create mode 100644 boards/arduino-mega/hw/hw_sipo.h create mode 100644 boards/arduino-mega/hw/hw_spi.h create mode 100644 boards/arduino-mega/hw/hw_stepper.h create mode 100644 boards/arduino-mega/hw/hw_tas5706a.h create mode 100644 boards/arduino-mega/hw/hw_thermo.h create mode 100644 boards/arduino-mega/hw/hw_tlv5618.h create mode 100644 boards/arduino-mega/hw/hw_tmp123.h create mode 100644 boards/arduino-mega/hw/kbd_map.h create mode 100644 boards/arduino-mega/hw/mcp41_map.h create mode 100644 boards/arduino-mega/hw/ntc_map.h create mode 100644 boards/arduino-mega/hw/phase_map.h create mode 100644 boards/arduino-mega/hw/pwm_map.h create mode 100644 boards/arduino-mega/hw/thermo_map.h create mode 100644 boards/arduino-mega/templates/.spec create mode 100644 boards/arduino-mega/templates/empty/.spec create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_adc.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_afsk.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_ax25.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_battfs.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_context_switch.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_dataflash.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_dc_motor.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_debug.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_fat.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_flash25.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_formatwr.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_gfx.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_hashtable.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_heap.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_i2c.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_i2s.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_ini_reader.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_kbd.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_keytag.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_kfile.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_lcd_32122a.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_lcd_hd44.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_lm75.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_md2.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_monitor.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_nmea.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_parser.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_phase.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_pocketbus.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_proc.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_pwm.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_ramp.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_randpool.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_sem.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_ser.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_signal.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_spi_bitbang.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_stepper.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_tas5706a.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_thermo.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_timer.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_wdt.h create mode 100644 boards/arduino-mega/templates/empty/cfg/cfg_xmodem.h create mode 100644 boards/arduino-mega/templates/empty/empty.mk create mode 100644 boards/arduino-mega/templates/empty/empty_user.mk create mode 100644 boards/arduino-mega/templates/empty/main.c create mode 100644 boards/arduino-mega/templates/empty/project.bertos create mode 100644 boards/arduino-mega/templates/kernel/.spec create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_adc.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_afsk.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_ax25.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_battfs.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_context_switch.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_dataflash.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_dc_motor.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_debug.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_fat.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_flash25.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_formatwr.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_gfx.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_hashtable.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_heap.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_i2c.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_i2s.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_ini_reader.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_kbd.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_keytag.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_kfile.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_lcd_32122a.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_lcd_hd44.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_lm75.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_md2.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_monitor.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_nmea.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_parser.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_phase.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_pocketbus.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_proc.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_pwm.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_ramp.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_randpool.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_sem.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_ser.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_signal.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_spi_bitbang.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_stepper.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_tas5706a.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_thermo.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_timer.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_wdt.h create mode 100644 boards/arduino-mega/templates/kernel/cfg/cfg_xmodem.h create mode 100644 boards/arduino-mega/templates/kernel/kernel.mk create mode 100644 boards/arduino-mega/templates/kernel/kernel_user.mk create mode 100644 boards/arduino-mega/templates/kernel/main.c create mode 100644 boards/arduino-mega/templates/kernel/project.bertos diff --git a/bertos/cpu/avr/info/ATmega1280.cdef b/bertos/cpu/avr/info/ATmega1280.cdef new file mode 100644 index 00000000..67c30765 --- /dev/null +++ b/bertos/cpu/avr/info/ATmega1280.cdef @@ -0,0 +1,55 @@ +# +#-*- coding: utf-8 -*- +# +# \file +# +# +# Cpu info of the ATMega1280. +# +# This file contain all info for the BeRTOS wizard. +# +# \author Daniele Basile +# +# + + +# Import the common settings for the path. +include("avr.common") + +# Short description of the cpu. +CPU_DESC += [ "128 Kbyte in-System Programmable Flash", + "8 Kbytes internal SRAM memory", + "4 Kbytes EEPROM memory" ] + +# If we use the GCC compiler we should pass some flags. +CORE_CPU = "atmega1280" + +include("avr_post.common") diff --git a/boards/arduino-mega/.image.png b/boards/arduino-mega/.image.png new file mode 100644 index 0000000000000000000000000000000000000000..f0d4147702043bdaf42a2d654c900c356b9d15e3 GIT binary patch literal 43594 zcmV)gK%~EkP)V60008QX+uL$Nkc;* zaB^>EX>4Tx0C?Jslut+$VHn1Lvl<489Wt{p_zocwDudf8B5>C~*_tk^<{ttXXTRMY zo!uF}88;J85p6270Swo**-;y>%iPtr-RFDO0W~&0 z0os0`K3ndafcmL&uLJd$eb)!A3#d19MjEs+pj8d0;-Fmv>awAJD%7W?XF~N`pkTVn zhw58EXWBFKpxuJVpRw@?QI6v$;OudzdRf6HJb3&Njx<-WmPR-{3QN%n_C19LXbme~ zCfWgjRvUwTA4;X~%}{d_e%~mSe%>pUe&2_x_wdX%XH_xSg%*iI-kvps^Fg3i7Dk4E z6A-y0z3w5P6}0}e(UkyBf%YyfySfAXcE;-I16qLPjOrNy&Oqe3<@XJjIT2N`2l@le zx`Hz>2nf*TTtAj7KN~sk6^FWklfc($<9rfm0Ah;+>7hDU*8pmogW;sZbf zXv-up$Rkl06cD87B}N-A3Wp397B)KMpoxD5iOC|aWW_znJY+EQRoAW)Pq$gETrrQC^-#h?^ z;znL7L!^3RBB`8=Wy{dtXYc8M*I%V`1rj%eLFxbi010qNS#tmY3ljhU3ljkVnw%H_ z000McNliru+6V#&EgL~p)EEE&AOJ~3K~#9!?7V5TWY<+Dxc5HiPBFh1Z+8S9_ChW|S;$3Jri%!tSgi2usoG6FKQF-A)HJ$?K~ zdw1~*{+CnM|Hpv!-w+3HHubNx3ID>sW@f~{H?a5?2JC6(pPVN^WD!bcJVE&-Fs|*=coU2A%TDQ3H`kW?f3kO z{_eQ)KWBRQd(7fLE6e^ti^i9z3YqQqj4l5||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A z1F7QET)f$EFA!H3fC?>&!A+$JD>$QmQbbjX`|q_*s`1@LSgKl6h#)0dUgx84pLo1| z`h5=^zAndky7({^Fsl`FXUEX#&MsGP}dRjJUbJk|1wuQac8 mTp_#gJ1Ua@I7z)BtbYN>e{U&}p??Vg0000Arduino Mega + +

+ + + + + + + + + + + + + + + + + + + +
CPUAVR ATmega1280
Clock16MHz
Memory128kB Flash, 8kB SRAM, 4kB EEPROM
Peripheralstimers, ADC, 4 UART, SPI, I²C, PWM
+

+

+Arduino Mega® is an AVR based board. Visit http://www.arduino.cc for more information. +

+ +''' diff --git a/boards/arduino-mega/benchmark/.spec b/boards/arduino-mega/benchmark/.spec new file mode 100644 index 00000000..18c0580d --- /dev/null +++ b/boards/arduino-mega/benchmark/.spec @@ -0,0 +1,3 @@ +name="Benchmarks" +ord=2 +description="Projects to measure different aspects of BeRTOS performance." diff --git a/boards/arduino-mega/benchmark/context_switch/.spec b/boards/arduino-mega/benchmark/context_switch/.spec new file mode 100644 index 00000000..3268cbf4 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/.spec @@ -0,0 +1,15 @@ +name = 'BeRTOS Context Switch' +description=""" +

+This benchmark measures the overhead (in us) required to deliver a +signal and switch from a low-priority process to a high-priority process. +

+

+The measure is made by the high-precision timer if supported by the +architecture. Alternatively, the time can also be measured using an external +oscilloscope connected to the board's status LED. +

+

+For more information have a look at the BeRTOS benchmarks page. +

+""" diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_adc.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_adc.h new file mode 100644 index 00000000..dd65e134 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_adc.h @@ -0,0 +1,110 @@ +/** + * \file + * + * + * \brief Configuration file for the ADC module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_ADC_H +#define CFG_ADC_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define ADC_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define ADC_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Clock Frequency for ADC conversion. + * + * $WIZ$ type = "int" + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_CLOCK 4800000UL + +/** + * Minimum time for starting up a conversion [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_STARTUP_TIME 20 + +/** + * Minimum time for sample and hold [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_SHTIME 834 + +/** + * ADC Voltage Reference. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "avr_adc_refs" + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_REF ADC_AVR_AVCC + +/** + * ADC clock divisor from main crystal. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ max = 128 + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_DIVISOR 2 + +/** + * Enable ADC strobe for debugging ADC ISR. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_ADC_STROBE 0 + +#endif /* CFG_ADC_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_afsk.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_afsk.h new file mode 100644 index 00000000..cce47c1f --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_afsk.h @@ -0,0 +1,113 @@ +/** + * \file + * + * + * \brief Configuration file for AFSK1200 modem. + * + * \author Francesco Sacchi + */ + +#ifndef CFG_AFSK_H +#define CFG_AFSK_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AFSK_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AFSK_LOG_FORMAT LOG_FMT_TERSE + + +/** + * AFSK discriminator filter type. + * + * $WIZ$ type = "enum"; value_list = "afsk_filter_list" + */ +#define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV + + +/** + * AFSK receiver buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_RX_BUFLEN 32 + +/** + * AFSK transimtter buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_TX_BUFLEN 32 + +/** + * AFSK DAC sample rate for modem outout. + * $WIZ$ type = "int" + * $WIZ$ min = 2400 + */ +#define CONFIG_AFSK_DAC_SAMPLERATE 9600 + +/** + * AFSK RX timeout in ms, set to -1 to disable. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_AFSK_RXTIMEOUT 0 + + +/** + * AFSK Preamble length in [ms], before starting transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_PREAMBLE_LEN 300UL + + + +/** + * AFSK Trailer length in [ms], before stopping transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_TRAILER_LEN 50UL + +#endif /* CFG_AFSK_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ax25.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ax25.h new file mode 100644 index 00000000..64f862f1 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ax25.h @@ -0,0 +1,76 @@ +/** + * \file + * + * + * \brief Configuration file for the AX25 protocol module. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef CFG_AX25_H +#define CFG_AX25_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AX25_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AX25_LOG_FORMAT LOG_FMT_TERSE + +/** + * AX25 frame buffer lenght. + * + * $WIZ$ type = "int" + * $WIZ$ min = 18 + */ +#define CONFIG_AX25_FRAME_BUF_LEN 330 + + +/** + * Enable repeaters listing in AX25 frames. + * If enabled use 56 addtional bytes of RAM + * for each message received. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_AX25_RPT_LST 1 + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_battfs.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_battfs.h new file mode 100644 index 00000000..fb438a08 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_battfs.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for BattFS module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_BATTFS_H +#define CFG_BATTFS_H + + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define BATTFS_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define BATTFS_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Set to 1 to enable free page shuffling. + * This increase memories life but makes debugging + * more difficult due to its unrepeteable state. + * $WIZ$ type = "boolean" + */ +#define CONFIG_BATTFS_SHUFFLE_FREE_PAGES 0 + + +#endif /* BATTFS */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_context_switch.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_context_switch.h new file mode 100644 index 00000000..fe0b4f87 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_context_switch.h @@ -0,0 +1,71 @@ +/** + * \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. + * + * $WIZ$ type = "boolean" + * $WIZ$ module= "boolean" + * $WIZ$ conditional_deps = "ser" + */ +#define CONFIG_USE_HP_TIMER 1 + + +/** + * Use board led for benchmark. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_USE_LED 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/arduino-mega/benchmark/context_switch/cfg/cfg_dataflash.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_dataflash.h new file mode 100644 index 00000000..8bd7828a --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_dataflash.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for data flash memory module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_DATAFLASH_H +#define CFG_DATAFLASH_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DATAFLASH_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DATAFLASH_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_DATAFLASH_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_dc_motor.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_dc_motor.h new file mode 100644 index 00000000..fd9bac73 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_dc_motor.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief Configuration file for DC motor module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DC_MOTOR_H +#define CFG_DC_MOTOR_H + +/** + * Number of the DC motors to manage. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_DC_MOTOR 4 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE + + +/** + * Min value of DC motor speed. + * \note Generally this value is the min value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_MIN_SPEED 0 + + +/** + * Max value of DC motor speed. + * \note Generally this value is the max value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + * $WIZ$ max = 65535 + */ +#define CONFIG_DC_MOTOR_MAX_SPEED 65535 + + +/** + * Sampling period in millisecond. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_PERIOD 40 + +/** + * Amount of millisecond before to read sample. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_DELAY 2 + +/** + * This control set which mode the driver use to lock share + * resources when we use the preempitive kernel. + * If we set to 1 we use the semaphore module otherwise the + * driver disable the switch context every time we need to access + * to shared sources. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_USE_SEM 1 + +#endif /* CFG_DC_MOTOR_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_debug.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_debug.h new file mode 100644 index 00000000..f7596ca1 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_debug.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for Debug module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_DEBUG_H +#define CFG_DEBUG_H + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_KDEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_KDEBUG_BAUDRATE 115200UL + +#endif /* CFG_DEBUG_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_fat.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_fat.h new file mode 100644 index 00000000..d418b783 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_fat.h @@ -0,0 +1,140 @@ +/** + * \file + * + * + * \brief Configuration file for Fat module. + * + * \version $Id$ + * + * \author Luca Ottaviano + * \author Francesco Sacchi + */ + +#ifndef CFG_FAT_H +#define CFG_FAT_H + +/** + * Use word alignment to access FAT structure. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_WORD_ACCESS 0 +#define _WORD_ACCESS CONFIG_FAT_WORD_ACCESS + +/** + * Enable read functions only. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_READONLY 0 +#define _FS_READONLY CONFIG_FAT_FS_READONLY + +/** + * Minimization level to remove some functions. + * $WIZ$ type = "int"; min = 0; max = 3 + */ +#define CONFIG_FAT_FS_MINIMIZE 0 +#define _FS_MINIMIZE CONFIG_FAT_FS_MINIMIZE + +/** + * If enabled, this reduces memory consumption 512 bytes each file object by using a shared buffer. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_TINY 1 +#define _FS_TINY CONFIG_FAT_FS_TINY + +/** + * To enable string functions, set _USE_STRFUNC to 1 or 2. + * $WIZ$ type = "int" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_USE_STRFUNC 0 +#define _USE_STRFUNC CONFIG_FAT_USE_STRFUNC + +/** + * Enable f_mkfs function. Requires CONFIG_FAT_FS_READONLY = 0. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_MKFS 0 +#define _USE_MKFS (CONFIG_FAT_USE_MKFS && !CONFIG_FAT_FS_READONLY) + +/** + * Enable f_forward function. Requires CONFIG_FAT_FS_TINY. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_FORWARD 0 +#define _USE_FORWARD (CONFIG_FAT_USE_FORWARD && CONFIG_FAT_FS_TINY) + +/** + * Number of volumes (logical drives) to be used. + * $WIZ$ type = "int"; min = 1; max = 255 + */ +#define CONFIG_FAT_DRIVES 1 +#define _DRIVES CONFIG_FAT_DRIVES + +/** + * Maximum sector size to be handled. (512/1024/2048/4096). + * 512 for memory card and hard disk, 1024 for floppy disk, 2048 for MO disk + * $WIZ$ type = "int"; min = 512; max = 4096 + */ +#define CONFIG_FAT_MAX_SS 512 +#define _MAX_SS CONFIG_FAT_MAX_SS + +/** + * When _MULTI_PARTITION is set to 0, each volume is bound to the same physical + * drive number and can mount only first primaly partition. When it is set to 1, + * each volume is tied to the partitions listed in Drives[]. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_MULTI_PARTITION 0 +#define _MULTI_PARTITION CONFIG_FAT_MULTI_PARTITION + +/** + * Specifies the OEM code page to be used on the target system. + * $WIZ$ type = "int" + */ +#define CONFIG_FAT_CODE_PAGE 850 +#define _CODE_PAGE CONFIG_FAT_CODE_PAGE + +/** + * Support for long filenames. Enable only if you have a valid Microsoft license. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_LFN 0 +#define _USE_LFN CONFIG_FAT_USE_LFN + +/** + * Maximum Long File Name length to handle. + * $WIZ$ type = "int"; min = 8; max = 255 + */ +#define CONFIG_FAT_MAX_LFN 255 +#define _MAX_LFN CONFIG_FAT_MAX_LFN + +#endif /* CFG_FAT_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_flash25.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_flash25.h new file mode 100644 index 00000000..f7ff219b --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_flash25.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for flash25 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_FLASH25_H +#define CFG_FLASH25_H + +/** + * Eeprom memory type. + * + *$WIZ$ type = "enum" + *$WIZ$ value_list = "flash25_list" + */ +#define CONFIG_FLASH25 FLASH25_AT25F2048 + +#endif /* CFG_FALSH25_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_formatwr.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_formatwr.h new file mode 100644 index 00000000..bac8aca7 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_formatwr.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief Configuration file for formatted write module. + * + * \author Daniele Basile + */ + +#ifndef CFG_FORMATWR_H +#define CFG_FORMATWR_H + +/** + * printf()-style formatter configuration. + * $WIZ$ type = "enum"; value_list = "printf_list" + * + * \sa PRINTF_DISABLED + * \sa PRINTF_NOMODIFIERS + * \sa PRINTF_REDUCED + * \sa PRINTF_NOFLOAT + * \sa PRINTF_FULL + */ +#define CONFIG_PRINTF PRINTF_FULL + +/** + * Size of buffer to format "%" sequences in printf. + * + * Warning: no check on buffer size is done when formatting, be careful especially + * with big numbers and %f formatting. + * + * $WIZ$ type = "int" + * $WIZ$ min = 4 + */ +#define CONFIG_FRMWRI_BUFSIZE 134 + +#endif /* CFG_FORMATWR_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_gfx.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_gfx.h new file mode 100644 index 00000000..59dde04c --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_gfx.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for GFX module. + * + * \author Daniele Basile + */ + +#ifndef CFG_GFX_H +#define CFG_GFX_H + +/** + * Enable line clipping algorithm. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_CLIPPING 1 + +/** + * Enable text rendering in bitmaps. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_TEXT 1 + +/** + * Enable virtual coordinate system. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_VCOORDS 1 + +/** + * Select bitmap pixel format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "bitmap_format" + */ +#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB + +#endif /* CFG_GFX_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_hashtable.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_hashtable.h new file mode 100644 index 00000000..e4645f33 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_hashtable.h @@ -0,0 +1,51 @@ +/** + * \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/arduino-mega/benchmark/context_switch/cfg/cfg_heap.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_heap.h new file mode 100644 index 00000000..dc4b1fa3 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_heap.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for heap module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_HEAP_H +#define CFG_HEAP_H + +/** + * Enable malloc/free like API. + * $WIZ$ type = "boolean" + */ +#define CONFIG_HEAP_MALLOC 1 + +#endif /* CFG_HEAP_H */ + + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2c.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2c.h new file mode 100644 index 00000000..7df0d097 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2c.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for I2C module. + * + * \author Daniele Basile + */ + +#ifndef CFG_I2C_H +#define CFG_I2C_H + +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ +#define CONFIG_I2C_FREQ 100000UL + +/** + * I2C start timeout. + * For how many milliseconds the i2c_start + * should try to get an ACK before + * returning error. + * + * $WIZ$ type = "int" + */ +#define CONFIG_I2C_START_TIMEOUT 100 + +/** + * I2C backend the driver should use. + * + * I2C_BACKEND_BUILTIN: Use (if present) the builtin i2c hardware. + * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. + * \see drv/i2c.h for more information. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "i2c_backend" + */ +#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define I2C_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define I2C_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_I2C_H */ + + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2s.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2s.h new file mode 100644 index 00000000..52fa8848 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_i2s.h @@ -0,0 +1,75 @@ +/** + * \file + * + * + * \brief Configuration file for I2S module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_I2S_H +#define CFG_I2S_H + +/** + * Length of each play buffer. + * + * $WIZ$ type = "int" + */ +#define CONFIG_PLAY_BUF_LEN 8192 + +/** + * Sampling frequency of the audio file. + * + * $WIZ$ type = "int" + * $WIZ$ min = 32000 + * $WIZ$ max = 192000 + */ +#define CONFIG_SAMPLE_FREQ 44100UL + +/** + * 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 + +#endif /* CFG_I2S_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ini_reader.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ini_reader.h new file mode 100644 index 00000000..702c78ee --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ini_reader.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Configuration file for ini reader module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_INI_READER_H +#define CFG_INI_READER_H + +/** + * Maximum ini file line length (chars). + * $WIZ$ type = "int"; min = 1 + */ +#define CONFIG_INI_MAX_LINE_LEN 64 + +#endif /* CFG_INI_READER_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_kbd.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_kbd.h new file mode 100644 index 00000000..116f3318 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_kbd.h @@ -0,0 +1,59 @@ +/** + * \file + * + * + * \brief Configuration file for keyboard module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_KBD_H +#define CFG_KBD_H + +/// Keyboard polling method. $WIZ$ supports = "False" +#define CONFIG_KBD_POLL KBD_POLL_SOFTINT + +/// Enable keyboard event delivery to observers. $WIZ$ type = "boolean" +#define CONFIG_KBD_OBSERVER 0 + +/// Enable key beeps. $WIZ$ type = "boolean" +#define CONFIG_KBD_BEEP 0 + +/// Enable long pression handler for keys. $WIZ$ type = "boolean" +#define CONFIG_KBD_LONGPRESS 0 + +/// Enable calling poor man's scheduler to be called inside kbd_peek. $WIZ$ type = "boolean" +#define CONFIG_KBD_SCHED 0 + +#endif /* CFG_KBD_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_keytag.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_keytag.h new file mode 100644 index 00000000..8bedadf6 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/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/arduino-mega/benchmark/context_switch/cfg/cfg_kfile.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_kfile.h new file mode 100644 index 00000000..0ebed7b1 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_kfile.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief Configuration file for KFile interface module. + * + * \author Daniele Basile + */ + +#ifndef CFG_KFILE_H +#define CFG_KFILE_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KFILE_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KFILE_LOG_FORMAT LOG_FMT_TERSE + +/** + * Enable the gets function with echo. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KFILE_GETS 0 + +#endif /* CFG_KFILE_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_32122a.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_32122a.h new file mode 100644 index 00000000..5a9b3ca7 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_32122a.h @@ -0,0 +1,63 @@ +/** + * \file + * + * + * \brief Displaytech 32122A LCD driver configuration file. + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ +#ifndef CFG_LCD_32122A_H +#define CFG_LCD_32122A_H + +/** + * Enable soft interrupt to refresh the LCD. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_SOFTINT_REFRESH 0 + +/** + * Enable wait macro when display is busy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_WAIT 0 + +/** + * Display refresh time 32122a. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_LCD_REFRESH 100 + +#endif /* CFG_LCD_32122A_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_hd44.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_hd44.h new file mode 100644 index 00000000..78f1f20b --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lcd_hd44.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for lcd display module. + * + * \author Daniele Basile + */ + +#ifndef CFG_LCD_H +#define CFG_LCD_H + +/** + * Use 4 bit addressing mode. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_4BIT 0 + +/** + * Use a table to speed up LCD memory addressing. + * This will use about 100 bytes of RAM. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_ADDRESS_FAST 1 + +#endif /* CFG_LCD_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lm75.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lm75.h new file mode 100644 index 00000000..91b347ad --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_lm75.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for the LM75 sensor temperature. + * + * \author Daniele Basile + */ + +#ifndef CFG_LM75_H +#define CFG_LM75_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define LM75_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define LM75_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_md2.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_md2.h new file mode 100644 index 00000000..22ec7dbe --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_md2.h @@ -0,0 +1,54 @@ +/** + * \file + * + * + * \brief Configuration file for MD2 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_MD2_H +#define CFG_MD2_H + +/** + * Size of block for MD2 algorithm. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_MD2_BLOCK_LEN 16 + +/// Use standard permutation in MD2 algorithm. $WIZ$ type = "boolean" +#define CONFIG_MD2_STD_PERM 0 + +#endif /* CFG_MD2_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_menu.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_menu.h new file mode 100644 index 00000000..bbfa1e76 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_menu.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for Menu module. + * + * \author Daniele Basile + */ + +#ifndef CFG_MENU_H +#define CFG_MENU_H + +/** + * Enable button bar behind menus + * $WIZ$ type = "boolean" + */ +#define CONFIG_MENU_MENUBAR 0 + +/** + * Level Edit Timeout + * $WIZ$ type = "boolean" + */ +#define CONFIG_LEVELEDIT_TIMEOUT 0 + +/** + * Menu timeout + * $WIZ$ type = "boolean" + */ +#define CONFIG_MENU_TIMEOUT 0 + +/** + * Enable smooth scrolling in menus + * $WIZ$ type = "boolean" + */ +#define CONFIG_MENU_SMOOTH 1 + + +#endif /* CFG_MENU_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_monitor.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_monitor.h new file mode 100644 index 00000000..ffe17c07 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_monitor.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 0 + +#endif /* CFG_MONITOR_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_nmea.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_nmea.h new file mode 100644 index 00000000..9249a9af --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_nmea.h @@ -0,0 +1,85 @@ +/** + * \file + * + * + * \brief Configuration file for NMEA module. + * + * \author Daniele Basile + */ + +#ifndef CFG_NMEA_H +#define CFG_NMEA_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define NMEA_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define NMEA_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Maximum number of sentence parsers supported. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCES 8 + +/** + * Max length of a complete sentence. The standard says 82 bytes, but its probably + * better to go at least 128 since some units don't adhere to the 82 bytes + * especially for proprietary sentences. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCE_LENGTH 255 + +/** + * Max tokens in one sentence. 24 is enough for any standard sentence. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_TOKENS 24 + +#endif /* CFG_NMEA_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_parser.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_parser.h new file mode 100644 index 00000000..572b4a24 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/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/arduino-mega/benchmark/context_switch/cfg/cfg_phase.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_phase.h new file mode 100644 index 00000000..57202930 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_phase.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for phase module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PHASE_H +#define CFG_PHASE_H + +/** + * Max value of the duty cycle on triac. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_DUTY 100 + +/** + * Max value of the triac power. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_POWER 100 + +#endif /* CFG_PHASE_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_pocketbus.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_pocketbus.h new file mode 100644 index 00000000..aa0b090b --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_pocketbus.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for pocketbus module. + * + * \author Daniele Basile + */ + +#ifndef CFG_POCKETBUS_H +#define CFG_POCKETBUS_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define POCKETBUS_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define POCKETBUS_LOG_FORMAT LOG_FMT_TERSE + + +/** + *Buffer len for pockebus protocol. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_POCKETBUS_BUFLEN 128 + +/** + * Command replay timeout in milliseconds. + * $WIZ$ type = "int" + */ +#define CONFIG_POCKETBUS_CMD_REPLY_TIMEOUT 50 + +#endif /* CFG_POCKETBUS_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_proc.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_proc.h new file mode 100644 index 00000000..ef228257 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_proc.h @@ -0,0 +1,107 @@ +/** + * \file + * + * + * \brief Kernel configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_PROC_H +#define CFG_PROC_H + +/** + * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN 1 + +/** + * Kernel interrupt supervisor. WARNING: Experimental, still incomplete! + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_KERN_IRQ 0 + +/** + * Preemptive process scheduling. + * + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "timer" + */ +#define CONFIG_KERN_PREEMPT 1 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_KERN_QUANTUM 11 + +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 1 + +/** + * Dynamic memory allocation for processes. + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "heap" + */ +#define CONFIG_KERN_HEAP 0 + +/** + * Size of the dynamic memory pool used by processes. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_KERN_HEAP_SIZE 2048L + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KERN_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PROC_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_pwm.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_pwm.h new file mode 100644 index 00000000..6627ee2d --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_pwm.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for PWM module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PWM_H +#define CFG_PWM_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define PWM_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define PWM_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PWM_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ramp.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ramp.h new file mode 100644 index 00000000..1aeb8a89 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ramp.h @@ -0,0 +1,116 @@ + /** + * \file + * + * + * \brief Configuration file Ramp algorithm module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_RAMP_H +#define CFG_RAMP_H + +/** + * Define whether the ramp will use floating point calculation within ramp_evaluate(). + * Otherwise, a less precise fixed point version will be used, which is faster on + * platforms which do no support floating point operations. + * + * \note Floating point operations will be always done within ramp_compute() to + * precalculate values, so there has to be at least a floating point emulation support. + * + * $WIZ$ type = "boolean" + */ +#define RAMP_USE_FLOATING_POINT 0 + + +#if !RAMP_USE_FLOATING_POINT + + /** + * Number of least-significant bits which are stripped away during ramp evaluation. + * This setting allows to specify larger ramps at the price of less precision. + * + * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks. + * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum + * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2 + * brings the maximum length to 13.4 secs, at the price of less precision. + * + * ramp_compute() will check that the length is below the maximum allowed through + * a runtime assertion. + * + * \note This macro is used only for the fixed-point version of the ramp. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ max = 32 + */ + #define RAMP_CLOCK_SHIFT_PRECISION 2 +#endif + + +/** +* Negative pulse width for ramp. +* $WIZ$ type = "int" +* $WIZ$ min = 1 +*/ +#define RAMP_PULSE_WIDTH 50 + +/** + * Default ramp time (microsecs). + * $WIZ$ type = "int" + * $WIZ$ min = 1000 + */ +#define RAMP_DEF_TIME 6000000UL +/** + * Default ramp maxfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MAXFREQ 5000 +/** + * Default ramp minfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MINFREQ 200 +/** + * Default ramp powerrun (deciampere). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERRUN 10 +/** + * Default ramp poweridle (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERIDLE 1 + +#endif /* CFG_RAMP_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_randpool.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_randpool.h new file mode 100644 index 00000000..83285984 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_randpool.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for randpool module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_RANDPOOL_H +#define CFG_RANDPOOL_H + + +/** + * Define a size, in byte, of entropy pool. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_SIZE_ENTROPY_POOL 64 + +/// Enable timer in randpool algo. $WIZ$ type = "boolean" +#define CONFIG_RANDPOOL_TIMER 1 + +#endif /* CFG_RANDPOOL_H */ + + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_sem.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_sem.h new file mode 100644 index 00000000..2a6de7a9 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_sem.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 0 + +#endif /* CFG_SEM_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ser.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ser.h new file mode 100644 index 00000000..91a10e0b --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_ser.h @@ -0,0 +1,222 @@ +/** + * \file + * + * + * \brief Configuration file for serial module. + * + * \author Daniele Basile + */ + +#ifndef CFG_SER_H +#define CFG_SER_H + +/** + * Example of setting for serial port and + * spi port. + * Edit these define for your project. + */ + +/** + * Size of the outbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_RXBUFSIZE 32 + + +/** + * Size of the outbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_RXBUFSIZE 32 + +/** + * SPI data order. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_order_bit" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST + +/** + * SPI clock division factor. + * $WIZ$ type = "int" + * $WIZ$ supports = "avr" + */ +#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" + */ +#define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW + +/** + * SPI clock phase you can choose sample on first edge or + * sample on second clock edge. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_spi_phase" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE + +/** + * Default transmit timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_TXTIMEOUT -1 + +/** + * Default receive timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_RXTIMEOUT -1 + +/** + * Use RTS/CTS handshake. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_SER_HWHANDSHAKE 0 + +/** + * Default baudrate for all serial ports (set to 0 to disable). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_SER_DEFBAUDRATE 0UL + +/// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean" +#define CONFIG_SER_STROBE 0 + +#endif /* CFG_SER_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_signal.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_signal.h new file mode 100644 index 00000000..ed85119b --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_signal.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 1 + +#endif /* CFG_SIGNAL_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_spi_bitbang.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_spi_bitbang.h new file mode 100644 index 00000000..6e9a96bc --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_spi_bitbang.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for SPI bitbang module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_SPI_BITBANG_H +#define CFG_SPI_BITBANG_H + +/** + * Set data order for emulated SPI. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ordet_bit_list" + */ +#define CONFIG_SPI_DATAORDER SPI_LSB_FIRST + +#endif /* CFG_SPI_BITBANG_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_stepper.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_stepper.h new file mode 100644 index 00000000..e086065c --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_stepper.h @@ -0,0 +1,70 @@ +/** + * \file + * + * + * \brief Configuration file for stepper motor module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_STEPPER_H +#define CFG_STEPPER_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define STEPPER_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define STEPPER_LOG_FORMAT LOG_FMT_TERSE + +/** + * Max number of the stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_STEPPER_MOTORS 6 + +/** + * Max number of the timer usable on target to drive stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TC_STEPPER_MAX_NUM 6 + +#endif /* CFG_STEPPER_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_tas5706a.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_tas5706a.h new file mode 100644 index 00000000..e1112c0f --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_tas5706a.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for the TAS5706A module. + * + * \version $Id$ + * \author Luca Ottaviano + */ + +#ifndef CFG_TAS5706A_H +#define CFG_TAS5706A_H + +/** + * Maximum output volume for TAS chip [dB]. + * + * $WIZ$ type = "int" + * $WIZ$ min = -100 + * $WIZ$ max = 24 + */ +#define CONFIG_TAS_MAX_VOL -39 + +#endif /* CFG_TAS5706A_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_thermo.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_thermo.h new file mode 100644 index 00000000..2734f899 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_thermo.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for thermo module. + * + * \author Daniele Basile + */ + +#ifndef CFG_THERMO_H +#define CFG_THERMO_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_THERMO_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_THERMO_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Interval at which thermo control is performed [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_INTERVAL_MS 100 + +/** + * Number of different samples we interpolate over to get the hifi temperature. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_HIFI_NUM_SAMPLES 10 + +#endif /* CFG_THERMO_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_timer.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_timer.h new file mode 100644 index 00000000..1cff78b8 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_timer.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for timer module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_TIMER_H +#define CFG_TIMER_H + +/** + * Hardware timer selection for drv/timer.c. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "timer_select" + */ +#define CONFIG_TIMER TIMER_DEFAULT + +/** + * Debug timer interrupt using a strobe pin. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_STROBE 0 + +/** + * Enable asynchronous timers. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_EVENTS 1 + +/** + * Support hi-res timer_usleep(). + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_UDELAY 1 + +#endif /* CFG_TIMER_H */ diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_wdt.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_wdt.h new file mode 100644 index 00000000..9f4caae9 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_wdt.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Configuration file for watchdog module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_WDT_H +#define CFG_WDT_H + +/// Enable watchdog timer. $WIZ$ type = "autoenabled" +#define CONFIG_WATCHDOG 0 + +#endif /* CFG_WDT_H */ + + diff --git a/boards/arduino-mega/benchmark/context_switch/cfg/cfg_xmodem.h b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_xmodem.h new file mode 100644 index 00000000..38db7359 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/cfg/cfg_xmodem.h @@ -0,0 +1,79 @@ +/** + * \file + * + * + * \brief Configuration file for xmodem module. + * + * \author Daniele Basile + */ + +#ifndef CFG_XMODEM_H +#define CFG_XMODEM_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_XMODEM_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_XMODEM_LOG_FORMAT LOG_FMT_TERSE + + +/// Enable Rx. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_RECV 1 + +/// Enable TX. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_SEND 1 + +/// Allow a Rx/Tx of 1Kbyte block. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_1KCRC 1 + +/** + * Max retries before giving up. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXRETRIES 15 + +/** + * Max retries before switching to BCC. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXCRCRETRIES 7 + +#endif /* CFG_XMODEM_H */ + diff --git a/boards/arduino-mega/benchmark/context_switch/context_switch.mk b/boards/arduino-mega/benchmark/context_switch/context_switch.mk new file mode 100644 index 00000000..207a3eab --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/context_switch.mk @@ -0,0 +1,89 @@ +# +# Wizard autogenerated makefile. +# DO NOT EDIT, use the context_switch_user.mk file instead. +# + +# Constants automatically defined by the selected modules + + +# Our target application +TRG += context_switch + +context_switch_PREFIX = "avr-" + +context_switch_SUFFIX = "" + +context_switch_SRC_PATH = boards/arduino/benchmark/context_switch + +context_switch_HW_PATH = boards/arduino + +# Files automatically generated by the wizard. DO NOT EDIT, USE context_switch_USER_CSRC INSTEAD! +context_switch_WIZARD_CSRC = \ + bertos/benchmark/context_switch.c \ + bertos/kern/signal.c \ + bertos/kern/kfile.c \ + bertos/struct/heap.c \ + bertos/mware/formatwr.c \ + bertos/mware/event.c \ + bertos/drv/timer.c \ + bertos/cpu/avr/drv/timer_avr.c \ + bertos/kern/proc.c \ + bertos/cpu/avr/drv/ser_avr.c \ + bertos/drv/ser.c \ + bertos/mware/hex.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE context_switch_USER_PCSRC INSTEAD! +context_switch_WIZARD_PCSRC = \ + bertos/mware/formatwr.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE context_switch_USER_CPPASRC INSTEAD! +context_switch_WIZARD_CPPASRC = \ + bertos/cpu/avr/hw/switch_ctx_avr.S \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE context_switch_USER_CXXSRC INSTEAD! +context_switch_WIZARD_CXXSRC = \ + \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE context_switch_USER_ASRC INSTEAD! +context_switch_WIZARD_ASRC = \ + \ + # + +context_switch_CPPFLAGS = -D'CPU_FREQ=(16000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(context_switch_HW_PATH) -I$(context_switch_SRC_PATH) $(context_switch_CPU_CPPFLAGS) $(context_switch_USER_CPPFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_LDFLAGS = $(context_switch_CPU_LDFLAGS) $(context_switch_WIZARD_LDFLAGS) $(context_switch_USER_LDFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_CPPAFLAGS = $(context_switch_CPU_CPPAFLAGS) $(context_switch_WIZARD_CPPAFLAGS) $(context_switch_USER_CPPAFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_CSRC = $(context_switch_CPU_CSRC) $(context_switch_WIZARD_CSRC) $(context_switch_USER_CSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_PCSRC = $(context_switch_CPU_PCSRC) $(context_switch_WIZARD_PCSRC) $(context_switch_USER_PCSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_CPPASRC = $(context_switch_CPU_CPPASRC) $(context_switch_WIZARD_CPPASRC) $(context_switch_USER_CPPASRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_CXXSRC = $(context_switch_CPU_CXXSRC) $(context_switch_WIZARD_CXXSRC) $(context_switch_USER_CXXSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_ASRC = $(context_switch_CPU_ASRC) $(context_switch_WIZARD_ASRC) $(context_switch_USER_ASRC) + +# CPU specific flags and options, defined in the CPU definition files. +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +context_switch_MCU = atmega328p +context_switch_CPU_CPPFLAGS = -Os -Ibertos/cpu/avr/ +context_switch_PROGRAMMER_CPU = atmega328p +context_switch_STOPFLASH_SCRIPT = bertos/prg_scripts/avr/stopflash.sh +context_switch_STOPDEBUG_SCRIPT = bertos/prg_scripts/none.sh +context_switch_DEBUG_SCRIPT = bertos/prg_scripts/nodebug.sh +context_switch_FLASH_SCRIPT = bertos/prg_scripts/avr/flash.sh + +include $(context_switch_SRC_PATH)/context_switch_user.mk diff --git a/boards/arduino-mega/benchmark/context_switch/context_switch_user.mk b/boards/arduino-mega/benchmark/context_switch/context_switch_user.mk new file mode 100644 index 00000000..4bc28c58 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/context_switch_user.mk @@ -0,0 +1,44 @@ +# +# User makefile. +# Edit this file to change compiler options and related stuff. +# + +# Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help +context_switch_PROGRAMMER_TYPE = none +context_switch_PROGRAMMER_PORT = none + +# Files included by the user. +context_switch_USER_CSRC = \ + $(context_switch_SRC_PATH)/main.c \ + # + +# Files included by the user. +context_switch_USER_PCSRC = \ + # + +# Files included by the user. +context_switch_USER_CPPASRC = \ + # + +# Files included by the user. +context_switch_USER_CXXSRC = \ + # + +# Files included by the user. +context_switch_USER_ASRC = \ + # + +# Flags included by the user. +context_switch_USER_LDFLAGS = \ + # + +# Flags included by the user. +context_switch_USER_CPPAFLAGS = \ + # + +# Flags included by the user. +context_switch_USER_CPPFLAGS = \ + -O2 \ + -fno-strict-aliasing \ + -fwrapv \ + # diff --git a/boards/arduino-mega/benchmark/context_switch/main.c b/boards/arduino-mega/benchmark/context_switch/main.c new file mode 100644 index 00000000..ef29fb02 --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/main.c @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \author Daniele Basile + * + * \brief Kernel context switch benchmark. + * + * This benchmark measures the overhead (in µs) required to deliver a + * signal and switch from a low-priority process to a high-priority process. + * + * The measure is made by the high-precision timer if supported by the + * architecture. Alternatively, the time can also be measured using an external + * oscilloscope connected to the board's status LED. + */ + +#include + +int main(void) +{ + context_switch(); + while (1) + { + } + + return 0; +} + diff --git a/boards/arduino-mega/benchmark/context_switch/project.bertos b/boards/arduino-mega/benchmark/context_switch/project.bertos new file mode 100644 index 00000000..659ce75a --- /dev/null +++ b/boards/arduino-mega/benchmark/context_switch/project.bertos @@ -0,0 +1,63 @@ +(dp0 +S'BERTOS_PATH' +p1 +S'../../../..' +p2 +sS'SELECTED_FREQ' +p3 +V16000000 +p4 +sS'WIZARD_VERSION' +p5 +I3 +sS'PROJECT_NAME' +p6 +Vcontext_switch +p7 +sS'TOOLCHAIN' +p8 +(dp9 +Vpath +p10 +V/opt/avr-4.3.2/bin/avr-gcc +p11 +ssS'ENABLED_MODULES' +p12 +(lp13 +S'ser' +p14 +aS'kernel' +p15 +aS'formatwr' +p16 +aS'kfile' +p17 +aS'context_switch' +p18 +aS'heap' +p19 +aS'signal' +p20 +aS'timer' +p21 +asS'CPU_NAME' +p22 +VATmega1280 +p23 +sS'PROJECT_HW_PATH' +p24 +S'../..' +p25 +sS'PROJECT_SRC_PATH' +p26 +S'.' +p27 +sS'PRESET' +p28 +I01 +sS'OUTPUT' +p29 +(lp30 +S'codelite' +p31 +as. diff --git a/boards/arduino-mega/benchmark/kernel_footprint/.spec b/boards/arduino-mega/benchmark/kernel_footprint/.spec new file mode 100644 index 00000000..5a527bef --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/.spec @@ -0,0 +1,14 @@ +name = 'BeRTOS Kernel footprint' +description=""" +

+This benchmark measures the memory footprint of the BeRTOS kernel with a +simple minimalist user application. +

+

+The purpose of this test is to give a measure of the required space in a +generic flash memory to store a full-featured BeRTOS kernel. +

+

+For more information have a look at the BeRTOS benchmarks page. +

+""" diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_adc.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_adc.h new file mode 100644 index 00000000..dd65e134 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_adc.h @@ -0,0 +1,110 @@ +/** + * \file + * + * + * \brief Configuration file for the ADC module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_ADC_H +#define CFG_ADC_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define ADC_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define ADC_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Clock Frequency for ADC conversion. + * + * $WIZ$ type = "int" + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_CLOCK 4800000UL + +/** + * Minimum time for starting up a conversion [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_STARTUP_TIME 20 + +/** + * Minimum time for sample and hold [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_SHTIME 834 + +/** + * ADC Voltage Reference. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "avr_adc_refs" + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_REF ADC_AVR_AVCC + +/** + * ADC clock divisor from main crystal. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ max = 128 + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_DIVISOR 2 + +/** + * Enable ADC strobe for debugging ADC ISR. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_ADC_STROBE 0 + +#endif /* CFG_ADC_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_afsk.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_afsk.h new file mode 100644 index 00000000..cce47c1f --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_afsk.h @@ -0,0 +1,113 @@ +/** + * \file + * + * + * \brief Configuration file for AFSK1200 modem. + * + * \author Francesco Sacchi + */ + +#ifndef CFG_AFSK_H +#define CFG_AFSK_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AFSK_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AFSK_LOG_FORMAT LOG_FMT_TERSE + + +/** + * AFSK discriminator filter type. + * + * $WIZ$ type = "enum"; value_list = "afsk_filter_list" + */ +#define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV + + +/** + * AFSK receiver buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_RX_BUFLEN 32 + +/** + * AFSK transimtter buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_TX_BUFLEN 32 + +/** + * AFSK DAC sample rate for modem outout. + * $WIZ$ type = "int" + * $WIZ$ min = 2400 + */ +#define CONFIG_AFSK_DAC_SAMPLERATE 9600 + +/** + * AFSK RX timeout in ms, set to -1 to disable. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_AFSK_RXTIMEOUT 0 + + +/** + * AFSK Preamble length in [ms], before starting transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_PREAMBLE_LEN 300UL + + + +/** + * AFSK Trailer length in [ms], before stopping transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_TRAILER_LEN 50UL + +#endif /* CFG_AFSK_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ax25.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ax25.h new file mode 100644 index 00000000..64f862f1 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ax25.h @@ -0,0 +1,76 @@ +/** + * \file + * + * + * \brief Configuration file for the AX25 protocol module. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef CFG_AX25_H +#define CFG_AX25_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AX25_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AX25_LOG_FORMAT LOG_FMT_TERSE + +/** + * AX25 frame buffer lenght. + * + * $WIZ$ type = "int" + * $WIZ$ min = 18 + */ +#define CONFIG_AX25_FRAME_BUF_LEN 330 + + +/** + * Enable repeaters listing in AX25 frames. + * If enabled use 56 addtional bytes of RAM + * for each message received. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_AX25_RPT_LST 1 + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_battfs.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_battfs.h new file mode 100644 index 00000000..fb438a08 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_battfs.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for BattFS module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_BATTFS_H +#define CFG_BATTFS_H + + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define BATTFS_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define BATTFS_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Set to 1 to enable free page shuffling. + * This increase memories life but makes debugging + * more difficult due to its unrepeteable state. + * $WIZ$ type = "boolean" + */ +#define CONFIG_BATTFS_SHUFFLE_FREE_PAGES 0 + + +#endif /* BATTFS */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_context_switch.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_context_switch.h new file mode 100644 index 00000000..fe0b4f87 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_context_switch.h @@ -0,0 +1,71 @@ +/** + * \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. + * + * $WIZ$ type = "boolean" + * $WIZ$ module= "boolean" + * $WIZ$ conditional_deps = "ser" + */ +#define CONFIG_USE_HP_TIMER 1 + + +/** + * Use board led for benchmark. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_USE_LED 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/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dataflash.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dataflash.h new file mode 100644 index 00000000..8bd7828a --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dataflash.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for data flash memory module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_DATAFLASH_H +#define CFG_DATAFLASH_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DATAFLASH_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DATAFLASH_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_DATAFLASH_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dc_motor.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dc_motor.h new file mode 100644 index 00000000..fd9bac73 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_dc_motor.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief Configuration file for DC motor module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DC_MOTOR_H +#define CFG_DC_MOTOR_H + +/** + * Number of the DC motors to manage. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_DC_MOTOR 4 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE + + +/** + * Min value of DC motor speed. + * \note Generally this value is the min value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_MIN_SPEED 0 + + +/** + * Max value of DC motor speed. + * \note Generally this value is the max value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + * $WIZ$ max = 65535 + */ +#define CONFIG_DC_MOTOR_MAX_SPEED 65535 + + +/** + * Sampling period in millisecond. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_PERIOD 40 + +/** + * Amount of millisecond before to read sample. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_DELAY 2 + +/** + * This control set which mode the driver use to lock share + * resources when we use the preempitive kernel. + * If we set to 1 we use the semaphore module otherwise the + * driver disable the switch context every time we need to access + * to shared sources. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_USE_SEM 1 + +#endif /* CFG_DC_MOTOR_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_debug.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_debug.h new file mode 100644 index 00000000..f7596ca1 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_debug.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for Debug module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_DEBUG_H +#define CFG_DEBUG_H + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_KDEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_KDEBUG_BAUDRATE 115200UL + +#endif /* CFG_DEBUG_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_fat.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_fat.h new file mode 100644 index 00000000..d418b783 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_fat.h @@ -0,0 +1,140 @@ +/** + * \file + * + * + * \brief Configuration file for Fat module. + * + * \version $Id$ + * + * \author Luca Ottaviano + * \author Francesco Sacchi + */ + +#ifndef CFG_FAT_H +#define CFG_FAT_H + +/** + * Use word alignment to access FAT structure. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_WORD_ACCESS 0 +#define _WORD_ACCESS CONFIG_FAT_WORD_ACCESS + +/** + * Enable read functions only. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_READONLY 0 +#define _FS_READONLY CONFIG_FAT_FS_READONLY + +/** + * Minimization level to remove some functions. + * $WIZ$ type = "int"; min = 0; max = 3 + */ +#define CONFIG_FAT_FS_MINIMIZE 0 +#define _FS_MINIMIZE CONFIG_FAT_FS_MINIMIZE + +/** + * If enabled, this reduces memory consumption 512 bytes each file object by using a shared buffer. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_TINY 1 +#define _FS_TINY CONFIG_FAT_FS_TINY + +/** + * To enable string functions, set _USE_STRFUNC to 1 or 2. + * $WIZ$ type = "int" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_USE_STRFUNC 0 +#define _USE_STRFUNC CONFIG_FAT_USE_STRFUNC + +/** + * Enable f_mkfs function. Requires CONFIG_FAT_FS_READONLY = 0. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_MKFS 0 +#define _USE_MKFS (CONFIG_FAT_USE_MKFS && !CONFIG_FAT_FS_READONLY) + +/** + * Enable f_forward function. Requires CONFIG_FAT_FS_TINY. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_FORWARD 0 +#define _USE_FORWARD (CONFIG_FAT_USE_FORWARD && CONFIG_FAT_FS_TINY) + +/** + * Number of volumes (logical drives) to be used. + * $WIZ$ type = "int"; min = 1; max = 255 + */ +#define CONFIG_FAT_DRIVES 1 +#define _DRIVES CONFIG_FAT_DRIVES + +/** + * Maximum sector size to be handled. (512/1024/2048/4096). + * 512 for memory card and hard disk, 1024 for floppy disk, 2048 for MO disk + * $WIZ$ type = "int"; min = 512; max = 4096 + */ +#define CONFIG_FAT_MAX_SS 512 +#define _MAX_SS CONFIG_FAT_MAX_SS + +/** + * When _MULTI_PARTITION is set to 0, each volume is bound to the same physical + * drive number and can mount only first primaly partition. When it is set to 1, + * each volume is tied to the partitions listed in Drives[]. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_MULTI_PARTITION 0 +#define _MULTI_PARTITION CONFIG_FAT_MULTI_PARTITION + +/** + * Specifies the OEM code page to be used on the target system. + * $WIZ$ type = "int" + */ +#define CONFIG_FAT_CODE_PAGE 850 +#define _CODE_PAGE CONFIG_FAT_CODE_PAGE + +/** + * Support for long filenames. Enable only if you have a valid Microsoft license. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_LFN 0 +#define _USE_LFN CONFIG_FAT_USE_LFN + +/** + * Maximum Long File Name length to handle. + * $WIZ$ type = "int"; min = 8; max = 255 + */ +#define CONFIG_FAT_MAX_LFN 255 +#define _MAX_LFN CONFIG_FAT_MAX_LFN + +#endif /* CFG_FAT_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_flash25.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_flash25.h new file mode 100644 index 00000000..f7ff219b --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_flash25.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for flash25 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_FLASH25_H +#define CFG_FLASH25_H + +/** + * Eeprom memory type. + * + *$WIZ$ type = "enum" + *$WIZ$ value_list = "flash25_list" + */ +#define CONFIG_FLASH25 FLASH25_AT25F2048 + +#endif /* CFG_FALSH25_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_formatwr.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_formatwr.h new file mode 100644 index 00000000..bac8aca7 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_formatwr.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief Configuration file for formatted write module. + * + * \author Daniele Basile + */ + +#ifndef CFG_FORMATWR_H +#define CFG_FORMATWR_H + +/** + * printf()-style formatter configuration. + * $WIZ$ type = "enum"; value_list = "printf_list" + * + * \sa PRINTF_DISABLED + * \sa PRINTF_NOMODIFIERS + * \sa PRINTF_REDUCED + * \sa PRINTF_NOFLOAT + * \sa PRINTF_FULL + */ +#define CONFIG_PRINTF PRINTF_FULL + +/** + * Size of buffer to format "%" sequences in printf. + * + * Warning: no check on buffer size is done when formatting, be careful especially + * with big numbers and %f formatting. + * + * $WIZ$ type = "int" + * $WIZ$ min = 4 + */ +#define CONFIG_FRMWRI_BUFSIZE 134 + +#endif /* CFG_FORMATWR_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_gfx.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_gfx.h new file mode 100644 index 00000000..59dde04c --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_gfx.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for GFX module. + * + * \author Daniele Basile + */ + +#ifndef CFG_GFX_H +#define CFG_GFX_H + +/** + * Enable line clipping algorithm. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_CLIPPING 1 + +/** + * Enable text rendering in bitmaps. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_TEXT 1 + +/** + * Enable virtual coordinate system. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_VCOORDS 1 + +/** + * Select bitmap pixel format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "bitmap_format" + */ +#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB + +#endif /* CFG_GFX_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_hashtable.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_hashtable.h new file mode 100644 index 00000000..e4645f33 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_hashtable.h @@ -0,0 +1,51 @@ +/** + * \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/arduino-mega/benchmark/kernel_footprint/cfg/cfg_heap.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_heap.h new file mode 100644 index 00000000..dc4b1fa3 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_heap.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for heap module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_HEAP_H +#define CFG_HEAP_H + +/** + * Enable malloc/free like API. + * $WIZ$ type = "boolean" + */ +#define CONFIG_HEAP_MALLOC 1 + +#endif /* CFG_HEAP_H */ + + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2c.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2c.h new file mode 100644 index 00000000..7df0d097 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2c.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for I2C module. + * + * \author Daniele Basile + */ + +#ifndef CFG_I2C_H +#define CFG_I2C_H + +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ +#define CONFIG_I2C_FREQ 100000UL + +/** + * I2C start timeout. + * For how many milliseconds the i2c_start + * should try to get an ACK before + * returning error. + * + * $WIZ$ type = "int" + */ +#define CONFIG_I2C_START_TIMEOUT 100 + +/** + * I2C backend the driver should use. + * + * I2C_BACKEND_BUILTIN: Use (if present) the builtin i2c hardware. + * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. + * \see drv/i2c.h for more information. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "i2c_backend" + */ +#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define I2C_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define I2C_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_I2C_H */ + + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2s.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2s.h new file mode 100644 index 00000000..52fa8848 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_i2s.h @@ -0,0 +1,75 @@ +/** + * \file + * + * + * \brief Configuration file for I2S module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_I2S_H +#define CFG_I2S_H + +/** + * Length of each play buffer. + * + * $WIZ$ type = "int" + */ +#define CONFIG_PLAY_BUF_LEN 8192 + +/** + * Sampling frequency of the audio file. + * + * $WIZ$ type = "int" + * $WIZ$ min = 32000 + * $WIZ$ max = 192000 + */ +#define CONFIG_SAMPLE_FREQ 44100UL + +/** + * 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 + +#endif /* CFG_I2S_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ini_reader.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ini_reader.h new file mode 100644 index 00000000..702c78ee --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ini_reader.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Configuration file for ini reader module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_INI_READER_H +#define CFG_INI_READER_H + +/** + * Maximum ini file line length (chars). + * $WIZ$ type = "int"; min = 1 + */ +#define CONFIG_INI_MAX_LINE_LEN 64 + +#endif /* CFG_INI_READER_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kbd.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kbd.h new file mode 100644 index 00000000..116f3318 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kbd.h @@ -0,0 +1,59 @@ +/** + * \file + * + * + * \brief Configuration file for keyboard module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_KBD_H +#define CFG_KBD_H + +/// Keyboard polling method. $WIZ$ supports = "False" +#define CONFIG_KBD_POLL KBD_POLL_SOFTINT + +/// Enable keyboard event delivery to observers. $WIZ$ type = "boolean" +#define CONFIG_KBD_OBSERVER 0 + +/// Enable key beeps. $WIZ$ type = "boolean" +#define CONFIG_KBD_BEEP 0 + +/// Enable long pression handler for keys. $WIZ$ type = "boolean" +#define CONFIG_KBD_LONGPRESS 0 + +/// Enable calling poor man's scheduler to be called inside kbd_peek. $WIZ$ type = "boolean" +#define CONFIG_KBD_SCHED 0 + +#endif /* CFG_KBD_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_keytag.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_keytag.h new file mode 100644 index 00000000..8bedadf6 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/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/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kfile.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kfile.h new file mode 100644 index 00000000..0ebed7b1 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_kfile.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief Configuration file for KFile interface module. + * + * \author Daniele Basile + */ + +#ifndef CFG_KFILE_H +#define CFG_KFILE_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KFILE_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KFILE_LOG_FORMAT LOG_FMT_TERSE + +/** + * Enable the gets function with echo. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KFILE_GETS 0 + +#endif /* CFG_KFILE_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_32122a.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_32122a.h new file mode 100644 index 00000000..5a9b3ca7 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_32122a.h @@ -0,0 +1,63 @@ +/** + * \file + * + * + * \brief Displaytech 32122A LCD driver configuration file. + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ +#ifndef CFG_LCD_32122A_H +#define CFG_LCD_32122A_H + +/** + * Enable soft interrupt to refresh the LCD. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_SOFTINT_REFRESH 0 + +/** + * Enable wait macro when display is busy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_WAIT 0 + +/** + * Display refresh time 32122a. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_LCD_REFRESH 100 + +#endif /* CFG_LCD_32122A_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_hd44.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_hd44.h new file mode 100644 index 00000000..78f1f20b --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lcd_hd44.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for lcd display module. + * + * \author Daniele Basile + */ + +#ifndef CFG_LCD_H +#define CFG_LCD_H + +/** + * Use 4 bit addressing mode. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_4BIT 0 + +/** + * Use a table to speed up LCD memory addressing. + * This will use about 100 bytes of RAM. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_ADDRESS_FAST 1 + +#endif /* CFG_LCD_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lm75.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lm75.h new file mode 100644 index 00000000..91b347ad --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_lm75.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for the LM75 sensor temperature. + * + * \author Daniele Basile + */ + +#ifndef CFG_LM75_H +#define CFG_LM75_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define LM75_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define LM75_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_md2.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_md2.h new file mode 100644 index 00000000..22ec7dbe --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_md2.h @@ -0,0 +1,54 @@ +/** + * \file + * + * + * \brief Configuration file for MD2 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_MD2_H +#define CFG_MD2_H + +/** + * Size of block for MD2 algorithm. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_MD2_BLOCK_LEN 16 + +/// Use standard permutation in MD2 algorithm. $WIZ$ type = "boolean" +#define CONFIG_MD2_STD_PERM 0 + +#endif /* CFG_MD2_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_monitor.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_monitor.h new file mode 100644 index 00000000..ffe17c07 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_monitor.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 0 + +#endif /* CFG_MONITOR_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_nmea.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_nmea.h new file mode 100644 index 00000000..9249a9af --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_nmea.h @@ -0,0 +1,85 @@ +/** + * \file + * + * + * \brief Configuration file for NMEA module. + * + * \author Daniele Basile + */ + +#ifndef CFG_NMEA_H +#define CFG_NMEA_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define NMEA_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define NMEA_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Maximum number of sentence parsers supported. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCES 8 + +/** + * Max length of a complete sentence. The standard says 82 bytes, but its probably + * better to go at least 128 since some units don't adhere to the 82 bytes + * especially for proprietary sentences. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCE_LENGTH 255 + +/** + * Max tokens in one sentence. 24 is enough for any standard sentence. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_TOKENS 24 + +#endif /* CFG_NMEA_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_parser.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_parser.h new file mode 100644 index 00000000..572b4a24 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/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/arduino-mega/benchmark/kernel_footprint/cfg/cfg_phase.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_phase.h new file mode 100644 index 00000000..57202930 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_phase.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for phase module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PHASE_H +#define CFG_PHASE_H + +/** + * Max value of the duty cycle on triac. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_DUTY 100 + +/** + * Max value of the triac power. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_POWER 100 + +#endif /* CFG_PHASE_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pocketbus.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pocketbus.h new file mode 100644 index 00000000..aa0b090b --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pocketbus.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for pocketbus module. + * + * \author Daniele Basile + */ + +#ifndef CFG_POCKETBUS_H +#define CFG_POCKETBUS_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define POCKETBUS_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define POCKETBUS_LOG_FORMAT LOG_FMT_TERSE + + +/** + *Buffer len for pockebus protocol. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_POCKETBUS_BUFLEN 128 + +/** + * Command replay timeout in milliseconds. + * $WIZ$ type = "int" + */ +#define CONFIG_POCKETBUS_CMD_REPLY_TIMEOUT 50 + +#endif /* CFG_POCKETBUS_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_proc.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_proc.h new file mode 100644 index 00000000..ab1a4680 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_proc.h @@ -0,0 +1,107 @@ +/** + * \file + * + * + * \brief Kernel configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_PROC_H +#define CFG_PROC_H + +/** + * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN 1 + +/** + * Kernel interrupt supervisor. WARNING: Experimental, still incomplete! + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_KERN_IRQ 0 + +/** + * Preemptive process scheduling. + * + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "timer" + */ +#define CONFIG_KERN_PREEMPT 1 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_KERN_QUANTUM 11 + +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 1 + +/** + * Dynamic memory allocation for processes. + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "heap" + */ +#define CONFIG_KERN_HEAP 1 + +/** + * Size of the dynamic memory pool used by processes. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_KERN_HEAP_SIZE 2048L + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KERN_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PROC_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pwm.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pwm.h new file mode 100644 index 00000000..6627ee2d --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_pwm.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for PWM module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PWM_H +#define CFG_PWM_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define PWM_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define PWM_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PWM_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ramp.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ramp.h new file mode 100644 index 00000000..1aeb8a89 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ramp.h @@ -0,0 +1,116 @@ + /** + * \file + * + * + * \brief Configuration file Ramp algorithm module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_RAMP_H +#define CFG_RAMP_H + +/** + * Define whether the ramp will use floating point calculation within ramp_evaluate(). + * Otherwise, a less precise fixed point version will be used, which is faster on + * platforms which do no support floating point operations. + * + * \note Floating point operations will be always done within ramp_compute() to + * precalculate values, so there has to be at least a floating point emulation support. + * + * $WIZ$ type = "boolean" + */ +#define RAMP_USE_FLOATING_POINT 0 + + +#if !RAMP_USE_FLOATING_POINT + + /** + * Number of least-significant bits which are stripped away during ramp evaluation. + * This setting allows to specify larger ramps at the price of less precision. + * + * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks. + * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum + * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2 + * brings the maximum length to 13.4 secs, at the price of less precision. + * + * ramp_compute() will check that the length is below the maximum allowed through + * a runtime assertion. + * + * \note This macro is used only for the fixed-point version of the ramp. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ max = 32 + */ + #define RAMP_CLOCK_SHIFT_PRECISION 2 +#endif + + +/** +* Negative pulse width for ramp. +* $WIZ$ type = "int" +* $WIZ$ min = 1 +*/ +#define RAMP_PULSE_WIDTH 50 + +/** + * Default ramp time (microsecs). + * $WIZ$ type = "int" + * $WIZ$ min = 1000 + */ +#define RAMP_DEF_TIME 6000000UL +/** + * Default ramp maxfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MAXFREQ 5000 +/** + * Default ramp minfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MINFREQ 200 +/** + * Default ramp powerrun (deciampere). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERRUN 10 +/** + * Default ramp poweridle (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERIDLE 1 + +#endif /* CFG_RAMP_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_randpool.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_randpool.h new file mode 100644 index 00000000..83285984 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_randpool.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for randpool module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_RANDPOOL_H +#define CFG_RANDPOOL_H + + +/** + * Define a size, in byte, of entropy pool. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_SIZE_ENTROPY_POOL 64 + +/// Enable timer in randpool algo. $WIZ$ type = "boolean" +#define CONFIG_RANDPOOL_TIMER 1 + +#endif /* CFG_RANDPOOL_H */ + + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_sem.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_sem.h new file mode 100644 index 00000000..86ed110d --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_sem.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 1 + +#endif /* CFG_SEM_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ser.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ser.h new file mode 100644 index 00000000..91a10e0b --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_ser.h @@ -0,0 +1,222 @@ +/** + * \file + * + * + * \brief Configuration file for serial module. + * + * \author Daniele Basile + */ + +#ifndef CFG_SER_H +#define CFG_SER_H + +/** + * Example of setting for serial port and + * spi port. + * Edit these define for your project. + */ + +/** + * Size of the outbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_RXBUFSIZE 32 + + +/** + * Size of the outbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_RXBUFSIZE 32 + +/** + * SPI data order. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_order_bit" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST + +/** + * SPI clock division factor. + * $WIZ$ type = "int" + * $WIZ$ supports = "avr" + */ +#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" + */ +#define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW + +/** + * SPI clock phase you can choose sample on first edge or + * sample on second clock edge. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_spi_phase" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE + +/** + * Default transmit timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_TXTIMEOUT -1 + +/** + * Default receive timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_RXTIMEOUT -1 + +/** + * Use RTS/CTS handshake. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_SER_HWHANDSHAKE 0 + +/** + * Default baudrate for all serial ports (set to 0 to disable). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_SER_DEFBAUDRATE 0UL + +/// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean" +#define CONFIG_SER_STROBE 0 + +#endif /* CFG_SER_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_signal.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_signal.h new file mode 100644 index 00000000..ed85119b --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_signal.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 1 + +#endif /* CFG_SIGNAL_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_spi_bitbang.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_spi_bitbang.h new file mode 100644 index 00000000..6e9a96bc --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_spi_bitbang.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for SPI bitbang module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_SPI_BITBANG_H +#define CFG_SPI_BITBANG_H + +/** + * Set data order for emulated SPI. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ordet_bit_list" + */ +#define CONFIG_SPI_DATAORDER SPI_LSB_FIRST + +#endif /* CFG_SPI_BITBANG_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_stepper.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_stepper.h new file mode 100644 index 00000000..e086065c --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_stepper.h @@ -0,0 +1,70 @@ +/** + * \file + * + * + * \brief Configuration file for stepper motor module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_STEPPER_H +#define CFG_STEPPER_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define STEPPER_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define STEPPER_LOG_FORMAT LOG_FMT_TERSE + +/** + * Max number of the stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_STEPPER_MOTORS 6 + +/** + * Max number of the timer usable on target to drive stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TC_STEPPER_MAX_NUM 6 + +#endif /* CFG_STEPPER_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_tas5706a.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_tas5706a.h new file mode 100644 index 00000000..e1112c0f --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_tas5706a.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for the TAS5706A module. + * + * \version $Id$ + * \author Luca Ottaviano + */ + +#ifndef CFG_TAS5706A_H +#define CFG_TAS5706A_H + +/** + * Maximum output volume for TAS chip [dB]. + * + * $WIZ$ type = "int" + * $WIZ$ min = -100 + * $WIZ$ max = 24 + */ +#define CONFIG_TAS_MAX_VOL -39 + +#endif /* CFG_TAS5706A_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_thermo.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_thermo.h new file mode 100644 index 00000000..2734f899 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_thermo.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for thermo module. + * + * \author Daniele Basile + */ + +#ifndef CFG_THERMO_H +#define CFG_THERMO_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_THERMO_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_THERMO_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Interval at which thermo control is performed [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_INTERVAL_MS 100 + +/** + * Number of different samples we interpolate over to get the hifi temperature. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_HIFI_NUM_SAMPLES 10 + +#endif /* CFG_THERMO_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_timer.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_timer.h new file mode 100644 index 00000000..1cff78b8 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_timer.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for timer module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_TIMER_H +#define CFG_TIMER_H + +/** + * Hardware timer selection for drv/timer.c. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "timer_select" + */ +#define CONFIG_TIMER TIMER_DEFAULT + +/** + * Debug timer interrupt using a strobe pin. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_STROBE 0 + +/** + * Enable asynchronous timers. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_EVENTS 1 + +/** + * Support hi-res timer_usleep(). + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_UDELAY 1 + +#endif /* CFG_TIMER_H */ diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_wdt.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_wdt.h new file mode 100644 index 00000000..9f4caae9 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_wdt.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Configuration file for watchdog module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_WDT_H +#define CFG_WDT_H + +/// Enable watchdog timer. $WIZ$ type = "autoenabled" +#define CONFIG_WATCHDOG 0 + +#endif /* CFG_WDT_H */ + + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_xmodem.h b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_xmodem.h new file mode 100644 index 00000000..38db7359 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/cfg/cfg_xmodem.h @@ -0,0 +1,79 @@ +/** + * \file + * + * + * \brief Configuration file for xmodem module. + * + * \author Daniele Basile + */ + +#ifndef CFG_XMODEM_H +#define CFG_XMODEM_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_XMODEM_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_XMODEM_LOG_FORMAT LOG_FMT_TERSE + + +/// Enable Rx. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_RECV 1 + +/// Enable TX. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_SEND 1 + +/// Allow a Rx/Tx of 1Kbyte block. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_1KCRC 1 + +/** + * Max retries before giving up. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXRETRIES 15 + +/** + * Max retries before switching to BCC. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXCRCRETRIES 7 + +#endif /* CFG_XMODEM_H */ + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint.mk b/boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint.mk new file mode 100644 index 00000000..884abd34 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint.mk @@ -0,0 +1,88 @@ +# +# Wizard autogenerated makefile. +# DO NOT EDIT, use the kernel_footprint_user.mk file instead. +# + +# Constants automatically defined by the selected modules + + +# Our target application +TRG += kernel_footprint + +kernel_footprint_PREFIX = "avr-" + +kernel_footprint_SUFFIX = "" + +kernel_footprint_SRC_PATH = boards/arduino/benchmark/kernel_footprint + +kernel_footprint_HW_PATH = boards/arduino + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_footprint_USER_CSRC INSTEAD! +kernel_footprint_WIZARD_CSRC = \ + bertos/kern/signal.c \ + bertos/kern/kfile.c \ + bertos/kern/sem.c \ + bertos/struct/heap.c \ + bertos/mware/formatwr.c \ + bertos/cpu/avr/drv/timer_avr.c \ + bertos/drv/timer.c \ + bertos/mware/event.c \ + bertos/kern/proc.c \ + bertos/benchmark/kernel_footprint.c \ + bertos/mware/hex.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_footprint_USER_PCSRC INSTEAD! +kernel_footprint_WIZARD_PCSRC = \ + bertos/mware/formatwr.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_footprint_USER_CPPASRC INSTEAD! +kernel_footprint_WIZARD_CPPASRC = \ + bertos/cpu/avr/hw/switch_ctx_avr.S \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_footprint_USER_CXXSRC INSTEAD! +kernel_footprint_WIZARD_CXXSRC = \ + \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_footprint_USER_ASRC INSTEAD! +kernel_footprint_WIZARD_ASRC = \ + \ + # + +kernel_footprint_CPPFLAGS = -D'CPU_FREQ=(16000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(kernel_footprint_HW_PATH) -I$(kernel_footprint_SRC_PATH) $(kernel_footprint_CPU_CPPFLAGS) $(kernel_footprint_USER_CPPFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_LDFLAGS = $(kernel_footprint_CPU_LDFLAGS) $(kernel_footprint_WIZARD_LDFLAGS) $(kernel_footprint_USER_LDFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_CPPAFLAGS = $(kernel_footprint_CPU_CPPAFLAGS) $(kernel_footprint_WIZARD_CPPAFLAGS) $(kernel_footprint_USER_CPPAFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_CSRC = $(kernel_footprint_CPU_CSRC) $(kernel_footprint_WIZARD_CSRC) $(kernel_footprint_USER_CSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_PCSRC = $(kernel_footprint_CPU_PCSRC) $(kernel_footprint_WIZARD_PCSRC) $(kernel_footprint_USER_PCSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_CPPASRC = $(kernel_footprint_CPU_CPPASRC) $(kernel_footprint_WIZARD_CPPASRC) $(kernel_footprint_USER_CPPASRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_CXXSRC = $(kernel_footprint_CPU_CXXSRC) $(kernel_footprint_WIZARD_CXXSRC) $(kernel_footprint_USER_CXXSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_ASRC = $(kernel_footprint_CPU_ASRC) $(kernel_footprint_WIZARD_ASRC) $(kernel_footprint_USER_ASRC) + +# CPU specific flags and options, defined in the CPU definition files. +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_footprint_MCU = atmega328p +kernel_footprint_CPU_CPPFLAGS = -Os -Ibertos/cpu/avr/ +kernel_footprint_PROGRAMMER_CPU = atmega328p +kernel_footprint_STOPFLASH_SCRIPT = bertos/prg_scripts/avr/stopflash.sh +kernel_footprint_STOPDEBUG_SCRIPT = bertos/prg_scripts/none.sh +kernel_footprint_DEBUG_SCRIPT = bertos/prg_scripts/nodebug.sh +kernel_footprint_FLASH_SCRIPT = bertos/prg_scripts/avr/flash.sh + +include $(kernel_footprint_SRC_PATH)/kernel_footprint_user.mk diff --git a/boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint_user.mk b/boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint_user.mk new file mode 100644 index 00000000..9e2bc5f6 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/kernel_footprint_user.mk @@ -0,0 +1,44 @@ +# +# User makefile. +# Edit this file to change compiler options and related stuff. +# + +# Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help +kernel_footprint_PROGRAMMER_TYPE = none +kernel_footprint_PROGRAMMER_PORT = none + +# Files included by the user. +kernel_footprint_USER_CSRC = \ + $(kernel_footprint_SRC_PATH)/main.c \ + # + +# Files included by the user. +kernel_footprint_USER_PCSRC = \ + # + +# Files included by the user. +kernel_footprint_USER_CPPASRC = \ + # + +# Files included by the user. +kernel_footprint_USER_CXXSRC = \ + # + +# Files included by the user. +kernel_footprint_USER_ASRC = \ + # + +# Flags included by the user. +kernel_footprint_USER_LDFLAGS = \ + # + +# Flags included by the user. +kernel_footprint_USER_CPPAFLAGS = \ + # + +# Flags included by the user. +kernel_footprint_USER_CPPFLAGS = \ + -fno-strict-aliasing \ + -fwrapv \ + -Os \ + # diff --git a/boards/arduino-mega/benchmark/kernel_footprint/main.c b/boards/arduino-mega/benchmark/kernel_footprint/main.c new file mode 100644 index 00000000..a3f11e50 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/main.c @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \author Daniele Basile + * + * \brief Kernel footprint benchmark. + * + * This benchmark measures the memory footprint[1] of the BeRTOS kernel with a + * simple minimalist user application. + * + * The purpose of this test is to give a measure of the required space in a + * generic flash memory to store a full-featured BeRTOS kernel. + * + * [1] http://en.wikipedia.org/wiki/Memory_footprint + */ + +#include + +int main(void) +{ + kernel_footprint(); + while (1) + { + } + + return 0; +} + diff --git a/boards/arduino-mega/benchmark/kernel_footprint/project.bertos b/boards/arduino-mega/benchmark/kernel_footprint/project.bertos new file mode 100644 index 00000000..41300e24 --- /dev/null +++ b/boards/arduino-mega/benchmark/kernel_footprint/project.bertos @@ -0,0 +1,83 @@ +(dp0 +S'BERTOS_PATH' +p1 +S'../../../..' +p2 +sS'SELECTED_FREQ' +p3 +V16000000 +p4 +sS'WIZARD_VERSION' +p5 +I3 +sS'PROJECT_NAME' +p6 +Vkernel_footprint +p7 +sS'TOOLCHAIN' +p8 +(dp9 +Vtarget +p10 +Vavr +p11 +sVthread +p12 +Vsingle +p13 +sVconfigured +p14 +V../configure --prefix=/usr/local/avr-4.3.2/ --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 +p15 +sVversion +p16 +V4.3.2 +p17 +sVbuild +p18 +VGCC +p19 +sVpath +p20 +V/opt/avr-4.3.2/bin/avr-gcc +p21 +ssS'ENABLED_MODULES' +p22 +(lp23 +S'kernel' +p24 +aS'semaphores' +p25 +aS'formatwr' +p26 +aS'kfile' +p27 +aS'msg' +p28 +aS'kernel_footprint' +p29 +aS'heap' +p30 +aS'signal' +p31 +aS'timer' +p32 +asS'CPU_NAME' +p33 +VATmega1280 +p34 +sS'PROJECT_HW_PATH' +p35 +S'../..' +p36 +sS'PROJECT_SRC_PATH' +p37 +S'.' +p38 +sS'PRESET' +p39 +I01 +sS'OUTPUT' +p40 +(lp41 +s. diff --git a/boards/arduino-mega/examples/.spec b/boards/arduino-mega/examples/.spec new file mode 100644 index 00000000..d244bbf6 --- /dev/null +++ b/boards/arduino-mega/examples/.spec @@ -0,0 +1,3 @@ +name="Examples" +ord=1 +description="Full working example projects." diff --git a/boards/arduino-mega/examples/aprs/.spec b/boards/arduino-mega/examples/aprs/.spec new file mode 100644 index 00000000..345ff098 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/.spec @@ -0,0 +1,21 @@ +name = 'APRS Radio demo' +description=""" +

APRS

+ +

Overview

+

+The purpose of this project is to implement an APRS tracker using an Arduino +Duemilanove. +

+ +

+This device can be used to periodically send a message through a radio AFSK +channel and log the received messages to a serial port (UART). +

+ +

+For schematics and up to date information on this project, +check the Arduino APRS +page on the BeRTOS site. +

+""" diff --git a/boards/arduino-mega/examples/aprs/aprs.mk b/boards/arduino-mega/examples/aprs/aprs.mk new file mode 100644 index 00000000..850dd90b --- /dev/null +++ b/boards/arduino-mega/examples/aprs/aprs.mk @@ -0,0 +1,89 @@ +# +# Wizard autogenerated makefile. +# DO NOT EDIT, use the aprs_user.mk file instead. +# + +# Constants automatically defined by the selected modules +aprs_DEBUG = 1 + +# Our target application +TRG += aprs + +aprs_PREFIX = "avr-" + +aprs_SUFFIX = "" + +aprs_SRC_PATH = boards/arduino/examples/aprs + +aprs_HW_PATH = boards/arduino + +# Files automatically generated by the wizard. DO NOT EDIT, USE aprs_USER_CSRC INSTEAD! +aprs_WIZARD_CSRC = \ + aprs/hw/hw_afsk.c \ + bertos/kern/kfile.c \ + bertos/cpu/avr/drv/timer_avr.c \ + bertos/net/afsk.c \ + bertos/net/ax25.c \ + bertos/mware/formatwr.c \ + bertos/algo/crc_ccitt.c \ + bertos/drv/timer.c \ + bertos/mware/event.c \ + bertos/cpu/avr/drv/ser_avr.c \ + bertos/drv/ser.c \ + bertos/mware/hex.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE aprs_USER_PCSRC INSTEAD! +aprs_WIZARD_PCSRC = \ + bertos/mware/formatwr.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE aprs_USER_CPPASRC INSTEAD! +aprs_WIZARD_CPPASRC = \ + \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE aprs_USER_CXXSRC INSTEAD! +aprs_WIZARD_CXXSRC = \ + \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE aprs_USER_ASRC INSTEAD! +aprs_WIZARD_ASRC = \ + \ + # + +aprs_CPPFLAGS = -D'CPU_FREQ=(16000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(aprs_HW_PATH) -I$(aprs_SRC_PATH) $(aprs_CPU_CPPFLAGS) $(aprs_USER_CPPFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_LDFLAGS = $(aprs_CPU_LDFLAGS) $(aprs_WIZARD_LDFLAGS) $(aprs_USER_LDFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_CPPAFLAGS = $(aprs_CPU_CPPAFLAGS) $(aprs_WIZARD_CPPAFLAGS) $(aprs_USER_CPPAFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_CSRC = $(aprs_CPU_CSRC) $(aprs_WIZARD_CSRC) $(aprs_USER_CSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_PCSRC = $(aprs_CPU_PCSRC) $(aprs_WIZARD_PCSRC) $(aprs_USER_PCSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_CPPASRC = $(aprs_CPU_CPPASRC) $(aprs_WIZARD_CPPASRC) $(aprs_USER_CPPASRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_CXXSRC = $(aprs_CPU_CXXSRC) $(aprs_WIZARD_CXXSRC) $(aprs_USER_CXXSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_ASRC = $(aprs_CPU_ASRC) $(aprs_WIZARD_ASRC) $(aprs_USER_ASRC) + +# CPU specific flags and options, defined in the CPU definition files. +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +aprs_DEBUG_SCRIPT = bertos/prg_scripts/nodebug.sh +aprs_PROGRAMMER_CPU = atmega328p +aprs_STOPDEBUG_SCRIPT = bertos/prg_scripts/none.sh +aprs_MCU = atmega328p +aprs_FLASH_SCRIPT = bertos/prg_scripts/avr/flash.sh +aprs_STOPFLASH_SCRIPT = bertos/prg_scripts/avr/stopflash.sh +aprs_CPU_CPPFLAGS = -Os -Ibertos/cpu/avr/ + +include $(aprs_SRC_PATH)/aprs_user.mk diff --git a/boards/arduino-mega/examples/aprs/aprs_user.mk b/boards/arduino-mega/examples/aprs/aprs_user.mk new file mode 100644 index 00000000..5fb75d29 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/aprs_user.mk @@ -0,0 +1,44 @@ +# +# User makefile. +# Edit this file to change compiler options and related stuff. +# + +# Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help +aprs_PROGRAMMER_TYPE = none +aprs_PROGRAMMER_PORT = none + +# Files included by the user. +aprs_USER_CSRC = \ + $(aprs_SRC_PATH)/main.c \ + $(aprs_SRC_PATH)/hw/hw_afsk.c \ + # + +# Files included by the user. +aprs_USER_PCSRC = \ + # + +# Files included by the user. +aprs_USER_CPPASRC = \ + # + +# Files included by the user. +aprs_USER_CXXSRC = \ + # + +# Files included by the user. +aprs_USER_ASRC = \ + # + +# Flags included by the user. +aprs_USER_LDFLAGS = \ + # + +# Flags included by the user. +aprs_USER_CPPAFLAGS = \ + # + +# Flags included by the user. +aprs_USER_CPPFLAGS = \ + -fno-strict-aliasing \ + -fwrapv \ + # diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_adc.h b/boards/arduino-mega/examples/aprs/cfg/cfg_adc.h new file mode 100644 index 00000000..dd65e134 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_adc.h @@ -0,0 +1,110 @@ +/** + * \file + * + * + * \brief Configuration file for the ADC module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_ADC_H +#define CFG_ADC_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define ADC_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define ADC_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Clock Frequency for ADC conversion. + * + * $WIZ$ type = "int" + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_CLOCK 4800000UL + +/** + * Minimum time for starting up a conversion [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_STARTUP_TIME 20 + +/** + * Minimum time for sample and hold [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_SHTIME 834 + +/** + * ADC Voltage Reference. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "avr_adc_refs" + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_REF ADC_AVR_AVCC + +/** + * ADC clock divisor from main crystal. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ max = 128 + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_DIVISOR 2 + +/** + * Enable ADC strobe for debugging ADC ISR. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_ADC_STROBE 0 + +#endif /* CFG_ADC_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_afsk.h b/boards/arduino-mega/examples/aprs/cfg/cfg_afsk.h new file mode 100644 index 00000000..c2ca2e32 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_afsk.h @@ -0,0 +1,114 @@ +/** + * \file + * + * + * \brief Configuration file for AFSK1200 modem. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef CFG_AFSK_H +#define CFG_AFSK_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AFSK_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AFSK_LOG_FORMAT LOG_FMT_TERSE + + +/** + * AFSK discriminator filter type. + * + * $WIZ$ type = "enum"; value_list = "afsk_filter_list" + */ +#define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV + + +/** + * AFSK receiver buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_RX_BUFLEN 64 + +/** + * AFSK transimtter buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_TX_BUFLEN 64 + +/** + * AFSK DAC sample rate for modem outout. + * $WIZ$ type = "int" + * $WIZ$ min = 2400 + */ +#define CONFIG_AFSK_DAC_SAMPLERATE 9600 + +/** + * AFSK RX timeout in ms, set to -1 to disable. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_AFSK_RXTIMEOUT 0 + + +/** + * AFSK Preamble length in [ms], before starting transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_PREAMBLE_LEN 300UL + + + +/** + * AFSK Trailer length in [ms], before stopping transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_TRAILER_LEN 50UL + +#endif /* CFG_AFSK_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_ax25.h b/boards/arduino-mega/examples/aprs/cfg/cfg_ax25.h new file mode 100644 index 00000000..64f862f1 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_ax25.h @@ -0,0 +1,76 @@ +/** + * \file + * + * + * \brief Configuration file for the AX25 protocol module. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef CFG_AX25_H +#define CFG_AX25_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AX25_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AX25_LOG_FORMAT LOG_FMT_TERSE + +/** + * AX25 frame buffer lenght. + * + * $WIZ$ type = "int" + * $WIZ$ min = 18 + */ +#define CONFIG_AX25_FRAME_BUF_LEN 330 + + +/** + * Enable repeaters listing in AX25 frames. + * If enabled use 56 addtional bytes of RAM + * for each message received. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_AX25_RPT_LST 1 + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_battfs.h b/boards/arduino-mega/examples/aprs/cfg/cfg_battfs.h new file mode 100644 index 00000000..fb438a08 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_battfs.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for BattFS module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_BATTFS_H +#define CFG_BATTFS_H + + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define BATTFS_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define BATTFS_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Set to 1 to enable free page shuffling. + * This increase memories life but makes debugging + * more difficult due to its unrepeteable state. + * $WIZ$ type = "boolean" + */ +#define CONFIG_BATTFS_SHUFFLE_FREE_PAGES 0 + + +#endif /* BATTFS */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_context_switch.h b/boards/arduino-mega/examples/aprs/cfg/cfg_context_switch.h new file mode 100644 index 00000000..fe0b4f87 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_context_switch.h @@ -0,0 +1,71 @@ +/** + * \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. + * + * $WIZ$ type = "boolean" + * $WIZ$ module= "boolean" + * $WIZ$ conditional_deps = "ser" + */ +#define CONFIG_USE_HP_TIMER 1 + + +/** + * Use board led for benchmark. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_USE_LED 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/arduino-mega/examples/aprs/cfg/cfg_dataflash.h b/boards/arduino-mega/examples/aprs/cfg/cfg_dataflash.h new file mode 100644 index 00000000..8bd7828a --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_dataflash.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for data flash memory module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_DATAFLASH_H +#define CFG_DATAFLASH_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DATAFLASH_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DATAFLASH_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_DATAFLASH_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_dc_motor.h b/boards/arduino-mega/examples/aprs/cfg/cfg_dc_motor.h new file mode 100644 index 00000000..fd9bac73 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_dc_motor.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief Configuration file for DC motor module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DC_MOTOR_H +#define CFG_DC_MOTOR_H + +/** + * Number of the DC motors to manage. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_DC_MOTOR 4 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE + + +/** + * Min value of DC motor speed. + * \note Generally this value is the min value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_MIN_SPEED 0 + + +/** + * Max value of DC motor speed. + * \note Generally this value is the max value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + * $WIZ$ max = 65535 + */ +#define CONFIG_DC_MOTOR_MAX_SPEED 65535 + + +/** + * Sampling period in millisecond. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_PERIOD 40 + +/** + * Amount of millisecond before to read sample. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_DELAY 2 + +/** + * This control set which mode the driver use to lock share + * resources when we use the preempitive kernel. + * If we set to 1 we use the semaphore module otherwise the + * driver disable the switch context every time we need to access + * to shared sources. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_USE_SEM 1 + +#endif /* CFG_DC_MOTOR_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_debug.h b/boards/arduino-mega/examples/aprs/cfg/cfg_debug.h new file mode 100644 index 00000000..f7596ca1 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_debug.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for Debug module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_DEBUG_H +#define CFG_DEBUG_H + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_KDEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_KDEBUG_BAUDRATE 115200UL + +#endif /* CFG_DEBUG_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_fat.h b/boards/arduino-mega/examples/aprs/cfg/cfg_fat.h new file mode 100644 index 00000000..d418b783 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_fat.h @@ -0,0 +1,140 @@ +/** + * \file + * + * + * \brief Configuration file for Fat module. + * + * \version $Id$ + * + * \author Luca Ottaviano + * \author Francesco Sacchi + */ + +#ifndef CFG_FAT_H +#define CFG_FAT_H + +/** + * Use word alignment to access FAT structure. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_WORD_ACCESS 0 +#define _WORD_ACCESS CONFIG_FAT_WORD_ACCESS + +/** + * Enable read functions only. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_READONLY 0 +#define _FS_READONLY CONFIG_FAT_FS_READONLY + +/** + * Minimization level to remove some functions. + * $WIZ$ type = "int"; min = 0; max = 3 + */ +#define CONFIG_FAT_FS_MINIMIZE 0 +#define _FS_MINIMIZE CONFIG_FAT_FS_MINIMIZE + +/** + * If enabled, this reduces memory consumption 512 bytes each file object by using a shared buffer. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_TINY 1 +#define _FS_TINY CONFIG_FAT_FS_TINY + +/** + * To enable string functions, set _USE_STRFUNC to 1 or 2. + * $WIZ$ type = "int" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_USE_STRFUNC 0 +#define _USE_STRFUNC CONFIG_FAT_USE_STRFUNC + +/** + * Enable f_mkfs function. Requires CONFIG_FAT_FS_READONLY = 0. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_MKFS 0 +#define _USE_MKFS (CONFIG_FAT_USE_MKFS && !CONFIG_FAT_FS_READONLY) + +/** + * Enable f_forward function. Requires CONFIG_FAT_FS_TINY. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_FORWARD 0 +#define _USE_FORWARD (CONFIG_FAT_USE_FORWARD && CONFIG_FAT_FS_TINY) + +/** + * Number of volumes (logical drives) to be used. + * $WIZ$ type = "int"; min = 1; max = 255 + */ +#define CONFIG_FAT_DRIVES 1 +#define _DRIVES CONFIG_FAT_DRIVES + +/** + * Maximum sector size to be handled. (512/1024/2048/4096). + * 512 for memory card and hard disk, 1024 for floppy disk, 2048 for MO disk + * $WIZ$ type = "int"; min = 512; max = 4096 + */ +#define CONFIG_FAT_MAX_SS 512 +#define _MAX_SS CONFIG_FAT_MAX_SS + +/** + * When _MULTI_PARTITION is set to 0, each volume is bound to the same physical + * drive number and can mount only first primaly partition. When it is set to 1, + * each volume is tied to the partitions listed in Drives[]. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_MULTI_PARTITION 0 +#define _MULTI_PARTITION CONFIG_FAT_MULTI_PARTITION + +/** + * Specifies the OEM code page to be used on the target system. + * $WIZ$ type = "int" + */ +#define CONFIG_FAT_CODE_PAGE 850 +#define _CODE_PAGE CONFIG_FAT_CODE_PAGE + +/** + * Support for long filenames. Enable only if you have a valid Microsoft license. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_LFN 0 +#define _USE_LFN CONFIG_FAT_USE_LFN + +/** + * Maximum Long File Name length to handle. + * $WIZ$ type = "int"; min = 8; max = 255 + */ +#define CONFIG_FAT_MAX_LFN 255 +#define _MAX_LFN CONFIG_FAT_MAX_LFN + +#endif /* CFG_FAT_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_flash25.h b/boards/arduino-mega/examples/aprs/cfg/cfg_flash25.h new file mode 100644 index 00000000..f7ff219b --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_flash25.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for flash25 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_FLASH25_H +#define CFG_FLASH25_H + +/** + * Eeprom memory type. + * + *$WIZ$ type = "enum" + *$WIZ$ value_list = "flash25_list" + */ +#define CONFIG_FLASH25 FLASH25_AT25F2048 + +#endif /* CFG_FALSH25_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_formatwr.h b/boards/arduino-mega/examples/aprs/cfg/cfg_formatwr.h new file mode 100644 index 00000000..bac8aca7 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_formatwr.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief Configuration file for formatted write module. + * + * \author Daniele Basile + */ + +#ifndef CFG_FORMATWR_H +#define CFG_FORMATWR_H + +/** + * printf()-style formatter configuration. + * $WIZ$ type = "enum"; value_list = "printf_list" + * + * \sa PRINTF_DISABLED + * \sa PRINTF_NOMODIFIERS + * \sa PRINTF_REDUCED + * \sa PRINTF_NOFLOAT + * \sa PRINTF_FULL + */ +#define CONFIG_PRINTF PRINTF_FULL + +/** + * Size of buffer to format "%" sequences in printf. + * + * Warning: no check on buffer size is done when formatting, be careful especially + * with big numbers and %f formatting. + * + * $WIZ$ type = "int" + * $WIZ$ min = 4 + */ +#define CONFIG_FRMWRI_BUFSIZE 134 + +#endif /* CFG_FORMATWR_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_gfx.h b/boards/arduino-mega/examples/aprs/cfg/cfg_gfx.h new file mode 100644 index 00000000..59dde04c --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_gfx.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for GFX module. + * + * \author Daniele Basile + */ + +#ifndef CFG_GFX_H +#define CFG_GFX_H + +/** + * Enable line clipping algorithm. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_CLIPPING 1 + +/** + * Enable text rendering in bitmaps. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_TEXT 1 + +/** + * Enable virtual coordinate system. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_VCOORDS 1 + +/** + * Select bitmap pixel format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "bitmap_format" + */ +#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB + +#endif /* CFG_GFX_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_hashtable.h b/boards/arduino-mega/examples/aprs/cfg/cfg_hashtable.h new file mode 100644 index 00000000..7560617d --- /dev/null +++ b/boards/arduino-mega/examples/aprs/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/arduino-mega/examples/aprs/cfg/cfg_heap.h b/boards/arduino-mega/examples/aprs/cfg/cfg_heap.h new file mode 100644 index 00000000..dc4b1fa3 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_heap.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for heap module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_HEAP_H +#define CFG_HEAP_H + +/** + * Enable malloc/free like API. + * $WIZ$ type = "boolean" + */ +#define CONFIG_HEAP_MALLOC 1 + +#endif /* CFG_HEAP_H */ + + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_i2c.h b/boards/arduino-mega/examples/aprs/cfg/cfg_i2c.h new file mode 100644 index 00000000..af36e6b6 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_i2c.h @@ -0,0 +1,90 @@ +/** + * \file + * + * + * \brief Configuration file for I2C module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_I2C_H +#define CFG_I2C_H + +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ +#define CONFIG_I2C_FREQ 100000UL + +/** + * I2C start timeout. + * For how many milliseconds the i2c_start + * should try to get an ACK before + * returning error. + * + * $WIZ$ type = "int" + */ +#define CONFIG_I2C_START_TIMEOUT 100 + +/** + * I2C backend the driver should use. + * + * I2C_BACKEND_BUILTIN: Use (if present) the builtin i2c hardware. + * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. + * \see drv/i2c.h for more information. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "i2c_backend" + */ +#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define I2C_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define I2C_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_I2C_H */ + + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_i2s.h b/boards/arduino-mega/examples/aprs/cfg/cfg_i2s.h new file mode 100644 index 00000000..52fa8848 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_i2s.h @@ -0,0 +1,75 @@ +/** + * \file + * + * + * \brief Configuration file for I2S module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_I2S_H +#define CFG_I2S_H + +/** + * Length of each play buffer. + * + * $WIZ$ type = "int" + */ +#define CONFIG_PLAY_BUF_LEN 8192 + +/** + * Sampling frequency of the audio file. + * + * $WIZ$ type = "int" + * $WIZ$ min = 32000 + * $WIZ$ max = 192000 + */ +#define CONFIG_SAMPLE_FREQ 44100UL + +/** + * 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 + +#endif /* CFG_I2S_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_ini_reader.h b/boards/arduino-mega/examples/aprs/cfg/cfg_ini_reader.h new file mode 100644 index 00000000..702c78ee --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_ini_reader.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Configuration file for ini reader module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_INI_READER_H +#define CFG_INI_READER_H + +/** + * Maximum ini file line length (chars). + * $WIZ$ type = "int"; min = 1 + */ +#define CONFIG_INI_MAX_LINE_LEN 64 + +#endif /* CFG_INI_READER_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_kbd.h b/boards/arduino-mega/examples/aprs/cfg/cfg_kbd.h new file mode 100644 index 00000000..116f3318 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_kbd.h @@ -0,0 +1,59 @@ +/** + * \file + * + * + * \brief Configuration file for keyboard module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_KBD_H +#define CFG_KBD_H + +/// Keyboard polling method. $WIZ$ supports = "False" +#define CONFIG_KBD_POLL KBD_POLL_SOFTINT + +/// Enable keyboard event delivery to observers. $WIZ$ type = "boolean" +#define CONFIG_KBD_OBSERVER 0 + +/// Enable key beeps. $WIZ$ type = "boolean" +#define CONFIG_KBD_BEEP 0 + +/// Enable long pression handler for keys. $WIZ$ type = "boolean" +#define CONFIG_KBD_LONGPRESS 0 + +/// Enable calling poor man's scheduler to be called inside kbd_peek. $WIZ$ type = "boolean" +#define CONFIG_KBD_SCHED 0 + +#endif /* CFG_KBD_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_keytag.h b/boards/arduino-mega/examples/aprs/cfg/cfg_keytag.h new file mode 100644 index 00000000..8bedadf6 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/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/arduino-mega/examples/aprs/cfg/cfg_kfile.h b/boards/arduino-mega/examples/aprs/cfg/cfg_kfile.h new file mode 100644 index 00000000..0ebed7b1 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_kfile.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief Configuration file for KFile interface module. + * + * \author Daniele Basile + */ + +#ifndef CFG_KFILE_H +#define CFG_KFILE_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KFILE_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KFILE_LOG_FORMAT LOG_FMT_TERSE + +/** + * Enable the gets function with echo. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KFILE_GETS 0 + +#endif /* CFG_KFILE_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_lcd_32122a.h b/boards/arduino-mega/examples/aprs/cfg/cfg_lcd_32122a.h new file mode 100644 index 00000000..5a9b3ca7 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_lcd_32122a.h @@ -0,0 +1,63 @@ +/** + * \file + * + * + * \brief Displaytech 32122A LCD driver configuration file. + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ +#ifndef CFG_LCD_32122A_H +#define CFG_LCD_32122A_H + +/** + * Enable soft interrupt to refresh the LCD. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_SOFTINT_REFRESH 0 + +/** + * Enable wait macro when display is busy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_WAIT 0 + +/** + * Display refresh time 32122a. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_LCD_REFRESH 100 + +#endif /* CFG_LCD_32122A_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_lcd_hd44.h b/boards/arduino-mega/examples/aprs/cfg/cfg_lcd_hd44.h new file mode 100644 index 00000000..78f1f20b --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_lcd_hd44.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for lcd display module. + * + * \author Daniele Basile + */ + +#ifndef CFG_LCD_H +#define CFG_LCD_H + +/** + * Use 4 bit addressing mode. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_4BIT 0 + +/** + * Use a table to speed up LCD memory addressing. + * This will use about 100 bytes of RAM. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_ADDRESS_FAST 1 + +#endif /* CFG_LCD_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_lm75.h b/boards/arduino-mega/examples/aprs/cfg/cfg_lm75.h new file mode 100644 index 00000000..91b347ad --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_lm75.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for the LM75 sensor temperature. + * + * \author Daniele Basile + */ + +#ifndef CFG_LM75_H +#define CFG_LM75_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define LM75_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define LM75_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_md2.h b/boards/arduino-mega/examples/aprs/cfg/cfg_md2.h new file mode 100644 index 00000000..22ec7dbe --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_md2.h @@ -0,0 +1,54 @@ +/** + * \file + * + * + * \brief Configuration file for MD2 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_MD2_H +#define CFG_MD2_H + +/** + * Size of block for MD2 algorithm. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_MD2_BLOCK_LEN 16 + +/// Use standard permutation in MD2 algorithm. $WIZ$ type = "boolean" +#define CONFIG_MD2_STD_PERM 0 + +#endif /* CFG_MD2_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_menu.h b/boards/arduino-mega/examples/aprs/cfg/cfg_menu.h new file mode 100644 index 00000000..bbfa1e76 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_menu.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for Menu module. + * + * \author Daniele Basile + */ + +#ifndef CFG_MENU_H +#define CFG_MENU_H + +/** + * Enable button bar behind menus + * $WIZ$ type = "boolean" + */ +#define CONFIG_MENU_MENUBAR 0 + +/** + * Level Edit Timeout + * $WIZ$ type = "boolean" + */ +#define CONFIG_LEVELEDIT_TIMEOUT 0 + +/** + * Menu timeout + * $WIZ$ type = "boolean" + */ +#define CONFIG_MENU_TIMEOUT 0 + +/** + * Enable smooth scrolling in menus + * $WIZ$ type = "boolean" + */ +#define CONFIG_MENU_SMOOTH 1 + + +#endif /* CFG_MENU_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_monitor.h b/boards/arduino-mega/examples/aprs/cfg/cfg_monitor.h new file mode 100644 index 00000000..ffe17c07 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_monitor.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 0 + +#endif /* CFG_MONITOR_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_nmea.h b/boards/arduino-mega/examples/aprs/cfg/cfg_nmea.h new file mode 100644 index 00000000..9249a9af --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_nmea.h @@ -0,0 +1,85 @@ +/** + * \file + * + * + * \brief Configuration file for NMEA module. + * + * \author Daniele Basile + */ + +#ifndef CFG_NMEA_H +#define CFG_NMEA_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define NMEA_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define NMEA_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Maximum number of sentence parsers supported. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCES 8 + +/** + * Max length of a complete sentence. The standard says 82 bytes, but its probably + * better to go at least 128 since some units don't adhere to the 82 bytes + * especially for proprietary sentences. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCE_LENGTH 255 + +/** + * Max tokens in one sentence. 24 is enough for any standard sentence. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_TOKENS 24 + +#endif /* CFG_NMEA_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_parser.h b/boards/arduino-mega/examples/aprs/cfg/cfg_parser.h new file mode 100644 index 00000000..572b4a24 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/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/arduino-mega/examples/aprs/cfg/cfg_phase.h b/boards/arduino-mega/examples/aprs/cfg/cfg_phase.h new file mode 100644 index 00000000..57202930 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_phase.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for phase module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PHASE_H +#define CFG_PHASE_H + +/** + * Max value of the duty cycle on triac. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_DUTY 100 + +/** + * Max value of the triac power. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_POWER 100 + +#endif /* CFG_PHASE_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_pocketbus.h b/boards/arduino-mega/examples/aprs/cfg/cfg_pocketbus.h new file mode 100644 index 00000000..aa0b090b --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_pocketbus.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for pocketbus module. + * + * \author Daniele Basile + */ + +#ifndef CFG_POCKETBUS_H +#define CFG_POCKETBUS_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define POCKETBUS_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define POCKETBUS_LOG_FORMAT LOG_FMT_TERSE + + +/** + *Buffer len for pockebus protocol. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_POCKETBUS_BUFLEN 128 + +/** + * Command replay timeout in milliseconds. + * $WIZ$ type = "int" + */ +#define CONFIG_POCKETBUS_CMD_REPLY_TIMEOUT 50 + +#endif /* CFG_POCKETBUS_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_proc.h b/boards/arduino-mega/examples/aprs/cfg/cfg_proc.h new file mode 100644 index 00000000..3c9439fb --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_proc.h @@ -0,0 +1,107 @@ +/** + * \file + * + * + * \brief Kernel configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_PROC_H +#define CFG_PROC_H + +/** + * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN 0 + +/** + * Kernel interrupt supervisor. WARNING: Experimental, still incomplete! + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_KERN_IRQ 0 + +/** + * Preemptive process scheduling. + * + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "timer" + */ +#define CONFIG_KERN_PREEMPT 0 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_KERN_QUANTUM 11 + +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 0 + +/** + * Dynamic memory allocation for processes. + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "heap" + */ +#define CONFIG_KERN_HEAP 0 + +/** + * Size of the dynamic memory pool used by processes. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_KERN_HEAP_SIZE 2048L + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KERN_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PROC_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_pwm.h b/boards/arduino-mega/examples/aprs/cfg/cfg_pwm.h new file mode 100644 index 00000000..6627ee2d --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_pwm.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for PWM module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PWM_H +#define CFG_PWM_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define PWM_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define PWM_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PWM_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_ramp.h b/boards/arduino-mega/examples/aprs/cfg/cfg_ramp.h new file mode 100644 index 00000000..1aeb8a89 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_ramp.h @@ -0,0 +1,116 @@ + /** + * \file + * + * + * \brief Configuration file Ramp algorithm module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_RAMP_H +#define CFG_RAMP_H + +/** + * Define whether the ramp will use floating point calculation within ramp_evaluate(). + * Otherwise, a less precise fixed point version will be used, which is faster on + * platforms which do no support floating point operations. + * + * \note Floating point operations will be always done within ramp_compute() to + * precalculate values, so there has to be at least a floating point emulation support. + * + * $WIZ$ type = "boolean" + */ +#define RAMP_USE_FLOATING_POINT 0 + + +#if !RAMP_USE_FLOATING_POINT + + /** + * Number of least-significant bits which are stripped away during ramp evaluation. + * This setting allows to specify larger ramps at the price of less precision. + * + * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks. + * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum + * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2 + * brings the maximum length to 13.4 secs, at the price of less precision. + * + * ramp_compute() will check that the length is below the maximum allowed through + * a runtime assertion. + * + * \note This macro is used only for the fixed-point version of the ramp. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ max = 32 + */ + #define RAMP_CLOCK_SHIFT_PRECISION 2 +#endif + + +/** +* Negative pulse width for ramp. +* $WIZ$ type = "int" +* $WIZ$ min = 1 +*/ +#define RAMP_PULSE_WIDTH 50 + +/** + * Default ramp time (microsecs). + * $WIZ$ type = "int" + * $WIZ$ min = 1000 + */ +#define RAMP_DEF_TIME 6000000UL +/** + * Default ramp maxfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MAXFREQ 5000 +/** + * Default ramp minfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MINFREQ 200 +/** + * Default ramp powerrun (deciampere). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERRUN 10 +/** + * Default ramp poweridle (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERIDLE 1 + +#endif /* CFG_RAMP_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_randpool.h b/boards/arduino-mega/examples/aprs/cfg/cfg_randpool.h new file mode 100644 index 00000000..83285984 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_randpool.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for randpool module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_RANDPOOL_H +#define CFG_RANDPOOL_H + + +/** + * Define a size, in byte, of entropy pool. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_SIZE_ENTROPY_POOL 64 + +/// Enable timer in randpool algo. $WIZ$ type = "boolean" +#define CONFIG_RANDPOOL_TIMER 1 + +#endif /* CFG_RANDPOOL_H */ + + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_sem.h b/boards/arduino-mega/examples/aprs/cfg/cfg_sem.h new file mode 100644 index 00000000..2a6de7a9 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_sem.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 0 + +#endif /* CFG_SEM_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_ser.h b/boards/arduino-mega/examples/aprs/cfg/cfg_ser.h new file mode 100644 index 00000000..91a10e0b --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_ser.h @@ -0,0 +1,222 @@ +/** + * \file + * + * + * \brief Configuration file for serial module. + * + * \author Daniele Basile + */ + +#ifndef CFG_SER_H +#define CFG_SER_H + +/** + * Example of setting for serial port and + * spi port. + * Edit these define for your project. + */ + +/** + * Size of the outbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_RXBUFSIZE 32 + + +/** + * Size of the outbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_RXBUFSIZE 32 + +/** + * SPI data order. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_order_bit" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST + +/** + * SPI clock division factor. + * $WIZ$ type = "int" + * $WIZ$ supports = "avr" + */ +#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" + */ +#define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW + +/** + * SPI clock phase you can choose sample on first edge or + * sample on second clock edge. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_spi_phase" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE + +/** + * Default transmit timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_TXTIMEOUT -1 + +/** + * Default receive timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_RXTIMEOUT -1 + +/** + * Use RTS/CTS handshake. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_SER_HWHANDSHAKE 0 + +/** + * Default baudrate for all serial ports (set to 0 to disable). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_SER_DEFBAUDRATE 0UL + +/// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean" +#define CONFIG_SER_STROBE 0 + +#endif /* CFG_SER_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_signal.h b/boards/arduino-mega/examples/aprs/cfg/cfg_signal.h new file mode 100644 index 00000000..e78a4519 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_signal.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 0 + +#endif /* CFG_SIGNAL_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_spi_bitbang.h b/boards/arduino-mega/examples/aprs/cfg/cfg_spi_bitbang.h new file mode 100644 index 00000000..6e9a96bc --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_spi_bitbang.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for SPI bitbang module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_SPI_BITBANG_H +#define CFG_SPI_BITBANG_H + +/** + * Set data order for emulated SPI. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ordet_bit_list" + */ +#define CONFIG_SPI_DATAORDER SPI_LSB_FIRST + +#endif /* CFG_SPI_BITBANG_H */ + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_stepper.h b/boards/arduino-mega/examples/aprs/cfg/cfg_stepper.h new file mode 100644 index 00000000..e086065c --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_stepper.h @@ -0,0 +1,70 @@ +/** + * \file + * + * + * \brief Configuration file for stepper motor module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_STEPPER_H +#define CFG_STEPPER_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define STEPPER_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define STEPPER_LOG_FORMAT LOG_FMT_TERSE + +/** + * Max number of the stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_STEPPER_MOTORS 6 + +/** + * Max number of the timer usable on target to drive stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TC_STEPPER_MAX_NUM 6 + +#endif /* CFG_STEPPER_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_tas5706a.h b/boards/arduino-mega/examples/aprs/cfg/cfg_tas5706a.h new file mode 100644 index 00000000..e1112c0f --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_tas5706a.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for the TAS5706A module. + * + * \version $Id$ + * \author Luca Ottaviano + */ + +#ifndef CFG_TAS5706A_H +#define CFG_TAS5706A_H + +/** + * Maximum output volume for TAS chip [dB]. + * + * $WIZ$ type = "int" + * $WIZ$ min = -100 + * $WIZ$ max = 24 + */ +#define CONFIG_TAS_MAX_VOL -39 + +#endif /* CFG_TAS5706A_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_thermo.h b/boards/arduino-mega/examples/aprs/cfg/cfg_thermo.h new file mode 100644 index 00000000..2734f899 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_thermo.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for thermo module. + * + * \author Daniele Basile + */ + +#ifndef CFG_THERMO_H +#define CFG_THERMO_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_THERMO_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_THERMO_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Interval at which thermo control is performed [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_INTERVAL_MS 100 + +/** + * Number of different samples we interpolate over to get the hifi temperature. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_HIFI_NUM_SAMPLES 10 + +#endif /* CFG_THERMO_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_timer.h b/boards/arduino-mega/examples/aprs/cfg/cfg_timer.h new file mode 100644 index 00000000..1cff78b8 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_timer.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for timer module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_TIMER_H +#define CFG_TIMER_H + +/** + * Hardware timer selection for drv/timer.c. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "timer_select" + */ +#define CONFIG_TIMER TIMER_DEFAULT + +/** + * Debug timer interrupt using a strobe pin. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_STROBE 0 + +/** + * Enable asynchronous timers. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_EVENTS 1 + +/** + * Support hi-res timer_usleep(). + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_UDELAY 1 + +#endif /* CFG_TIMER_H */ diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_wdt.h b/boards/arduino-mega/examples/aprs/cfg/cfg_wdt.h new file mode 100644 index 00000000..9f4caae9 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_wdt.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Configuration file for watchdog module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_WDT_H +#define CFG_WDT_H + +/// Enable watchdog timer. $WIZ$ type = "autoenabled" +#define CONFIG_WATCHDOG 0 + +#endif /* CFG_WDT_H */ + + diff --git a/boards/arduino-mega/examples/aprs/cfg/cfg_xmodem.h b/boards/arduino-mega/examples/aprs/cfg/cfg_xmodem.h new file mode 100644 index 00000000..38db7359 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/cfg/cfg_xmodem.h @@ -0,0 +1,79 @@ +/** + * \file + * + * + * \brief Configuration file for xmodem module. + * + * \author Daniele Basile + */ + +#ifndef CFG_XMODEM_H +#define CFG_XMODEM_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_XMODEM_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_XMODEM_LOG_FORMAT LOG_FMT_TERSE + + +/// Enable Rx. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_RECV 1 + +/// Enable TX. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_SEND 1 + +/// Allow a Rx/Tx of 1Kbyte block. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_1KCRC 1 + +/** + * Max retries before giving up. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXRETRIES 15 + +/** + * Max retries before switching to BCC. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXCRCRETRIES 7 + +#endif /* CFG_XMODEM_H */ + diff --git a/boards/arduino-mega/examples/aprs/main.c b/boards/arduino-mega/examples/aprs/main.c new file mode 100644 index 00000000..a834597c --- /dev/null +++ b/boards/arduino-mega/examples/aprs/main.c @@ -0,0 +1,130 @@ +/** + * \file + * + * + * \author Francesco Sacchi + * \author Luca Ottaviano + * \author Daniele Basile + * + * \brief Arduino APRS radio demo. + * + * This example shows how to read and decode APRS radio packets. + * It uses the following modules: + * afsk + * ax25 + * ser + * + * You will see how to use a serial port to output messages, init the afsk demodulator and + * how to parse input messages using ax25 module. + */ + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +static Afsk afsk; +static AX25Ctx ax25; +static Serial ser; + +#define ADC_CH 0 + +/* + * Print on console the message that we have received. + */ +static void message_callback(struct AX25Msg *msg) +{ + kfile_printf(&ser.fd, "\n\nSRC[%.6s-%d], DST[%.6s-%d]\r\n", msg->src.call, msg->src.ssid, msg->dst.call, msg->dst.ssid); + + for (int i = 0; i < msg->rpt_cnt; i++) + kfile_printf(&ser.fd, "via: [%.6s-%d]\r\n", msg->rpt_lst[i].call, msg->rpt_lst[i].ssid); + + kfile_printf(&ser.fd, "DATA: %.*s\r\n", msg->len, msg->info); +} + +static void init(void) +{ + IRQ_ENABLE; + kdbg_init(); + timer_init(); + + /* + * Init afsk demodulator. We need to implement the macros defined in hw_afsk.h, which + * is the hardware abstraction layer. + * We do not need transmission for now, so we set transmission DAC channel to 0. + */ + afsk_init(&afsk, ADC_CH, 0); + /* + * Here we initialize AX25 context, the channel (KFile) we are going to read messages + * from and the callback that will be called on incoming messages. + */ + ax25_init(&ax25, &afsk.fd, message_callback); + + /* Initialize serial port, we are going to use it to show APRS messages*/ + ser_init(&ser, SER_UART0); + ser_setbaudrate(&ser, 115200L); +} + +static AX25Call path[] = AX25_PATH(AX25_CALL("apzbrt", 0), AX25_CALL("nocall", 0), AX25_CALL("wide1", 1), AX25_CALL("wide2", 2)); + +#define APRS_MSG ">Test BeRTOS APRS http://www.bertos.org" + +int main(void) +{ + init(); + ticks_t start = timer_clock(); + + while (1) + { + /* + * This function will look for new messages from the AFSK channel. + * It will call the message_callback() function when a new message is received. + * If there's nothing to do, this function will call cpu_relax() + */ + ax25_poll(&ax25); + + + /* Send out message every 15sec */ + if (timer_clock() - start > ms_to_ticks(15000L)) + { + start = timer_clock(); + ax25_sendVia(&ax25, path, countof(path), APRS_MSG, sizeof(APRS_MSG)); + } + } + return 0; +} diff --git a/boards/arduino-mega/examples/aprs/project.bertos b/boards/arduino-mega/examples/aprs/project.bertos new file mode 100644 index 00000000..804c2734 --- /dev/null +++ b/boards/arduino-mega/examples/aprs/project.bertos @@ -0,0 +1,83 @@ +(dp0 +S'BERTOS_PATH' +p1 +S'../../../..' +p2 +sS'SELECTED_FREQ' +p3 +V16000000 +p4 +sS'WIZARD_VERSION' +p5 +I3 +sS'PROJECT_NAME' +p6 +Vaprs +p7 +sS'TOOLCHAIN' +p8 +(dp9 +Vtarget +p10 +Vavr +p11 +sVthread +p12 +Vsingle +p13 +sVconfigured +p14 +V../configure --prefix=/usr/local/avr-4.1.2 --target=avr --enable-languages=c --disable-nls --disable-libssp --with-dwarf2 +p15 +sVversion +p16 +V4.1.2 +p17 +sVbuild +p18 +VDeveler s.r.l. 20070824 +p19 +sVpath +p20 +V/localhome/toolchain/avr/bin/avr-gcc +p21 +ssS'ENABLED_MODULES' +p22 +(lp23 +S'ser' +p24 +aS'ax25' +p25 +aS'formatwr' +p26 +aS'kfile' +p27 +aS'afsk' +p28 +aS'crc-ccitt' +p29 +aS'timer' +p30 +aS'debug' +p31 +asS'CPU_NAME' +p32 +VATmega1280 +p33 +sS'PROJECT_HW_PATH' +p34 +S'../..' +p35 +sS'PROJECT_SRC_PATH' +p36 +S'.' +p37 +sS'PRESET' +p38 +I01 +sS'OUTPUT' +p39 +(lp40 +S'codelite' +p41 +as. diff --git a/boards/arduino-mega/hw/hw_afsk.c b/boards/arduino-mega/hw/hw_afsk.c new file mode 100644 index 00000000..892b2a37 --- /dev/null +++ b/boards/arduino-mega/hw/hw_afsk.c @@ -0,0 +1,97 @@ +/** + * \file + * + * + * \brief AFSK modem hardware-specific definitions. + * + * + * \author Francesco Sacchi + */ + + +#include "hw_afsk.h" + +#include +#include + +#include +#include + + +/* + * Here we are using only one modem. If you need to receive + * from multiple modems, you need to define an array of contexts. + */ +static Afsk *ctx; + +void hw_afsk_adcInit(int ch, Afsk *_ctx) +{ + ctx = _ctx; + ASSERT(ch <= 5); + + AFSK_STROBE_INIT(); + AFSK_STROBE_OFF(); + /* Set prescaler to clk/8 (2 MHz), CTC, top = ICR1 */ + TCCR1A = 0; + TCCR1B = BV(CS11) | BV(WGM13) | BV(WGM12); + /* Set max value to obtain a 9600Hz freq */ + ICR1 = ((CPU_FREQ / 8) / 9600) - 1; + + /* Set reference to AVCC (5V), select CH */ + ADMUX = BV(REFS0) | ch; + + DDRC &= ~BV(ch); + PORTC &= ~BV(ch); + DIDR0 |= BV(ch); + + /* Set autotrigger on Timer1 Input capture flag */ + ADCSRB = BV(ADTS2) | BV(ADTS1) | BV(ADTS0); + /* Enable ADC, autotrigger, 1MHz, IRQ enabled */ + /* We are using the ADC a bit out of specifications otherwise it's not fast enough for our + * purposes */ + ADCSRA = BV(ADEN) | BV(ADSC) | BV(ADATE) | BV(ADIE) | BV(ADPS2); +} + + +bool hw_afsk_dac_isr; + +/* + * This is how you declare an ISR. + */ +DECLARE_ISR(ADC_vect) +{ + TIFR1 = BV(ICF1); + afsk_adc_isr(ctx, ((int16_t)((ADC) >> 2) - 128)); + if (hw_afsk_dac_isr) + PORTD = afsk_dac_isr(ctx) & 0xF0; + else + PORTD = 128; +} diff --git a/boards/arduino-mega/hw/hw_afsk.h b/boards/arduino-mega/hw/hw_afsk.h new file mode 100644 index 00000000..a2e075a4 --- /dev/null +++ b/boards/arduino-mega/hw/hw_afsk.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief AFSK modem hardware-specific definitions. + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef HW_AFSK_H +#define HW_AFSK_H + +#include "cfg/cfg_arch.h" + +#include + +struct Afsk; +void hw_afsk_adcInit(int ch, struct Afsk *_ctx); +void hw_afsk_dacInit(int ch, struct Afsk *_ctx); + +/** + * Initialize the specified channel of the ADC for AFSK needs. + * The adc should be configured to have a continuos stream of convertions. + * For every convertion there must be an ISR that read the sample + * and call afsk_adc_isr(), passing the context and the sample. + * + * \param ch channel to be used for AFSK demodulation. + * \param ctx AFSK context (\see Afsk). This parameter must be saved and + * passed back to afsk_adc_isr() for every convertion. + */ + +/* + * This macro will be called for AFSK initialization. We could implement everything here as a macro, + * but since initialization is rather complicated we decided to split its own function. Such function + * is defined in hw_afsk.c. + * Remember: since this .c file is not created by the wizard, you must add it to your_project_name.mk. + * If you create the file using BeRTOS SDK, it will be added for you. + */ +#define AFSK_ADC_INIT(ch, ctx) hw_afsk_adcInit(ch, ctx) + +/* + * Activate strobe pin. We use it for debugging purposes. If you don't use it, simply + * leave empty the following macros + */ +#define AFSK_STROBE_INIT() do { DDRB |= BV(5); } while (0) + +/* + * Set the pin high. This macro is called at the beginning of the interrupt routine + */ +#define AFSK_STROBE_ON() do { PORTB |= BV(5); } while (0) + +/* + * Set the pin low. This macro is called at the end of the interrupt routine + */ +#define AFSK_STROBE_OFF() do { PORTB &= ~BV(5); } while (0) + +/** + * Initialize the specified channel of the DAC for AFSK needs. + * The DAC has to be configured in order to call an ISR for every sample sent. + * The DAC doesn't have to start the IRQ immediatly but have to wait + * the AFSK driver to call AFSK_DAC_IRQ_START(). + * The ISR must then call afsk_dac_isr() passing the AFSK context. + * \param ch DAC channel to be used for AFSK modulation. + * \param ctx AFSK context (\see Afsk). This parameter must be saved and + * passed back to afsk_dac_isr() for every convertion. + */ +#define AFSK_DAC_INIT(ch, ctx) do { (void)ch, (void)ctx; DDRD |= 0xF0; DDRB |= BV(3); } while (0) + +/** + * Start DAC convertions on channel \a ch. + * \param ch DAC channel. + */ +#define AFSK_DAC_IRQ_START(ch) do { (void)ch; extern bool hw_afsk_dac_isr; PORTB |= BV(3); hw_afsk_dac_isr = true; } while (0) + +/** + * Stop DAC convertions on channel \a ch. + * \param ch DAC channel. + */ +#define AFSK_DAC_IRQ_STOP(ch) do { (void)ch; extern bool hw_afsk_dac_isr; PORTB &= ~BV(3); hw_afsk_dac_isr = false; } while (0) + +#endif /* HW_AFSK_H */ diff --git a/boards/arduino-mega/hw/hw_buzzer.h b/boards/arduino-mega/hw/hw_buzzer.h new file mode 100644 index 00000000..858ecbfb --- /dev/null +++ b/boards/arduino-mega/hw/hw_buzzer.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Buzzer hardware-specific definitions + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef HW_BUZZER_H +#define HW_BUZZER_H + +#warning TODO:This is an example implementation, you must implement it! + +#define BUZZER_BIT 1 +#define IS_BUZZER_ON 0 +#define BUZZER_HW_INIT do { /* Implement me! */ } while (0) +#define BUZZER_ON do { /* Implement me! */ } while (0) +#define BUZZER_OFF do { /* Implement me! */ } while (0) + +#endif /* HW_BUZZER_H */ diff --git a/boards/arduino-mega/hw/hw_dataflash.c b/boards/arduino-mega/hw/hw_dataflash.c new file mode 100644 index 00000000..844dd922 --- /dev/null +++ b/boards/arduino-mega/hw/hw_dataflash.c @@ -0,0 +1,126 @@ +/** + * \file + * + * + * \brief Dataflash HW control routines. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#include "hw/hw_dataflash.h" + +#include +#include +#include + +#warning TODO:This is an example implementation, you must implement it! + +MOD_DEFINE(hw_dataflash); + +/** + * Data flash init function. + * + * This function provide to initialize all that + * needs to drive a dataflash memory. + * Generaly needs to init pins to drive a CS line + * and reset line. + */ +void dataflash_hw_init(void) +{ + + //Disable CS line (remove if not needed) + dataflash_hw_setCS(false); + + /* + * Put here your code! + * + * Note: + * - if you drive manualy CS line, here init a CS pin + * - if you use a dedicated reset line, here init a reset pin + */ + + MOD_INIT(hw_dataflash); +} + +/** + * Chip Select drive. + * + * This function enable or disable a CS line. + * You must implement this function comply to a dataflash + * memory datasheet to allow the drive to enable a memory + * when \p enable flag is true, and disable it when is false. + */ +void dataflash_hw_setCS(bool enable) +{ + if (enable) + { + /* + * Put here your code to enable + * dataflash memory + */ + } + else + { + /* + * Put here your code to disable + * dataflash memory + */ + } +} + +/** + * Reset data flash memory. + * + * This function provide to send reset signal to + * dataflash memory. You must impement it comly to a dataflash + * memory datasheet to allow the drive to set a reset pin + * when \p enable flag is true, and disable it when is false. + * + */ +void dataflash_hw_setReset(bool enable) +{ + if (enable) + { + /* + * Put here your code to set reset of + * dataflash memory + */ + } + else + { + /* + * Put here your code to clear reset of + * dataflash memory + */ + } +} + diff --git a/boards/arduino-mega/hw/hw_dataflash.h b/boards/arduino-mega/hw/hw_dataflash.h new file mode 100644 index 00000000..5254446b --- /dev/null +++ b/boards/arduino-mega/hw/hw_dataflash.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Dataflash HW control routines (interface). + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef HW_DATAFLASH_H +#define HW_DATAFLASH_H + +#include + +void dataflash_hw_init(void); +void dataflash_hw_setCS(bool enable); +void dataflash_hw_setReset(bool enable); + +#endif /* HW_DATAFLASH_H */ diff --git a/boards/arduino-mega/hw/hw_dc_motor.h b/boards/arduino-mega/hw/hw_dc_motor.h new file mode 100644 index 00000000..8b8dd4b4 --- /dev/null +++ b/boards/arduino-mega/hw/hw_dc_motor.h @@ -0,0 +1,85 @@ +/** + * \file + * + * + * \brief DC motor hardware-specific definitions + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef HW_DC_MOTOR_H +#define HW_DC_MOTOR_H + +typedef enum MotorDCMap +{ + + /* Put here motor dc declaration */ + MOTOR_DC_CNT + +} MotorDCMap; + +/* + * Init all pin and device to manage dc motor. + */ +#define MOTOR_DC_INIT() \ + do { \ + /* Implement me! */ \ + } while (0) + + +/* + * Enable DC motor. + */ +#define DC_MOTOR_ENABLE(dev) \ + do { \ + /* Implement me! */ \ + } while (0) + +/* + * Disable DC motor. + */ +#define DC_MOTOR_DISABLE(dev) \ + do { \ + /* Implement me! */ \ + } while (0) + +/* + * Set direction for DC motor. + */ +#define DC_MOTOR_SET_DIR(dev, dir) \ + do { \ + /* Implement me! */ \ + } while (0) + + +#endif /* HW_DC_MOTOR_H */ diff --git a/boards/arduino-mega/hw/hw_ft245rl.h b/boards/arduino-mega/hw/hw_ft245rl.h new file mode 100644 index 00000000..cc0c8193 --- /dev/null +++ b/boards/arduino-mega/hw/hw_ft245rl.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief FT245RL USB interface hardware-specific definitions + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef HW_FT245RL_H +#define HW_FT245RL_H + +#warning TODO:This is an example implementation, you must implement it! + +#define FT245RL_DATA_IN() /* Implement me! */ +#define FT245RL_DATA_OUT() /* Implement me! */ +#define WR_HI /* Implement me! */ +#define WR_LO /* Implement me! */ + +#define RD_HI /* Implement me! */ +#define RD_LO /* Implement me! */ + +#define FT245RL_INIT() \ +do \ +{ \ + /* Implement me! */ \ +} while(0) + +#define FT245RL_DATA_RDY() (/* Implement me! */ false) +#define FT245RL_GETDATA() ({/* Implement me! */ (0);}) +#define FT245RL_TX_ALLOWED() (/* Implement me! */ false) +#define FT245RL_SETDATA(data) do {/* Implement me! */ (void)((data)); } while(0) + +#endif /* HW_FT245RL_H */ + diff --git a/boards/arduino-mega/hw/hw_i2c_bitbang.h b/boards/arduino-mega/hw/hw_i2c_bitbang.h new file mode 100644 index 00000000..4822af7c --- /dev/null +++ b/boards/arduino-mega/hw/hw_i2c_bitbang.h @@ -0,0 +1,66 @@ +/** + * \file + * + * + * \brief Macro for I2C bitbang operation. + * + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef HW_I2C_BITBANG_H +#define HW_I2C_BITBANG_H + +#warning TODO:This is an example implementation, you must implement it! + +#define SDA_HI do { /* Implement me:Set SDA High by setting SDA pin as input */ } while (0) +#define SDA_LO do { /* Implement me:Set SDA Low by setting SDA pin as open collector output */ } while (0) +#define SCL_HI do { /* Implement me:Set SCL High by setting SCL pin as input */ } while (0) +#define SCL_LO do { /* Implement me:Set SCL Low by setting SCL pin as open collector output */ } while (0) + + +#define SCL_IN (true) /* Implement me: read SDA pin state */ +#define SDA_IN (true) /* Implement me: read SCL pin state */ + +/** + * This macro should set SDA and SCL lines as input. + */ +#define I2C_BITBANG_HW_INIT do { /* Implement me! */ } while (0) + +/** + * Half bit delay routine used to generate the correct timings. + */ +#define I2C_HALFBIT_DELAY() do { /* Implement me! */ } while (0) + +#endif /* HW_I2C_BITBANG_H */ diff --git a/boards/arduino-mega/hw/hw_kbd.h b/boards/arduino-mega/hw/hw_kbd.h new file mode 100644 index 00000000..9ca228cb --- /dev/null +++ b/boards/arduino-mega/hw/hw_kbd.h @@ -0,0 +1,72 @@ +/** + * \file + * + * + * \brief Keyboard hardware-specific definitions + * + * \version $Id$ + * + * \author Francesco Sacchi + * \author Stefano Fedrigo + */ + +#ifndef HW_KBD_H +#define HW_KBD_H + +#include "hw/kbd_map.h" + +#include + +#warning TODO:This is an example implementation, you must implement it! + +#define K_RPT_MASK (K_UP | K_DOWN | K_OK | K_CANCEL) + +#define KBD_HW_INIT \ + do { \ + /* Put here code to init hw */ \ + } while (0) + +EXTERN_C int emul_kbdReadCols(void); + +/** + * Read the keyboard ports and return the mask of + * depressed keys. + */ +INLINE keymask_t kbd_readkeys(void) +{ + /* Implement me! */ + + //Only for test remove when implement this function + return 0; +} + +#endif /* HW_KBD_H */ diff --git a/boards/arduino-mega/hw/hw_lcd_32122a.h b/boards/arduino-mega/hw/hw_lcd_32122a.h new file mode 100644 index 00000000..6ec29c5c --- /dev/null +++ b/boards/arduino-mega/hw/hw_lcd_32122a.h @@ -0,0 +1,155 @@ +/** + * \file + * + * + * \brief Displaytech 32122A LCD driver + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ + +#ifndef HW_LCD_32122A_H +#define HW_LCD_32122A_H + +#include +#include + +#warning TODO:This is an example implementation, you must implement it! + +/** + * Predefined LCD PWM contrast values + */ +#define LCD_DEF_PWM 145 +#define LCD_MAX_PWM 505 +#define LCD_MIN_PWM 130 +#define LCD_PWM_CH 0 + + +/** + * \name LCD I/O pins/ports + * @{ + */ +#define LCD_RS /* Implement me! */ +#define LCD_RW /* Implement me! */ +#define LCD_PE_E1 /* Implement me! */ +#define LCD_PE_E2 /* Implement me! */ +#define LCD_DB0 /* Implement me! */ +#define LCD_DB1 /* Implement me! */ +#define LCD_DB2 /* Implement me! */ +#define LCD_DB3 /* Implement me! */ +#define LCD_DB4 /* Implement me! */ +#define LCD_DB5 /* Implement me! */ +#define LCD_DB6 /* Implement me! */ +#define LCD_DB7 /* Implement me! */ +#define LCD_PF_DB0 /* Implment me! */ +/*@}*/ + +/** + * \name LCD bus control macros + * @{ + */ +#define LCD_CLR_A0 do { /* Implement me! */ } while (0) +#define LCD_SET_A0 do { /* Implement me! */ } while (0) +#define LCD_CLR_RD do { /* Implement me! */ } while (0) +#define LCD_SET_RD do { /* Implement me! */ } while (0) +#define LCD_CLR_E1 do { /* Implement me! */ } while (0) +#define LCD_SET_E1 do { /* Implement me! */ } while (0) +#define LCD_CLR_E2 do { /* Implement me! */ } while (0) +#define LCD_SET_E2 do { /* Implement me! */ } while (0) +#define LCD_SET_E(x) do { (void)x; /* Implement me! */ } while (0) +#define LCD_CLR_E(x) do { (void)x; /* Implement me! */ } while (0) +/*@}*/ + +/** + * \name Chip select bits for LCD_SET_E() + * @{ + */ +#define LCDF_E1 ( 0/* Implement me! */) +#define LCDF_E2 ( 0/* Implement me! */) +/*@}*/ +/** Read from the LCD data bus (DB[0-7]) */ +#define LCD_WRITE(x) ((void)x)/* Implement me! */ +/** Write to the LCD data bus (DB[0-7]) */ +#define LCD_READ (0 /* Implement me! */ ) + +/** Set data bus direction to output (write to display) */ +#define LCD_DB_OUT /* Implement me! */ + +/** Set data bus direction to input (read from display) */ +#define LCD_DB_IN /* Implement me! */ + +/** Delay for write (Enable pulse width, 220ns) */ +#define LCD_DELAY_WRITE \ + do { \ + NOP; \ + NOP; \ + NOP; \ + NOP; \ + NOP; \ + } while (0) + +/** Delay for read (Data ouput delay time, 120ns) */ +#define LCD_DELAY_READ \ + do { \ + NOP; \ + NOP; \ + NOP; \ + NOP; \ + } while (0) + + +#define LCD_32122_RESET() do { /* Implement me! */ } while (0) + +INLINE void lcd_32122a_hw_bus_init(void) +{ + cpu_flags_t flags; + IRQ_SAVE_DISABLE(flags); + + /* + * Here set bus pin! + * to init a lcd device. + * + */ + + /* + * Data bus is in output state most of the time: + * LCD r/w functions assume it is left in output state + */ + LCD_DB_OUT; + + + IRQ_RESTORE(flags); +} + +#endif /* HW_LCD_32122A_H */ + diff --git a/boards/arduino-mega/hw/hw_lcd_hd44.h b/boards/arduino-mega/hw/hw_lcd_hd44.h new file mode 100644 index 00000000..dfebbcab --- /dev/null +++ b/boards/arduino-mega/hw/hw_lcd_hd44.h @@ -0,0 +1,157 @@ +/** + * \file + * + * + * \brief LCD low-level hardware macros + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ + +#ifndef HW_LCD_HD44_H +#define HW_LCD_HD44_H + +#include "cfg/cfg_lcd_hd44.h" /* CONFIG_LCD_4BIT */ + +#include +#include + +#warning TODO:This is an example implementation, you must implement it! + +/** + * \name LCD I/O pins/ports + * @{ + */ +#define LCD_RS /* Implement me! */ +#define LCD_RW /* Implement me! */ +#define LCD_E /* Implement me! */ +#define LCD_DB0 /* Implement me! */ +#define LCD_DB1 /* Implement me! */ +#define LCD_DB2 /* Implement me! */ +#define LCD_DB3 /* Implement me! */ +#define LCD_DB4 /* Implement me! */ +#define LCD_DB5 /* Implement me! */ +#define LCD_DB6 /* Implement me! */ +#define LCD_DB7 /* Implement me! */ +/*@}*/ + +/** + * \name DB high nibble (DB[4-7]) + * @{ + */ + +#if CONFIG_LCD_4BIT + #define LCD_MASK (LCD_DB7 | LCD_DB6 | LCD_DB5 | LCD_DB4) + #define LCD_SHIFT 4 +#else + #define LCD_MASK (uint8_t)0xff + #define LCD_SHIFT 0 +#endif +/*@}*/ + +/** + * \name LCD bus control macros + * @{ + */ +#define LCD_CLR_RS /* Implement me! */ +#define LCD_SET_RS /* Implement me! */ +#define LCD_CLR_RD /* Implement me! */ +#define LCD_SET_RD /* Implement me! */ +#define LCD_CLR_E /* Implement me! */ +#define LCD_SET_E /* Implement me! */ + +/* Enter command mode */ +#define LCD_SET_COMMAND() /* Implement me! */ + +/* Enter data mode */ +#define LCD_SET_DATA() /* Implement me! */ + +#if CONFIG_LCD_4BIT + #define LCD_WRITE_H(x) ((void)x)/* Implement me! */ + #define LCD_WRITE_L(x) ((void)x)/* Implement me! */ + #define LCD_READ_H ( 0 /* Implement me! */ ) + #define LCD_READ_L ( 0 /* Implement me! */ ) +#else + #define LCD_WRITE(x) ((void)x)/* Implement me! */ + #define LCD_READ (0 /* Implement me! */ ) +#endif +/*@}*/ + +/** Set data bus direction to output (write to display) */ +#define LCD_DB_OUT /* Implement me! */ + +/** Set data bus direction to input (read from display) */ +#define LCD_DB_IN /* Implement me! */ +/** Delay for write (Enable pulse width, 220ns) */ +#define LCD_DELAY_WRITE \ + do { \ + NOP; \ + NOP; \ + NOP; \ + NOP; \ + NOP; \ + } while (0) + +/** Delay for read (Data ouput delay time, 120ns) */ +#define LCD_DELAY_READ \ + do { \ + NOP; \ + NOP; \ + NOP; \ + NOP; \ + } while (0) + + + +INLINE void lcd_hd44_hw_bus_init(void) +{ + cpu_flags_t flags; + IRQ_SAVE_DISABLE(flags); + + /* + * Here set bus pin! + * to init a lcd device. + * + */ + + /* + * Data bus is in output state most of the time: + * LCD r/w functions assume it is left in output state + */ + LCD_DB_OUT; + + + IRQ_RESTORE(flags); +} + +#endif /* HW_LCD_HD44_H */ diff --git a/boards/arduino-mega/hw/hw_led.h b/boards/arduino-mega/hw/hw_led.h new file mode 100644 index 00000000..2bd46ee5 --- /dev/null +++ b/boards/arduino-mega/hw/hw_led.h @@ -0,0 +1,47 @@ +/** + * \file + * + * + * \brief Led on/off macros. + * + * \author Daniele Basile + */ + +#ifndef HW_LED_H +#define HW_LED_H + +#include + +#define LED_ON() PORTB |= BV(5) +#define LED_OFF() PORTB &= ~BV(5) +#define LED_INIT() DDRB |= BV(5) + +#endif /* HW_LED_H */ diff --git a/boards/arduino-mega/hw/hw_lm75.h b/boards/arduino-mega/hw/hw_lm75.h new file mode 100644 index 00000000..290dae09 --- /dev/null +++ b/boards/arduino-mega/hw/hw_lm75.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Hardware macro definition. + * + * \author Daniele Basile + */ + +#ifndef HW_LM75_H +#define HW_LM75_H + +#warning TODO:This is an example implentation, you must implement it! + +#define LM75_HW_INIT() \ + do { \ + /* Pin init */\ + } while (0) + +#endif /* HW_LM75_H */ + diff --git a/boards/arduino-mega/hw/hw_mcp41.c b/boards/arduino-mega/hw/hw_mcp41.c new file mode 100644 index 00000000..dc2a051c --- /dev/null +++ b/boards/arduino-mega/hw/hw_mcp41.c @@ -0,0 +1,53 @@ +/** + * \file + * + * + * \brief MCP41 hardware-specific definitions + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#include "hw/hw_mcp41.h" + +#include +#include + +#warning TODO:This is an example implementation, you must implement it! + +const uint16_t mcp41_ports[MCP41_CNT] = +{ + 0, /* add here mcp41 ports */ +}; +const uint8_t mcp41_pins [MCP41_CNT] = +{ + 0, /* add here mcp41 ports */ +}; + diff --git a/boards/arduino-mega/hw/hw_mcp41.h b/boards/arduino-mega/hw/hw_mcp41.h new file mode 100644 index 00000000..645b6dac --- /dev/null +++ b/boards/arduino-mega/hw/hw_mcp41.h @@ -0,0 +1,75 @@ +/** + * \file + * + * + * \brief MCP41 hardware-specific definitions + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef HW_MCP41_H +#define HW_MCP41_H + +#include "hw/mcp41_map.h" + +#include + + +#warning TODO:This is an example implementation, you must implement it! + + +INLINE void SET_MCP41_DDR(Mcp41Dev dev) +{ + /* Implement me! */ + //Warning: this funtions is like avr target name, + //fix it to comply for all target. + + //Only for test remove when implement this function + (void)dev; +} + +INLINE void MCP41_ON(Mcp41Dev i) +{ + /* Implement me! */ + + //Only for test remove when implement this function + (void)i; +} + +INLINE void MCP41_OFF(Mcp41Dev i) +{ + /* Implement me! */ + + //Only for test remove when implement this function + (void)i; +} + +#endif /* HW_MCP41_H */ diff --git a/boards/arduino-mega/hw/hw_ntc.c b/boards/arduino-mega/hw/hw_ntc.c new file mode 100644 index 00000000..3048725c --- /dev/null +++ b/boards/arduino-mega/hw/hw_ntc.c @@ -0,0 +1,46 @@ +/** + * \file + * + * + * \brief NTC hardware-specific definition + * + * \version $Id$ + * \author Lorenzo Berni + * + */ + +#include +#include "hw/ntc_map.h" + +const res_t NTC_RSER[NTC_CNT]; +const res_t NTC_RPAR[NTC_CNT]; +const amp_t NTC_AMP[NTC_CNT]; +const NtcHwInfo* NTC_INFO[NTC_CNT]; diff --git a/boards/arduino-mega/hw/hw_ntc.h b/boards/arduino-mega/hw/hw_ntc.h new file mode 100644 index 00000000..49152a45 --- /dev/null +++ b/boards/arduino-mega/hw/hw_ntc.h @@ -0,0 +1,136 @@ +/** + * \file + * + * + * \brief NTC hardware-specific definition + * + * \version $Id$ + * \author Francesco Sacchi + * + * A NTC acts as a variable resistor, whose resistance changes as a + * function of the temperature it measures. To sample it correctly, it is + * usually parallelized and serialized with two fixed resistor. The following diagram shows + * what is the exact disposition of the components, as handled by this + * library: + * + *
+ *                 o Vref
+ *                 |
+ *                 |                               o Vref
+ *                 |                               |
+ *               -----                             |
+ *              |     |                        ---------
+ *              | Rser|                       |         |
+ *              |     |                       |         |
+ *               -----     -----              |   ADC   |
+ *                 | Vp   |     |             |         |
+ *      -----------|------| Amp |-------------|         |
+ *     |           |      |     |      Vadc   |         |
+ *   -----       -----     -----               ---------
+ *  |     |     |     |
+ *  | NTC |     | Rpar|
+ *  |     |     |     |
+ *   -----       -----
+ *     |           |
+ *     |           |
+ *   -----       -----
+ *    ---         ---
+ *
+ * Amp is an amplifier that amplify of AMP times the signal. + * If we indicate Rp as the parallel of NTC with Rpar, ADCBITS as the bits of the ad converter + * and ADCVAL as the result from the adc convertion (Not Vadc but just the value read + * from the adc register), after various calculation, the expression of Rp is: + * + *
+ *
+ *            ADCVAL * Rser
+ * Rp = ------------------------
+ *         ADCBITS
+ *	2         * AMP - ADCVAL
+ *
+ * + * And after that NTC obvisiously is: + *
+ *        Rpar * Rp
+ * NTC = ----------
+ *        Rpar - Rp
+ *
+ * + * + * The function ntc_hw_read() compute the resistence using these formulas above. + */ + +#ifndef HW_NTC_H +#define HW_NTC_H + +#include "ntc_map.h" + +#include + +#include +#include + +#warning TODO:This is an example implementation, you must implement it! + +extern const res_t NTC_RSER[NTC_CNT]; +extern const res_t NTC_RPAR[NTC_CNT]; +extern const amp_t NTC_AMP[NTC_CNT]; +extern const NtcHwInfo* NTC_INFO[NTC_CNT]; + + +/*! + * Read the resistence of ntc device \a dev. + * Return the result in res_t type. + */ +INLINE res_t ntc_hw_read(NtcDev dev) +{ + ASSERT(dev < NTC_CNT); + // See above for formula explanation. + adcread_t adcval = adc_read((uint16_t)dev); + float rp = (adcval * NTC_RSER[dev] ) / ((1 << adc_bits()) * NTC_AMP[dev] - adcval); + + //kprintf("Rp[%f], Rntc[%f]\n", rp/100, ((NTC_RPAR[dev] * rp) / (NTC_RPAR[dev] - rp)) / 100.0); + + return ( (NTC_RPAR[dev] * rp) / (NTC_RPAR[dev] - rp) ); +} + + +/*! + * Return the info (aka the table) associated with ntc device \a dev. + */ +INLINE const NtcHwInfo* ntc_hw_getInfo(NtcDev dev) +{ + return NTC_INFO[dev]; +} + +#define NTC_HW_INIT do { /* Implement me! */ } while(0) + +#endif /* HW_NTC_H */ diff --git a/boards/arduino-mega/hw/hw_phase.c b/boards/arduino-mega/hw/hw_phase.c new file mode 100644 index 00000000..54509ef3 --- /dev/null +++ b/boards/arduino-mega/hw/hw_phase.c @@ -0,0 +1,46 @@ +/** + * \file + * + * + * \brief Phase control hardware-specific definitions + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef HW_PHASE_H +#define HW_PHASE_H + +#include "hw/hw_phase.h" + +#warning TODO:This is an example implementation, you must implement it! + +#endif /* HW_PHASE_H */ diff --git a/boards/arduino-mega/hw/hw_phase.h b/boards/arduino-mega/hw/hw_phase.h new file mode 100644 index 00000000..7649e702 --- /dev/null +++ b/boards/arduino-mega/hw/hw_phase.h @@ -0,0 +1,80 @@ +/** + * \file + * + * + * \brief Phase control hardware-specific definitions + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef HW_PHASE_H +#define HW_PHASE_H + +#include "hw/phase_map.h" + +#include + +#warning TODO:This is an example implementation, you must implement it! + +#define PHASE_HW_INIT do { /* Implement me! */ }while (0) + +INLINE void TRIAC_OFF(TriacDev i) +{ + /* Implement me! */ + + //Only for test remove when implement this function + (void)i; +} + + +INLINE void TRIAC_ON(TriacDev i) +{ + /* Implement me! */ + + //Only for test remove when implement this function + (void)i; +} + +INLINE void SET_TRIAC_DDR(TriacDev i) +{ + /* Implement me! */ + + //Only for test remove when implement this function + (void)i; +} + +void zerocross_isr(void); +#define DEFINE_ZEROCROSS_ISR() void zerocross_isr(void) + + +#endif /* HW_PHASE_H */ diff --git a/boards/arduino-mega/hw/hw_rit128x96.h b/boards/arduino-mega/hw/hw_rit128x96.h new file mode 100644 index 00000000..c24d1a87 --- /dev/null +++ b/boards/arduino-mega/hw/hw_rit128x96.h @@ -0,0 +1,78 @@ +/** + * \file + * + * + * \brief LM3S1986: OLED-RIT-128x96 (P14201) low-level hardware macros + * + * \author Andrea Righi + */ + +#ifndef HW_RIT128x96_H +#define HW_RIT128x96_H + +#include "cfg/macros.h" /* BV() */ +#include "cfg/debug.h" + +#include +#include +#include + +/** + * \name LCD I/O pins/ports + * @{ + */ +/* OLED Data/Command control pin */ +#define GPIO_OLEDDC_PIN 0 /* Implement me! */ + +/* OLED enable pin */ +#define GPIO_OLEDEN_PIN 0 /* Implement me! */ +/*@}*/ + +/** + * \name LCD bus control macros + * @{ + */ +/* Enter command mode */ +#define LCD_SET_COMMAND() /* Implement me! */ + +/* Enter data mode */ +#define LCD_SET_DATA() /* Implement me! */ + +/* Send data to the display */ +#define LCD_WRITE(x) ((void)x)/* Implement me! */ +/*@}*/ + +INLINE void lcd_rit128x96_hw_bus_init(void) +{ + /* Implement me! */ +} + +#endif /* HW_RIT128x96_H */ diff --git a/boards/arduino-mega/hw/hw_sd.h b/boards/arduino-mega/hw/hw_sd.h new file mode 100644 index 00000000..d15b5506 --- /dev/null +++ b/boards/arduino-mega/hw/hw_sd.h @@ -0,0 +1,53 @@ +/** + * \file + * + * + * \brief SD driver hardware-specific definitions. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef HW_SD_H +#define HW_SD_H + +#warning FIXME: This is an example implementation, you must implement it + +#define SD_CS_INIT() do { /* implement me */} while(0) +#define SD_CS_ON() do { /* implement me */} while(0) +#define SD_CS_OFF() do { /* implement me */} while(0) + +#define SD_PIN_INIT() do { /* implement me */} while(0) +#define SD_CARD_PRESENT() true /* implement me */ +#define SD_WRITE_PROTECT() false /* implement me */ + +#endif /* HW_SD_H */ diff --git a/boards/arduino-mega/hw/hw_ser.h b/boards/arduino-mega/hw/hw_ser.h new file mode 100644 index 00000000..2489c433 --- /dev/null +++ b/boards/arduino-mega/hw/hw_ser.h @@ -0,0 +1,53 @@ +/** + * \file + * + * + * \brief Serial hardware-specific definitions + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef HW_SER_H +#define HW_SER_H + +#include "cfg/cfg_ser.h" + +#if CONFIG_SER_STROBE + #warning FIXME: this is an example implementation, you must implement it + + #define SER_STROBE_INIT do { /* implement me */ } while (0) + #define SER_STROBE_ON do { /* implement me */ } while (0) + #define SER_STROBE_OFF do { /* implement me */ } while (0) +#endif + +#endif /* HW_SER_H */ diff --git a/boards/arduino-mega/hw/hw_sipo.h b/boards/arduino-mega/hw/hw_sipo.h new file mode 100644 index 00000000..3371c2c0 --- /dev/null +++ b/boards/arduino-mega/hw/hw_sipo.h @@ -0,0 +1,109 @@ +/** + * \file + * + * + * \brief Macro for HW_SIPO_H + * + * + * \version $Id$ + * + * \author Andrea Grandi + * \author Daniele Basile + */ + +#ifndef HW_SIPO_H +#define HW_SIPO_H + +/** + * Map sipo connection on board. + */ +typedef enum SipoMap +{ + SIPO_CNT +} SipoMap; + +/** + * Define generic macro to set pins logic level + */ +#define SIPO_SET_LEVEL_LOW(dev) do { /* Implement me! */ } while (0) +#define SIPO_SET_LEVEL_HIGH(dev) do { /* Implement me! */ } while (0) + + +/** + * Generate one low pulse on select line. + */ +#define PULSE_LOW(dev) do { /* Implement me! */ } while (0) + +/** + * Generate one hight pulse on select line. + */ +#define PULSE_HIGH(dev) do { /* Implement me! */ } while (0) + + +/** + * Define the procedure to drive serial input in sipo device (SI). + */ +#define SIPO_SI_HIGH() do { /* Implement me! */ } while (0) +#define SIPO_SI_LOW() do { /* Implement me! */ } while (0) + +/** + * Drive clock to shift SI data into latch. + */ +#define SIPO_SI_CLOCK(clk_pol) \ + do { \ + (void)clk_pol; \ + /* Implement me! */ \ + } while (0) + +/** + * Do everything needed in order to load dato into sipo. + */ +#define SIPO_LOAD(device, load_pol) do { /* Implement me! */ } while (0) + +/** + * Enable the shift register output. + */ +#define SIPO_ENABLE() do { /* Implement me! */ } while (0) + +/** + * Set polarity for Load, Clk, SI signals. + */ +#define SIPO_SET_LD_LEVEL(device, load_pol) do { /* Implement me! */ } while (0) +#define SIPO_SET_CLK_LEVEL(clock_pol) do { /* Implement me! */ } while (0) +#define SIPO_SET_SI_LEVEL() do { /* Implement me! */ } while (0) + +/** + * Do anything that needed to init sipo pins. + */ +#define SIPO_INIT_PIN() do { /* Implement me! */ } while (0) + +#endif /* HW_SIPO_H */ diff --git a/boards/arduino-mega/hw/hw_spi.h b/boards/arduino-mega/hw/hw_spi.h new file mode 100644 index 00000000..04e4893a --- /dev/null +++ b/boards/arduino-mega/hw/hw_spi.h @@ -0,0 +1,115 @@ +/** + * \file + * + * + * \brief Hardware macro definition. + * + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef HW_SPI_H +#define HW_SPI_H + +#warning TODO:This is an example implentation, you must implement it! + +#include + +/** + * SPI pin definition. + * + * \note CS is assert when level + * is low. + * + * \{ + */ +#define CS /* pin */ ///Connect to CS pin of Flash memory. +#define SCK /* pin */ ///Connect to SCK pin of Flash memory. +#define MOSI /* pin */ ///Connect to SI pin of Flash memory. +#define MISO /* pin */ ///Connect to SO pin of Flash memory. +#define SPI_PORT /* pin */ ///Micro pin PORT register. +#define SPI_PIN /* pin */ ///Micro pin PIN register. +#define SPI_DDR /* pin */ ///Micro pin DDR register. +/*\}*/ + +/** + * Pin logic level. + * + * \{ + */ +#define MOSI_LOW() do { /* Implement me! */ } while(0) +#define MOSI_HIGH() do { /* Implement me! */ } while(0) +#define MISO_HIGH() do { /* Implement me! */ } while(0) +#define SCK_LOW() do { /* Implement me! */ } while(0) +#define SCK_HIGH() do { /* Implement me! */ } while(0) +#define CS_LOW() do { /* Implement me! */ } while(0) +#define CS_HIGH() do { /* Implement me! */ } while(0) +/*\}*/ + +/** + * SPI pin commands. + * + * \{ + */ +#define CS_ENABLE() CS_LOW() +#define CS_DISABLE() CS_HIGH() +#define SS_ACTIVE() CS_LOW() +#define SS_INACTIVE() CS_HIGH() +#define SCK_INACTIVE() SCK_LOW() +#define SCK_ACTIVE() SCK_HIGH() +#define CS_OUT() do { /* Implement me! */ } while(0) +#define MOSI_IN() do { /* Implement me! */ } while(0) +#define MOSI_OUT() do { /* Implement me! */ } while(0) +#define IS_MISO_HIGH() (false /* Implement me! */ ) +#define MISO_IN() do { /* Implement me! */ } while(0) +#define MISO_OUT() do { /* Implement me! */ } while(0) +#define SCK_OUT() do { /* Implement me! */ } while(0) + +#define SCK_PULSE()\ + do {\ + SCK_HIGH();\ + SCK_LOW();\ + } while (0) +/*\}*/ + + +#define SPI_HW_INIT() \ + CS_DISABLE();\ + MOSI_LOW();\ + SCK_LOW();\ + MISO_IN();\ + MOSI_OUT();\ + SCK_OUT();\ + CS_OUT(); + +#endif /* HW_SPI_H */ + diff --git a/boards/arduino-mega/hw/hw_stepper.h b/boards/arduino-mega/hw/hw_stepper.h new file mode 100644 index 00000000..13141124 --- /dev/null +++ b/boards/arduino-mega/hw/hw_stepper.h @@ -0,0 +1,309 @@ +/** + * \file + * + * + * \brief Stepper hardware-specific definitions + * + * \version $Id$ + * + * \author Daniele Basile + */ + + +#ifndef HW_STEPPER_H +#define HW_STEPPER_H + +#include + +#include + +#include + +#warning TODO:This is an example implentation, you must implement it! + +#define STEPPER_STROBE_INIT \ +do { \ + /* put init code for strobe */ \ +} while (0) + + +#define STEPPER_STROBE_ON do { /* Implement me! */ } while(0) +#define STEPPER_STROBE_OFF do { /* Implement me! */ } while(0) + +/** + * CPU clock frequency is divided by 2^STEPPER_PRESCALER_LOG2 to + * obtain stepper clock. + */ +#define STEPPER_PRESCALER_LOG2 1 + +/** + * Stepper timer clock frequency. + */ +#define STEPPER_CLOCK ((CPU_FREQ) >> STEPPER_PRESCALER_LOG2) + +/** + * us delay to reset a stepper motor. + * This is the time neccessary to reset + * the stepper controll chip. (see datasheet for more detail). + */ +#define STEPPER_RESET_DELAY 1 + +/* + * Pins define for each stepper + */ +#define STEPPER_1_CW_CCW_PIN 0 +#define STEPPER_1_HALF_FULL_PIN 0 +#define STEPPER_1_CONTROL_PIN 0 +#define STEPPER_1_ENABLE_PIN 0 +#define STEPPER_1_RESET_PIN 0 + +/* put here other stepper motor */ + +#define STEPPER_1_SET do { /* Implement me! */ } while(0) +/* add here the set for other stepper motor */ + +#define STEPPER_1_CLEAR do { /* Implement me! */ } while(0) +/* add here the clear for other stepper motor */ + +/* + * Generic macro definition + */ + +/* + * Stepper init macro + */ +#define STEPPER_PIN_INIT_MACRO(port, index) do { \ + /* Add here init pin code */ \ + } while (0) + +/* + * Stepper commands macros + */ +#define STEPPER_SET_CW(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_CCW(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_HALF(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_FULL(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_CONTROL_LOW(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_CONTROL_HIGHT(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_ENABLE(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_DISABLE(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_RESET_ENABLE(index) do { /* Implement me! */ } while (0) +#define STEPPER_SET_RESET_DISABLE(index) do { /* Implement me! */ } while (0) + + +/* + * Reset stepper macro + */ + +#define STEPPER_RESET_MACRO(index) do { \ + STEPPER_SET_RESET_ENABLE(index); \ + timer_udelay(STEPPER_RESET_DELAY); \ + STEPPER_SET_RESET_DISABLE(index); \ + } while (0) + +/* + * Set half or full step macro + */ +#define STEPPER_SET_STEP_MODE_MACRO(index, flag) do { \ + if (flag) \ + STEPPER_SET_HALF(index); \ + else \ + STEPPER_SET_FULL(index); \ + } while (0) + +/* + * Set control status macro + */ +#warning TODO: This macro is not implemented (see below) + +#define STEPPER_SET_CONTROL_BIT_MACRO(index, flag) do { \ + /* if (flag) */ \ + /* WARNING This macros not implemented */ \ + /* else */ \ + /* WARNING This macros not implemented */ \ + } while (0) + +/* + * Set current power macro + */ +#warning TODO: This macro is not implemented (see below) + +#define STEPPER_SET_POWER_CURRENT_MACRO(index, flag) do { \ + /* if (flag) */ \ + /* WARNING This macrois not implemented */ \ + /* else */ \ + /* WARNING This macrois not implemented */ \ + } while (0) + +/* + * Set rotation of stepper motor + * - dir = 1: positive rotation + * - dir = 0: no motor moviment + * - dir = -1: negative rotation + * + */ +#define STEPPER_SET_DIRECTION_MACRO(index, dir) do { \ + switch (dir) \ + { \ + case 1: \ + STEPPER_SET_CW(index); \ + break; \ + case -1: \ + STEPPER_SET_CCW(index); \ + break; \ + case 0: \ + break; \ + } \ + } while (0) + + +/* + * Define macros for manage low level of stepper. + */ + +#define STEPPER_INIT() do { \ + STEPPER_PIN_INIT_MACRO(A, 1); \ + /* Add here code for other stepper motor */ \ + } while (0) + + +/* + * Enable select stepper motor + */ +#define STEPPER_ENABLE(index) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_SET_ENABLE(1); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + +/* + * Enable all stepper connect to micro + */ +#define STEPPER_ENABLE_ALL() do { \ + STEPPER_SET_ENABLE(1); \ + /* Add here code for other stepper motor */ \ + } while (0) + +/* + * Disable select stepper motor + */ +#define STEPPER_DISABLE(index) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_SET_DISABLE(1); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + +/* + * Disable all stepper connect to micro + */ +#define STEPPER_DISABLE_ALL() do { \ + STEPPER_SET_DISABLE(1); \ + /* Add here code for other stepper motor */ \ + } while (0) + +/* + * Reset selected stepper motor + */ +#define STEPPER_RESET(index) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_RESET_MACRO(1); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + +/* + * Reset all stepper motor + */ +#define STEPPER_RESET_ALL() do { \ + STEPPER_RESET_MACRO(1) \ + /* Add here code for other stepper motor */ \ + } while (0) + +// Set half/full step macros +#define STEPPER_SET_HALF_STEP(index, flag) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_SET_STEP_MODE_MACRO(1, flag); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + + +// Control status +#define STEPPER_SET_CONTROL_BIT(index, flag) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_SET_CONTROL_BIT_MACRO(1, flag); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + + +// Set stepper power current +#define STEPPER_SET_POWER_CURRENT(index, flag) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_SET_POWER_CURRENT_MACRO(1, flag); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + +// Set rotation dirction of stepper motor +#define STEPPER_SET_DIRECTION(index, dir) do { \ + switch (index) \ + { \ + case 1: \ + STEPPER_SET_DIRECTION_MACRO(1, dir); \ + break; \ + /* Add here code for other stepper motor */ \ + } \ + } while (0) + +#endif /* HW_STEPPER_H */ + + diff --git a/boards/arduino-mega/hw/hw_tas5706a.h b/boards/arduino-mega/hw/hw_tas5706a.h new file mode 100644 index 00000000..d1e1a2e6 --- /dev/null +++ b/boards/arduino-mega/hw/hw_tas5706a.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief HW pin handling. + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef HW_TAS5706A_H +#define HW_TAS5706A_H + +#include + +#warning FIXME: This is an example implementation, you must implement it + +#define TAS5706A_SETPOWERDOWN(val) do { (void) val; /* implement me */ } while (0) +#define TAS5706A_SETRESET(val) do { (void) val; /* implement me */ } while (0) +#define TAS5706A_SETMUTE(val) do { (void) val; /* implement me */ } while (0) + +#define TAS5706A_PIN_INIT() \ + do { \ + TAS5706A_SETPOWERDOWN(true); \ + TAS5706A_SETRESET(true); \ + TAS5706A_SETMUTE(true); \ + /* complete me */ \ + } while (0) + +#define TAS5706A_MCLK_INIT() \ + do { \ + /* implement me */ \ + } while(0) + + +#endif /* HW_TAS5706A_H */ diff --git a/boards/arduino-mega/hw/hw_thermo.h b/boards/arduino-mega/hw/hw_thermo.h new file mode 100644 index 00000000..bbfc9dde --- /dev/null +++ b/boards/arduino-mega/hw/hw_thermo.h @@ -0,0 +1,182 @@ +/** + * \file + * + * + * \brief thermo hardware-specific control functions. + * + * \version $Id$ + * \author Francesco Sacchi + * + */ + +#ifndef HW_THERMO_H +#define HW_THERMO_H + +#include "thermo_map.h" +#include "ntc_map.h" + +#include +#include + +#include +#include + +#warning TODO:This is an example implentation, you must implement it! + +/*! + * This function should return the temperature set tolerance. + */ +INLINE deg_t thermo_hw_tolerance(ThermoDev dev) +{ + ASSERT(dev < THERMO_CNT); + + switch (dev) + { + case THERMO_TEST: + /* Put here convertion function to temperature size */ + break; + + /* Put here your thermo device */ + + default: + ASSERT(0); + } + + return 0; +} + + +/*! + * This function should return the timeout for reaching the + * target temperature. + */ +INLINE ticks_t thermo_hw_timeout(ThermoDev dev) +{ + ASSERT(dev < THERMO_CNT); + + switch (dev) + { + case THERMO_TEST: + /* return ms_to_ticks(60000); */ + break; + + /* Put here a time out for select thermo device */ + + default: + ASSERT(0); + } + + return 0; +} + + + +/*! + * Read the temperature of the hw device \a dev. + */ +INLINE deg_t thermo_hw_read(ThermoDev dev) +{ + return ntc_read(dev); +} + + +/*! + * Turns off a specific device. + * This function is usefull to handle errors. + */ +INLINE void thermo_hw_off(ThermoDev dev) +{ + ASSERT(dev < THERMO_CNT); + + switch (dev) + { + case THERMO_TEST: + phase_setPower(TRIAC_TEST, 0); + break; + + /* Put here a thermo device to turn off */ + + default: + ASSERT(0); + } + +} + + +/*! + * Based on the current temperature \a cur_temp and the target temperature \a target, this function turns on and off specific + * triac channel and handles the freezer alarm. + * It may use also PID control for thermo-regolations. + */ +INLINE void thermo_hw_set(ThermoDev dev, deg_t target, deg_t cur_temp) +{ + ASSERT(dev < THERMO_CNT); + + deg_t dist = target - cur_temp; + //kprintf("dev[%d], dist[%d]\n", dev, dist); + + switch(dev) + { + case THERMO_TEST: + if (dist > 0) + { + /* phase_setPower(TRIAC_TEST, dist * PID_TEST_K); */ + } + else + { + /* phase_setPower(TRIAC_TEST, 0); */ + } + break; + + /* Put here an other thermo device */ + + default: + ASSERT(0); + } +} + + +#define THERMO_HW_INIT _thermo_hw_init() + +/*! + * Init hw associated with thermo-control. + */ +INLINE void _thermo_hw_init(void) +{ + ASSERT(phase_initialized); + ASSERT(ntc_initialized); + + phase_setPower(TRIAC_TEST, 0); + + /* Add here the other thermo device */ +} + +#endif /* HW_THERMO_H */ diff --git a/boards/arduino-mega/hw/hw_tlv5618.h b/boards/arduino-mega/hw/hw_tlv5618.h new file mode 100644 index 00000000..4a2b4202 --- /dev/null +++ b/boards/arduino-mega/hw/hw_tlv5618.h @@ -0,0 +1,69 @@ +/** + * \file + * + * + * \brief TLV5816 DAC hardware-specific definitions + * + * + * \author Francesco Sacchi + */ + +#ifndef HW_TLV5816_H +#define HW_TLV5816_H + +#warning TODO:This is an example implementation, you must implement it! + +#define TLV5618_CSINIT(pin) \ +do \ +{ \ + (void)pin; \ + /* Implement me! */ \ + TLV5618_CSHIGH(pin); \ +} while(0) + +#define TLV5618_CSLOW(pin) \ +do \ +{ \ + (void)pin; \ + /* Implement me! */ \ +} while(0) + + +#define TLV5618_CSHIGH(pin) \ +do \ +{ \ + (void)pin; \ + /* Implement me! */ \ +} while(0) + + +#endif /* HW_TLV5816_H */ + diff --git a/boards/arduino-mega/hw/hw_tmp123.h b/boards/arduino-mega/hw/hw_tmp123.h new file mode 100644 index 00000000..adb18588 --- /dev/null +++ b/boards/arduino-mega/hw/hw_tmp123.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Hardware macro definition. + * + * \author Daniele Basile + */ + +#ifndef HW_TMP123_H +#define HW_TMP123_H + +#warning TODO:This is an example implentation, you must implement it! + +#define TMP123_HW_CS_EN() /* Implement me! */ +#define TMP123_HW_CS_DIS() /* Implement me! */ + +#define TMP123_HW_INIT() \ + do { \ + /* Pin init */\ + } while (0) + +#endif /* HW_TMP123_H */ + diff --git a/boards/arduino-mega/hw/kbd_map.h b/boards/arduino-mega/hw/kbd_map.h new file mode 100644 index 00000000..ffe14311 --- /dev/null +++ b/boards/arduino-mega/hw/kbd_map.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Keyboard map definitions. + * + * \version $Id$ + * + * \author Francesco Sacchi + * \author Stefano Fedrigo + */ + +#ifndef HW_KBD_MAP_H +#define HW_KBD_MAP_H + +#include + +#warning TODO:This is an example implentation, you must implement it! + + +/** + * Type for keyboard mask. + */ +typedef uint16_t keymask_t; + +/** + * \name Keycodes. + */ +/*@{*/ +#define K_UP BV(0) +#define K_DOWN BV(1) +#define K_OK BV(2) +#define K_CANCEL BV(3) + +#define K_REPEAT BV(13) /**< This is a repeated keyevent. */ +#define K_TIMEOUT BV(14) /**< Fake key event for timeouts. */ +#define K_LONG BV(15) +/*@}*/ + +#define K_LNG_MASK 0 + +#endif /* HW_KBD_MAP_H */ diff --git a/boards/arduino-mega/hw/mcp41_map.h b/boards/arduino-mega/hw/mcp41_map.h new file mode 100644 index 00000000..6646391c --- /dev/null +++ b/boards/arduino-mega/hw/mcp41_map.h @@ -0,0 +1,59 @@ +/** + * \file + * + * + * \brief MCP41 digital potentiometer map definitions. + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef MCP41_MAP_H +#define MCP41_MAP_H + +#warning TODO:This is an example implentation, you must implement it! + +/** \name Enum for mcp41 pot evices. + * \{ + * + */ +typedef enum Mcp41Dev +{ + MCP41_LED, + + /* put here other mcp41 device */ + + MCP41_CNT, +} Mcp41Dev; +/* \} */ + +#endif /* MCP41_MAP_H */ diff --git a/boards/arduino-mega/hw/ntc_map.h b/boards/arduino-mega/hw/ntc_map.h new file mode 100644 index 00000000..505f1c31 --- /dev/null +++ b/boards/arduino-mega/hw/ntc_map.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief NTC map definitions. + * + * \version $Id$ + * + * \author Giovanni Bajo + * \author Francesco Sacchi + */ + +#ifndef NTC_MAP_H +#define NTC_MAP_H + +#include + +#warning TODO:This is an example implentation, you must implement it! + +/*! \name Enum for ntc devices. + * \{ + */ +typedef enum NtcDev +{ + NTC_TEST, + + /* Put here your thermo device */ + + NTC_CNT +} NtcDev; +/* \} */ + +#endif /* NTC_MAP_H */ diff --git a/boards/arduino-mega/hw/phase_map.h b/boards/arduino-mega/hw/phase_map.h new file mode 100644 index 00000000..7436e5e8 --- /dev/null +++ b/boards/arduino-mega/hw/phase_map.h @@ -0,0 +1,58 @@ +/** + * \file + * + * + * \brief Triac map definitions. + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef PHASE_MAP_H +#define PHASE_MAP_H + +#warning TODO:This is an example implentation, you must implement it! + +/*! \name Enum for triac devices. + * \{ + */ +typedef enum TriacDev +{ + TRIAC_TEST, + + /* Put here other triac device */ + + TRIAC_CNT +} TriacDev; +/* \} */ + +#endif /* PHASE_MAP_H */ diff --git a/boards/arduino-mega/hw/pwm_map.h b/boards/arduino-mega/hw/pwm_map.h new file mode 100644 index 00000000..723da2f1 --- /dev/null +++ b/boards/arduino-mega/hw/pwm_map.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * + * \brief PWM map device. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef HW_PWM_MAP_H +#define HW_PWM_MAP_H + +#warning TODO:This is an example implentation, you must implement it! + +typedef enum +{ + PWM_CH0 = 0, + PWM_CH1, + PWM_CH2, + PWM_CH3, + +/* + * add other PWM channel or + * change above. + */ + + PWM_CNT +} PwmDev; + +#endif /* HW_PWM_MAP_H */ diff --git a/boards/arduino-mega/hw/thermo_map.h b/boards/arduino-mega/hw/thermo_map.h new file mode 100644 index 00000000..4376076a --- /dev/null +++ b/boards/arduino-mega/hw/thermo_map.h @@ -0,0 +1,70 @@ +/** + * \file + * + * + * \brief Thermo regulation control map definitions. + * + * \version $Id$ + * + * \author Francesco Sacchi + */ + +#ifndef THERMO_MAP_H +#define THERMO_MAP_H + +#include +#include + +#warning TODO:This is an example implentation, you must implement it! + +typedef uint8_t thermostatus_t; + +#define THERMO_OFF 0 +#define THERMO_HEATING BV(0) +#define THERMO_FREEZING BV(1) +#define THERMO_TGT_REACH BV(2) +#define THERMOERRF_NTCSHORT BV(3) +#define THERMOERRF_NTCOPEN BV(4) +#define THERMOERRF_TIMEOUT BV(5) +#define THERMO_ACTIVE BV(6) + +#define THERMO_ERRMASK (THERMOERRF_NTCSHORT | THERMOERRF_NTCOPEN | THERMOERRF_TIMEOUT) + +typedef enum ThermoDev +{ + THERMO_TEST, + + /* Put here your thermo device */ + + THERMO_CNT, +} ThermoDev; + +#endif /* THERMO_MAP_H */ diff --git a/boards/arduino-mega/templates/.spec b/boards/arduino-mega/templates/.spec new file mode 100644 index 00000000..07fb8eed --- /dev/null +++ b/boards/arduino-mega/templates/.spec @@ -0,0 +1,3 @@ +name = "Templates" +ord = 0 +description = "Use these as a starting point for your BeRTOS project." diff --git a/boards/arduino-mega/templates/empty/.spec b/boards/arduino-mega/templates/empty/.spec new file mode 100644 index 00000000..f3edfbc2 --- /dev/null +++ b/boards/arduino-mega/templates/empty/.spec @@ -0,0 +1,8 @@ +name = 'empty preset' +advanced = True +description=""" +

+This is a minimalist project, it just initializes the hardware of the +supported board and proposes an empty main. +<\p> +""" diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_adc.h b/boards/arduino-mega/templates/empty/cfg/cfg_adc.h new file mode 100644 index 00000000..dd65e134 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_adc.h @@ -0,0 +1,110 @@ +/** + * \file + * + * + * \brief Configuration file for the ADC module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_ADC_H +#define CFG_ADC_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define ADC_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define ADC_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Clock Frequency for ADC conversion. + * + * $WIZ$ type = "int" + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_CLOCK 4800000UL + +/** + * Minimum time for starting up a conversion [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_STARTUP_TIME 20 + +/** + * Minimum time for sample and hold [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_SHTIME 834 + +/** + * ADC Voltage Reference. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "avr_adc_refs" + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_REF ADC_AVR_AVCC + +/** + * ADC clock divisor from main crystal. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ max = 128 + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_DIVISOR 2 + +/** + * Enable ADC strobe for debugging ADC ISR. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_ADC_STROBE 0 + +#endif /* CFG_ADC_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_afsk.h b/boards/arduino-mega/templates/empty/cfg/cfg_afsk.h new file mode 100644 index 00000000..cce47c1f --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_afsk.h @@ -0,0 +1,113 @@ +/** + * \file + * + * + * \brief Configuration file for AFSK1200 modem. + * + * \author Francesco Sacchi + */ + +#ifndef CFG_AFSK_H +#define CFG_AFSK_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AFSK_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AFSK_LOG_FORMAT LOG_FMT_TERSE + + +/** + * AFSK discriminator filter type. + * + * $WIZ$ type = "enum"; value_list = "afsk_filter_list" + */ +#define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV + + +/** + * AFSK receiver buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_RX_BUFLEN 32 + +/** + * AFSK transimtter buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_TX_BUFLEN 32 + +/** + * AFSK DAC sample rate for modem outout. + * $WIZ$ type = "int" + * $WIZ$ min = 2400 + */ +#define CONFIG_AFSK_DAC_SAMPLERATE 9600 + +/** + * AFSK RX timeout in ms, set to -1 to disable. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_AFSK_RXTIMEOUT 0 + + +/** + * AFSK Preamble length in [ms], before starting transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_PREAMBLE_LEN 300UL + + + +/** + * AFSK Trailer length in [ms], before stopping transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_TRAILER_LEN 50UL + +#endif /* CFG_AFSK_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_ax25.h b/boards/arduino-mega/templates/empty/cfg/cfg_ax25.h new file mode 100644 index 00000000..64f862f1 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_ax25.h @@ -0,0 +1,76 @@ +/** + * \file + * + * + * \brief Configuration file for the AX25 protocol module. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef CFG_AX25_H +#define CFG_AX25_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AX25_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AX25_LOG_FORMAT LOG_FMT_TERSE + +/** + * AX25 frame buffer lenght. + * + * $WIZ$ type = "int" + * $WIZ$ min = 18 + */ +#define CONFIG_AX25_FRAME_BUF_LEN 330 + + +/** + * Enable repeaters listing in AX25 frames. + * If enabled use 56 addtional bytes of RAM + * for each message received. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_AX25_RPT_LST 1 + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_battfs.h b/boards/arduino-mega/templates/empty/cfg/cfg_battfs.h new file mode 100644 index 00000000..fb438a08 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_battfs.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for BattFS module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_BATTFS_H +#define CFG_BATTFS_H + + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define BATTFS_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define BATTFS_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Set to 1 to enable free page shuffling. + * This increase memories life but makes debugging + * more difficult due to its unrepeteable state. + * $WIZ$ type = "boolean" + */ +#define CONFIG_BATTFS_SHUFFLE_FREE_PAGES 0 + + +#endif /* BATTFS */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_context_switch.h b/boards/arduino-mega/templates/empty/cfg/cfg_context_switch.h new file mode 100644 index 00000000..fe0b4f87 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_context_switch.h @@ -0,0 +1,71 @@ +/** + * \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. + * + * $WIZ$ type = "boolean" + * $WIZ$ module= "boolean" + * $WIZ$ conditional_deps = "ser" + */ +#define CONFIG_USE_HP_TIMER 1 + + +/** + * Use board led for benchmark. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_USE_LED 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/arduino-mega/templates/empty/cfg/cfg_dataflash.h b/boards/arduino-mega/templates/empty/cfg/cfg_dataflash.h new file mode 100644 index 00000000..8bd7828a --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_dataflash.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for data flash memory module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_DATAFLASH_H +#define CFG_DATAFLASH_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DATAFLASH_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DATAFLASH_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_DATAFLASH_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_dc_motor.h b/boards/arduino-mega/templates/empty/cfg/cfg_dc_motor.h new file mode 100644 index 00000000..fd9bac73 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_dc_motor.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief Configuration file for DC motor module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DC_MOTOR_H +#define CFG_DC_MOTOR_H + +/** + * Number of the DC motors to manage. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_DC_MOTOR 4 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE + + +/** + * Min value of DC motor speed. + * \note Generally this value is the min value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_MIN_SPEED 0 + + +/** + * Max value of DC motor speed. + * \note Generally this value is the max value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + * $WIZ$ max = 65535 + */ +#define CONFIG_DC_MOTOR_MAX_SPEED 65535 + + +/** + * Sampling period in millisecond. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_PERIOD 40 + +/** + * Amount of millisecond before to read sample. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_DELAY 2 + +/** + * This control set which mode the driver use to lock share + * resources when we use the preempitive kernel. + * If we set to 1 we use the semaphore module otherwise the + * driver disable the switch context every time we need to access + * to shared sources. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_USE_SEM 1 + +#endif /* CFG_DC_MOTOR_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_debug.h b/boards/arduino-mega/templates/empty/cfg/cfg_debug.h new file mode 100644 index 00000000..f7596ca1 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_debug.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for Debug module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_DEBUG_H +#define CFG_DEBUG_H + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_KDEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_KDEBUG_BAUDRATE 115200UL + +#endif /* CFG_DEBUG_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_fat.h b/boards/arduino-mega/templates/empty/cfg/cfg_fat.h new file mode 100644 index 00000000..d418b783 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_fat.h @@ -0,0 +1,140 @@ +/** + * \file + * + * + * \brief Configuration file for Fat module. + * + * \version $Id$ + * + * \author Luca Ottaviano + * \author Francesco Sacchi + */ + +#ifndef CFG_FAT_H +#define CFG_FAT_H + +/** + * Use word alignment to access FAT structure. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_WORD_ACCESS 0 +#define _WORD_ACCESS CONFIG_FAT_WORD_ACCESS + +/** + * Enable read functions only. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_READONLY 0 +#define _FS_READONLY CONFIG_FAT_FS_READONLY + +/** + * Minimization level to remove some functions. + * $WIZ$ type = "int"; min = 0; max = 3 + */ +#define CONFIG_FAT_FS_MINIMIZE 0 +#define _FS_MINIMIZE CONFIG_FAT_FS_MINIMIZE + +/** + * If enabled, this reduces memory consumption 512 bytes each file object by using a shared buffer. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_TINY 1 +#define _FS_TINY CONFIG_FAT_FS_TINY + +/** + * To enable string functions, set _USE_STRFUNC to 1 or 2. + * $WIZ$ type = "int" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_USE_STRFUNC 0 +#define _USE_STRFUNC CONFIG_FAT_USE_STRFUNC + +/** + * Enable f_mkfs function. Requires CONFIG_FAT_FS_READONLY = 0. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_MKFS 0 +#define _USE_MKFS (CONFIG_FAT_USE_MKFS && !CONFIG_FAT_FS_READONLY) + +/** + * Enable f_forward function. Requires CONFIG_FAT_FS_TINY. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_FORWARD 0 +#define _USE_FORWARD (CONFIG_FAT_USE_FORWARD && CONFIG_FAT_FS_TINY) + +/** + * Number of volumes (logical drives) to be used. + * $WIZ$ type = "int"; min = 1; max = 255 + */ +#define CONFIG_FAT_DRIVES 1 +#define _DRIVES CONFIG_FAT_DRIVES + +/** + * Maximum sector size to be handled. (512/1024/2048/4096). + * 512 for memory card and hard disk, 1024 for floppy disk, 2048 for MO disk + * $WIZ$ type = "int"; min = 512; max = 4096 + */ +#define CONFIG_FAT_MAX_SS 512 +#define _MAX_SS CONFIG_FAT_MAX_SS + +/** + * When _MULTI_PARTITION is set to 0, each volume is bound to the same physical + * drive number and can mount only first primaly partition. When it is set to 1, + * each volume is tied to the partitions listed in Drives[]. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_MULTI_PARTITION 0 +#define _MULTI_PARTITION CONFIG_FAT_MULTI_PARTITION + +/** + * Specifies the OEM code page to be used on the target system. + * $WIZ$ type = "int" + */ +#define CONFIG_FAT_CODE_PAGE 850 +#define _CODE_PAGE CONFIG_FAT_CODE_PAGE + +/** + * Support for long filenames. Enable only if you have a valid Microsoft license. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_LFN 0 +#define _USE_LFN CONFIG_FAT_USE_LFN + +/** + * Maximum Long File Name length to handle. + * $WIZ$ type = "int"; min = 8; max = 255 + */ +#define CONFIG_FAT_MAX_LFN 255 +#define _MAX_LFN CONFIG_FAT_MAX_LFN + +#endif /* CFG_FAT_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_flash25.h b/boards/arduino-mega/templates/empty/cfg/cfg_flash25.h new file mode 100644 index 00000000..f7ff219b --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_flash25.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for flash25 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_FLASH25_H +#define CFG_FLASH25_H + +/** + * Eeprom memory type. + * + *$WIZ$ type = "enum" + *$WIZ$ value_list = "flash25_list" + */ +#define CONFIG_FLASH25 FLASH25_AT25F2048 + +#endif /* CFG_FALSH25_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_formatwr.h b/boards/arduino-mega/templates/empty/cfg/cfg_formatwr.h new file mode 100644 index 00000000..bac8aca7 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_formatwr.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief Configuration file for formatted write module. + * + * \author Daniele Basile + */ + +#ifndef CFG_FORMATWR_H +#define CFG_FORMATWR_H + +/** + * printf()-style formatter configuration. + * $WIZ$ type = "enum"; value_list = "printf_list" + * + * \sa PRINTF_DISABLED + * \sa PRINTF_NOMODIFIERS + * \sa PRINTF_REDUCED + * \sa PRINTF_NOFLOAT + * \sa PRINTF_FULL + */ +#define CONFIG_PRINTF PRINTF_FULL + +/** + * Size of buffer to format "%" sequences in printf. + * + * Warning: no check on buffer size is done when formatting, be careful especially + * with big numbers and %f formatting. + * + * $WIZ$ type = "int" + * $WIZ$ min = 4 + */ +#define CONFIG_FRMWRI_BUFSIZE 134 + +#endif /* CFG_FORMATWR_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_gfx.h b/boards/arduino-mega/templates/empty/cfg/cfg_gfx.h new file mode 100644 index 00000000..59dde04c --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_gfx.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for GFX module. + * + * \author Daniele Basile + */ + +#ifndef CFG_GFX_H +#define CFG_GFX_H + +/** + * Enable line clipping algorithm. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_CLIPPING 1 + +/** + * Enable text rendering in bitmaps. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_TEXT 1 + +/** + * Enable virtual coordinate system. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_VCOORDS 1 + +/** + * Select bitmap pixel format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "bitmap_format" + */ +#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB + +#endif /* CFG_GFX_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_hashtable.h b/boards/arduino-mega/templates/empty/cfg/cfg_hashtable.h new file mode 100644 index 00000000..e4645f33 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_hashtable.h @@ -0,0 +1,51 @@ +/** + * \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/arduino-mega/templates/empty/cfg/cfg_heap.h b/boards/arduino-mega/templates/empty/cfg/cfg_heap.h new file mode 100644 index 00000000..dc4b1fa3 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_heap.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for heap module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_HEAP_H +#define CFG_HEAP_H + +/** + * Enable malloc/free like API. + * $WIZ$ type = "boolean" + */ +#define CONFIG_HEAP_MALLOC 1 + +#endif /* CFG_HEAP_H */ + + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_i2c.h b/boards/arduino-mega/templates/empty/cfg/cfg_i2c.h new file mode 100644 index 00000000..7df0d097 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_i2c.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for I2C module. + * + * \author Daniele Basile + */ + +#ifndef CFG_I2C_H +#define CFG_I2C_H + +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ +#define CONFIG_I2C_FREQ 100000UL + +/** + * I2C start timeout. + * For how many milliseconds the i2c_start + * should try to get an ACK before + * returning error. + * + * $WIZ$ type = "int" + */ +#define CONFIG_I2C_START_TIMEOUT 100 + +/** + * I2C backend the driver should use. + * + * I2C_BACKEND_BUILTIN: Use (if present) the builtin i2c hardware. + * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. + * \see drv/i2c.h for more information. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "i2c_backend" + */ +#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define I2C_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define I2C_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_I2C_H */ + + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_i2s.h b/boards/arduino-mega/templates/empty/cfg/cfg_i2s.h new file mode 100644 index 00000000..52fa8848 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_i2s.h @@ -0,0 +1,75 @@ +/** + * \file + * + * + * \brief Configuration file for I2S module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_I2S_H +#define CFG_I2S_H + +/** + * Length of each play buffer. + * + * $WIZ$ type = "int" + */ +#define CONFIG_PLAY_BUF_LEN 8192 + +/** + * Sampling frequency of the audio file. + * + * $WIZ$ type = "int" + * $WIZ$ min = 32000 + * $WIZ$ max = 192000 + */ +#define CONFIG_SAMPLE_FREQ 44100UL + +/** + * 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 + +#endif /* CFG_I2S_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_ini_reader.h b/boards/arduino-mega/templates/empty/cfg/cfg_ini_reader.h new file mode 100644 index 00000000..702c78ee --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_ini_reader.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Configuration file for ini reader module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_INI_READER_H +#define CFG_INI_READER_H + +/** + * Maximum ini file line length (chars). + * $WIZ$ type = "int"; min = 1 + */ +#define CONFIG_INI_MAX_LINE_LEN 64 + +#endif /* CFG_INI_READER_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_kbd.h b/boards/arduino-mega/templates/empty/cfg/cfg_kbd.h new file mode 100644 index 00000000..116f3318 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_kbd.h @@ -0,0 +1,59 @@ +/** + * \file + * + * + * \brief Configuration file for keyboard module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_KBD_H +#define CFG_KBD_H + +/// Keyboard polling method. $WIZ$ supports = "False" +#define CONFIG_KBD_POLL KBD_POLL_SOFTINT + +/// Enable keyboard event delivery to observers. $WIZ$ type = "boolean" +#define CONFIG_KBD_OBSERVER 0 + +/// Enable key beeps. $WIZ$ type = "boolean" +#define CONFIG_KBD_BEEP 0 + +/// Enable long pression handler for keys. $WIZ$ type = "boolean" +#define CONFIG_KBD_LONGPRESS 0 + +/// Enable calling poor man's scheduler to be called inside kbd_peek. $WIZ$ type = "boolean" +#define CONFIG_KBD_SCHED 0 + +#endif /* CFG_KBD_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_keytag.h b/boards/arduino-mega/templates/empty/cfg/cfg_keytag.h new file mode 100644 index 00000000..8bedadf6 --- /dev/null +++ b/boards/arduino-mega/templates/empty/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/arduino-mega/templates/empty/cfg/cfg_kfile.h b/boards/arduino-mega/templates/empty/cfg/cfg_kfile.h new file mode 100644 index 00000000..0ebed7b1 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_kfile.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief Configuration file for KFile interface module. + * + * \author Daniele Basile + */ + +#ifndef CFG_KFILE_H +#define CFG_KFILE_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KFILE_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KFILE_LOG_FORMAT LOG_FMT_TERSE + +/** + * Enable the gets function with echo. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KFILE_GETS 0 + +#endif /* CFG_KFILE_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_lcd_32122a.h b/boards/arduino-mega/templates/empty/cfg/cfg_lcd_32122a.h new file mode 100644 index 00000000..5a9b3ca7 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_lcd_32122a.h @@ -0,0 +1,63 @@ +/** + * \file + * + * + * \brief Displaytech 32122A LCD driver configuration file. + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ +#ifndef CFG_LCD_32122A_H +#define CFG_LCD_32122A_H + +/** + * Enable soft interrupt to refresh the LCD. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_SOFTINT_REFRESH 0 + +/** + * Enable wait macro when display is busy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_WAIT 0 + +/** + * Display refresh time 32122a. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_LCD_REFRESH 100 + +#endif /* CFG_LCD_32122A_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_lcd_hd44.h b/boards/arduino-mega/templates/empty/cfg/cfg_lcd_hd44.h new file mode 100644 index 00000000..78f1f20b --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_lcd_hd44.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for lcd display module. + * + * \author Daniele Basile + */ + +#ifndef CFG_LCD_H +#define CFG_LCD_H + +/** + * Use 4 bit addressing mode. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_4BIT 0 + +/** + * Use a table to speed up LCD memory addressing. + * This will use about 100 bytes of RAM. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_ADDRESS_FAST 1 + +#endif /* CFG_LCD_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_lm75.h b/boards/arduino-mega/templates/empty/cfg/cfg_lm75.h new file mode 100644 index 00000000..91b347ad --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_lm75.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for the LM75 sensor temperature. + * + * \author Daniele Basile + */ + +#ifndef CFG_LM75_H +#define CFG_LM75_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define LM75_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define LM75_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_md2.h b/boards/arduino-mega/templates/empty/cfg/cfg_md2.h new file mode 100644 index 00000000..22ec7dbe --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_md2.h @@ -0,0 +1,54 @@ +/** + * \file + * + * + * \brief Configuration file for MD2 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_MD2_H +#define CFG_MD2_H + +/** + * Size of block for MD2 algorithm. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_MD2_BLOCK_LEN 16 + +/// Use standard permutation in MD2 algorithm. $WIZ$ type = "boolean" +#define CONFIG_MD2_STD_PERM 0 + +#endif /* CFG_MD2_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_monitor.h b/boards/arduino-mega/templates/empty/cfg/cfg_monitor.h new file mode 100644 index 00000000..ffe17c07 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_monitor.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 0 + +#endif /* CFG_MONITOR_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_nmea.h b/boards/arduino-mega/templates/empty/cfg/cfg_nmea.h new file mode 100644 index 00000000..9249a9af --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_nmea.h @@ -0,0 +1,85 @@ +/** + * \file + * + * + * \brief Configuration file for NMEA module. + * + * \author Daniele Basile + */ + +#ifndef CFG_NMEA_H +#define CFG_NMEA_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define NMEA_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define NMEA_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Maximum number of sentence parsers supported. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCES 8 + +/** + * Max length of a complete sentence. The standard says 82 bytes, but its probably + * better to go at least 128 since some units don't adhere to the 82 bytes + * especially for proprietary sentences. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCE_LENGTH 255 + +/** + * Max tokens in one sentence. 24 is enough for any standard sentence. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_TOKENS 24 + +#endif /* CFG_NMEA_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_parser.h b/boards/arduino-mega/templates/empty/cfg/cfg_parser.h new file mode 100644 index 00000000..572b4a24 --- /dev/null +++ b/boards/arduino-mega/templates/empty/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/arduino-mega/templates/empty/cfg/cfg_phase.h b/boards/arduino-mega/templates/empty/cfg/cfg_phase.h new file mode 100644 index 00000000..57202930 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_phase.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for phase module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PHASE_H +#define CFG_PHASE_H + +/** + * Max value of the duty cycle on triac. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_DUTY 100 + +/** + * Max value of the triac power. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_POWER 100 + +#endif /* CFG_PHASE_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_pocketbus.h b/boards/arduino-mega/templates/empty/cfg/cfg_pocketbus.h new file mode 100644 index 00000000..aa0b090b --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_pocketbus.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for pocketbus module. + * + * \author Daniele Basile + */ + +#ifndef CFG_POCKETBUS_H +#define CFG_POCKETBUS_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define POCKETBUS_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define POCKETBUS_LOG_FORMAT LOG_FMT_TERSE + + +/** + *Buffer len for pockebus protocol. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_POCKETBUS_BUFLEN 128 + +/** + * Command replay timeout in milliseconds. + * $WIZ$ type = "int" + */ +#define CONFIG_POCKETBUS_CMD_REPLY_TIMEOUT 50 + +#endif /* CFG_POCKETBUS_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_proc.h b/boards/arduino-mega/templates/empty/cfg/cfg_proc.h new file mode 100644 index 00000000..52b4e414 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_proc.h @@ -0,0 +1,107 @@ +/** + * \file + * + * + * \brief Kernel configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_PROC_H +#define CFG_PROC_H + +/** + * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN 0 + +/** + * Kernel interrupt supervisor. WARNING: Experimental, still incomplete! + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_KERN_IRQ 0 + +/** + * Preemptive process scheduling. + * + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "timer" + */ +#define CONFIG_KERN_PREEMPT 0 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_KERN_QUANTUM 11 + +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 1 + +/** + * Dynamic memory allocation for processes. + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "heap" + */ +#define CONFIG_KERN_HEAP 0 + +/** + * Size of the dynamic memory pool used by processes. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_KERN_HEAP_SIZE 2048L + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KERN_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PROC_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_pwm.h b/boards/arduino-mega/templates/empty/cfg/cfg_pwm.h new file mode 100644 index 00000000..6627ee2d --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_pwm.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for PWM module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PWM_H +#define CFG_PWM_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define PWM_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define PWM_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PWM_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_ramp.h b/boards/arduino-mega/templates/empty/cfg/cfg_ramp.h new file mode 100644 index 00000000..1aeb8a89 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_ramp.h @@ -0,0 +1,116 @@ + /** + * \file + * + * + * \brief Configuration file Ramp algorithm module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_RAMP_H +#define CFG_RAMP_H + +/** + * Define whether the ramp will use floating point calculation within ramp_evaluate(). + * Otherwise, a less precise fixed point version will be used, which is faster on + * platforms which do no support floating point operations. + * + * \note Floating point operations will be always done within ramp_compute() to + * precalculate values, so there has to be at least a floating point emulation support. + * + * $WIZ$ type = "boolean" + */ +#define RAMP_USE_FLOATING_POINT 0 + + +#if !RAMP_USE_FLOATING_POINT + + /** + * Number of least-significant bits which are stripped away during ramp evaluation. + * This setting allows to specify larger ramps at the price of less precision. + * + * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks. + * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum + * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2 + * brings the maximum length to 13.4 secs, at the price of less precision. + * + * ramp_compute() will check that the length is below the maximum allowed through + * a runtime assertion. + * + * \note This macro is used only for the fixed-point version of the ramp. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ max = 32 + */ + #define RAMP_CLOCK_SHIFT_PRECISION 2 +#endif + + +/** +* Negative pulse width for ramp. +* $WIZ$ type = "int" +* $WIZ$ min = 1 +*/ +#define RAMP_PULSE_WIDTH 50 + +/** + * Default ramp time (microsecs). + * $WIZ$ type = "int" + * $WIZ$ min = 1000 + */ +#define RAMP_DEF_TIME 6000000UL +/** + * Default ramp maxfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MAXFREQ 5000 +/** + * Default ramp minfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MINFREQ 200 +/** + * Default ramp powerrun (deciampere). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERRUN 10 +/** + * Default ramp poweridle (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERIDLE 1 + +#endif /* CFG_RAMP_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_randpool.h b/boards/arduino-mega/templates/empty/cfg/cfg_randpool.h new file mode 100644 index 00000000..83285984 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_randpool.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for randpool module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_RANDPOOL_H +#define CFG_RANDPOOL_H + + +/** + * Define a size, in byte, of entropy pool. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_SIZE_ENTROPY_POOL 64 + +/// Enable timer in randpool algo. $WIZ$ type = "boolean" +#define CONFIG_RANDPOOL_TIMER 1 + +#endif /* CFG_RANDPOOL_H */ + + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_sem.h b/boards/arduino-mega/templates/empty/cfg/cfg_sem.h new file mode 100644 index 00000000..2a6de7a9 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_sem.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 0 + +#endif /* CFG_SEM_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_ser.h b/boards/arduino-mega/templates/empty/cfg/cfg_ser.h new file mode 100644 index 00000000..91a10e0b --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_ser.h @@ -0,0 +1,222 @@ +/** + * \file + * + * + * \brief Configuration file for serial module. + * + * \author Daniele Basile + */ + +#ifndef CFG_SER_H +#define CFG_SER_H + +/** + * Example of setting for serial port and + * spi port. + * Edit these define for your project. + */ + +/** + * Size of the outbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_RXBUFSIZE 32 + + +/** + * Size of the outbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_RXBUFSIZE 32 + +/** + * SPI data order. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_order_bit" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST + +/** + * SPI clock division factor. + * $WIZ$ type = "int" + * $WIZ$ supports = "avr" + */ +#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" + */ +#define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW + +/** + * SPI clock phase you can choose sample on first edge or + * sample on second clock edge. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_spi_phase" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE + +/** + * Default transmit timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_TXTIMEOUT -1 + +/** + * Default receive timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_RXTIMEOUT -1 + +/** + * Use RTS/CTS handshake. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_SER_HWHANDSHAKE 0 + +/** + * Default baudrate for all serial ports (set to 0 to disable). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_SER_DEFBAUDRATE 0UL + +/// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean" +#define CONFIG_SER_STROBE 0 + +#endif /* CFG_SER_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_signal.h b/boards/arduino-mega/templates/empty/cfg/cfg_signal.h new file mode 100644 index 00000000..e78a4519 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_signal.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 0 + +#endif /* CFG_SIGNAL_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_spi_bitbang.h b/boards/arduino-mega/templates/empty/cfg/cfg_spi_bitbang.h new file mode 100644 index 00000000..6e9a96bc --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_spi_bitbang.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for SPI bitbang module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_SPI_BITBANG_H +#define CFG_SPI_BITBANG_H + +/** + * Set data order for emulated SPI. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ordet_bit_list" + */ +#define CONFIG_SPI_DATAORDER SPI_LSB_FIRST + +#endif /* CFG_SPI_BITBANG_H */ + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_stepper.h b/boards/arduino-mega/templates/empty/cfg/cfg_stepper.h new file mode 100644 index 00000000..e086065c --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_stepper.h @@ -0,0 +1,70 @@ +/** + * \file + * + * + * \brief Configuration file for stepper motor module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_STEPPER_H +#define CFG_STEPPER_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define STEPPER_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define STEPPER_LOG_FORMAT LOG_FMT_TERSE + +/** + * Max number of the stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_STEPPER_MOTORS 6 + +/** + * Max number of the timer usable on target to drive stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TC_STEPPER_MAX_NUM 6 + +#endif /* CFG_STEPPER_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_tas5706a.h b/boards/arduino-mega/templates/empty/cfg/cfg_tas5706a.h new file mode 100644 index 00000000..e1112c0f --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_tas5706a.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for the TAS5706A module. + * + * \version $Id$ + * \author Luca Ottaviano + */ + +#ifndef CFG_TAS5706A_H +#define CFG_TAS5706A_H + +/** + * Maximum output volume for TAS chip [dB]. + * + * $WIZ$ type = "int" + * $WIZ$ min = -100 + * $WIZ$ max = 24 + */ +#define CONFIG_TAS_MAX_VOL -39 + +#endif /* CFG_TAS5706A_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_thermo.h b/boards/arduino-mega/templates/empty/cfg/cfg_thermo.h new file mode 100644 index 00000000..2734f899 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_thermo.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for thermo module. + * + * \author Daniele Basile + */ + +#ifndef CFG_THERMO_H +#define CFG_THERMO_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_THERMO_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_THERMO_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Interval at which thermo control is performed [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_INTERVAL_MS 100 + +/** + * Number of different samples we interpolate over to get the hifi temperature. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_HIFI_NUM_SAMPLES 10 + +#endif /* CFG_THERMO_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_timer.h b/boards/arduino-mega/templates/empty/cfg/cfg_timer.h new file mode 100644 index 00000000..1cff78b8 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_timer.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for timer module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_TIMER_H +#define CFG_TIMER_H + +/** + * Hardware timer selection for drv/timer.c. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "timer_select" + */ +#define CONFIG_TIMER TIMER_DEFAULT + +/** + * Debug timer interrupt using a strobe pin. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_STROBE 0 + +/** + * Enable asynchronous timers. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_EVENTS 1 + +/** + * Support hi-res timer_usleep(). + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_UDELAY 1 + +#endif /* CFG_TIMER_H */ diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_wdt.h b/boards/arduino-mega/templates/empty/cfg/cfg_wdt.h new file mode 100644 index 00000000..9f4caae9 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_wdt.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Configuration file for watchdog module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_WDT_H +#define CFG_WDT_H + +/// Enable watchdog timer. $WIZ$ type = "autoenabled" +#define CONFIG_WATCHDOG 0 + +#endif /* CFG_WDT_H */ + + diff --git a/boards/arduino-mega/templates/empty/cfg/cfg_xmodem.h b/boards/arduino-mega/templates/empty/cfg/cfg_xmodem.h new file mode 100644 index 00000000..38db7359 --- /dev/null +++ b/boards/arduino-mega/templates/empty/cfg/cfg_xmodem.h @@ -0,0 +1,79 @@ +/** + * \file + * + * + * \brief Configuration file for xmodem module. + * + * \author Daniele Basile + */ + +#ifndef CFG_XMODEM_H +#define CFG_XMODEM_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_XMODEM_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_XMODEM_LOG_FORMAT LOG_FMT_TERSE + + +/// Enable Rx. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_RECV 1 + +/// Enable TX. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_SEND 1 + +/// Allow a Rx/Tx of 1Kbyte block. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_1KCRC 1 + +/** + * Max retries before giving up. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXRETRIES 15 + +/** + * Max retries before switching to BCC. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXCRCRETRIES 7 + +#endif /* CFG_XMODEM_H */ + diff --git a/boards/arduino-mega/templates/empty/empty.mk b/boards/arduino-mega/templates/empty/empty.mk new file mode 100644 index 00000000..986e3f6c --- /dev/null +++ b/boards/arduino-mega/templates/empty/empty.mk @@ -0,0 +1,89 @@ +# +# Wizard autogenerated makefile. +# DO NOT EDIT, use the empty_user.mk file instead. +# + +# Constants automatically defined by the selected modules + + +# Our target application +TRG += empty + +empty_PREFIX = "avr-" + +empty_SUFFIX = "" + +empty_SRC_PATH = boards/arduino/templates/empty + +empty_HW_PATH = boards/arduino + +# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_CSRC INSTEAD! +empty_WIZARD_CSRC = \ + bertos/benchmark/context_switch.c \ + bertos/kern/signal.c \ + bertos/kern/kfile.c \ + bertos/struct/heap.c \ + bertos/mware/formatwr.c \ + bertos/mware/event.c \ + bertos/drv/timer.c \ + bertos/cpu/avr/drv/timer_avr.c \ + bertos/kern/proc.c \ + bertos/cpu/avr/drv/ser_avr.c \ + bertos/drv/ser.c \ + bertos/mware/hex.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_PCSRC INSTEAD! +empty_WIZARD_PCSRC = \ + bertos/mware/formatwr.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE empty_USER_CPPASRC INSTEAD! +empty_WIZARD_CPPASRC = \ + bertos/cpu/avr/hw/switch_ctx_avr.S \ + # + +# 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 empty_USER_ASRC INSTEAD! +empty_WIZARD_ASRC = \ + \ + # + +empty_CPPFLAGS = -D'CPU_FREQ=(16000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(empty_HW_PATH) -I$(empty_SRC_PATH) $(empty_CPU_CPPFLAGS) $(empty_USER_CPPFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_LDFLAGS = $(empty_CPU_LDFLAGS) $(empty_WIZARD_LDFLAGS) $(empty_USER_LDFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_CPPAFLAGS = $(empty_CPU_CPPAFLAGS) $(empty_WIZARD_CPPAFLAGS) $(empty_USER_CPPAFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_CSRC = $(empty_CPU_CSRC) $(empty_WIZARD_CSRC) $(empty_USER_CSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_PCSRC = $(empty_CPU_PCSRC) $(empty_WIZARD_PCSRC) $(empty_USER_PCSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_CPPASRC = $(empty_CPU_CPPASRC) $(empty_WIZARD_CPPASRC) $(empty_USER_CPPASRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_CXXSRC = $(empty_CPU_CXXSRC) $(empty_WIZARD_CXXSRC) $(empty_USER_CXXSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_ASRC = $(empty_CPU_ASRC) $(empty_WIZARD_ASRC) $(empty_USER_ASRC) + +# CPU specific flags and options, defined in the CPU definition files. +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +empty_MCU = atmega328p +empty_CPU_CPPFLAGS = -Os -Ibertos/cpu/avr/ +empty_PROGRAMMER_CPU = atmega328p +empty_STOPFLASH_SCRIPT = bertos/prg_scripts/avr/stopflash.sh +empty_STOPDEBUG_SCRIPT = bertos/prg_scripts/none.sh +empty_DEBUG_SCRIPT = bertos/prg_scripts/nodebug.sh +empty_FLASH_SCRIPT = bertos/prg_scripts/avr/flash.sh + +include $(empty_SRC_PATH)/empty_user.mk diff --git a/boards/arduino-mega/templates/empty/empty_user.mk b/boards/arduino-mega/templates/empty/empty_user.mk new file mode 100644 index 00000000..4c8ed7ef --- /dev/null +++ b/boards/arduino-mega/templates/empty/empty_user.mk @@ -0,0 +1,43 @@ +# +# User makefile. +# Edit this file to change compiler options and related stuff. +# + +# Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help +empty_PROGRAMMER_TYPE = none +empty_PROGRAMMER_PORT = none + +# Files included by the user. +empty_USER_CSRC = \ + $(empty_SRC_PATH)/main.c \ + # + +# Files included by the user. +empty_USER_PCSRC = \ + # + +# Files included by the user. +empty_USER_CPPASRC = \ + # + +# Files included by the user. +empty_USER_CXXSRC = \ + # + +# Files included by the user. +empty_USER_ASRC = \ + # + +# Flags included by the user. +empty_USER_LDFLAGS = \ + # + +# Flags included by the user. +empty_USER_CPPAFLAGS = \ + # + +# Flags included by the user. +empty_USER_CPPFLAGS = \ + -fno-strict-aliasing \ + -fwrapv \ + # diff --git a/boards/arduino-mega/templates/empty/main.c b/boards/arduino-mega/templates/empty/main.c new file mode 100644 index 00000000..407efe20 --- /dev/null +++ b/boards/arduino-mega/templates/empty/main.c @@ -0,0 +1,89 @@ +/** + * \file + * + * + * \author Andrea Righi + * + * \brief Empty project. + * + * This is a minimalist project, it just initializes the hardware of the + * supported board and proposes an empty main. + */ + +#include "hw/hw_led.h" + +#include + +#include +#include + +#include +#include + +static Serial out; + +static void init(void) +{ + /* Enable all the interrupts */ + IRQ_ENABLE; + + /* Initialize debugging module (allow kprintf(), etc.) */ + kdbg_init(); + /* Initialize system timer */ + timer_init(); + + /* + * XXX: Arduino has a single UART port that was previously + * initialized for debugging purpose. + * In order to activate the serial driver you should disable + * the debugging module. + */ +#if 0 + /* Initialize UART0 */ + ser_init(&out, SER_UART0); + /* Configure UART0 to work at 115.200 bps */ + ser_setbaudrate(&out, 115200); +#else + (void)out; +#endif + /* Initialize LED driver */ + LED_INIT(); +} + +int main(void) +{ + init(); + + /* Put your code here... */ + while (1) + { + } +} diff --git a/boards/arduino-mega/templates/empty/project.bertos b/boards/arduino-mega/templates/empty/project.bertos new file mode 100644 index 00000000..1e2b6eaa --- /dev/null +++ b/boards/arduino-mega/templates/empty/project.bertos @@ -0,0 +1,77 @@ +(dp0 +S'BERTOS_PATH' +p1 +S'../../../..' +p2 +sS'SELECTED_FREQ' +p3 +V16000000 +p4 +sS'WIZARD_VERSION' +p5 +I3 +sS'PROJECT_NAME' +p6 +Vempty +p7 +sS'TOOLCHAIN' +p8 +(dp9 +S'target' +p10 +Vavr +p11 +sS'thread' +p12 +Vsingle +p13 +sS'configured' +p14 +V../configure --prefix=/usr/local/avr-4.3.2/ --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 +p15 +sS'version' +p16 +V4.3.2 +p17 +sS'build' +p18 +VGCC +p19 +sS'path' +p20 +V/opt/avr-4.3.2/bin/avr-gcc +p21 +ssS'ENABLED_MODULES' +p22 +(lp23 +S'ser' +p24 +aS'formatwr' +p25 +aS'debug' +p26 +aS'kfile' +p27 +aS'heap' +p28 +aS'timer' +p29 +asS'CPU_NAME' +p30 +VATmega1280 +p31 +sS'PROJECT_HW_PATH' +p32 +S'../..' +p33 +sS'PROJECT_SRC_PATH' +p34 +S'.' +p35 +sS'PRESET' +p36 +I01 +sS'OUTPUT' +p37 +(lp38 +s. diff --git a/boards/arduino-mega/templates/kernel/.spec b/boards/arduino-mega/templates/kernel/.spec new file mode 100644 index 00000000..04a79cff --- /dev/null +++ b/boards/arduino-mega/templates/kernel/.spec @@ -0,0 +1,9 @@ +name = 'kernel preset' +advanced = True +description=""" +

+This is a minimalist kernel project: it just initializes the hardware and +creates an independent process to blink an LED, while the main loop +continues to monitor the stack utilization of all the processes. +

+""" diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_adc.h b/boards/arduino-mega/templates/kernel/cfg/cfg_adc.h new file mode 100644 index 00000000..dd65e134 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_adc.h @@ -0,0 +1,110 @@ +/** + * \file + * + * + * \brief Configuration file for the ADC module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_ADC_H +#define CFG_ADC_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define ADC_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define ADC_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Clock Frequency for ADC conversion. + * + * $WIZ$ type = "int" + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_CLOCK 4800000UL + +/** + * Minimum time for starting up a conversion [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_STARTUP_TIME 20 + +/** + * Minimum time for sample and hold [us]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ supports = "at91" + */ +#define CONFIG_ADC_SHTIME 834 + +/** + * ADC Voltage Reference. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "avr_adc_refs" + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_REF ADC_AVR_AVCC + +/** + * ADC clock divisor from main crystal. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ max = 128 + * $WIZ$ supports = "avr" + */ +#define CONFIG_ADC_AVR_DIVISOR 2 + +/** + * Enable ADC strobe for debugging ADC ISR. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_ADC_STROBE 0 + +#endif /* CFG_ADC_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_afsk.h b/boards/arduino-mega/templates/kernel/cfg/cfg_afsk.h new file mode 100644 index 00000000..cce47c1f --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_afsk.h @@ -0,0 +1,113 @@ +/** + * \file + * + * + * \brief Configuration file for AFSK1200 modem. + * + * \author Francesco Sacchi + */ + +#ifndef CFG_AFSK_H +#define CFG_AFSK_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AFSK_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AFSK_LOG_FORMAT LOG_FMT_TERSE + + +/** + * AFSK discriminator filter type. + * + * $WIZ$ type = "enum"; value_list = "afsk_filter_list" + */ +#define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV + + +/** + * AFSK receiver buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_RX_BUFLEN 32 + +/** + * AFSK transimtter buffer length. + * + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_AFSK_TX_BUFLEN 32 + +/** + * AFSK DAC sample rate for modem outout. + * $WIZ$ type = "int" + * $WIZ$ min = 2400 + */ +#define CONFIG_AFSK_DAC_SAMPLERATE 9600 + +/** + * AFSK RX timeout in ms, set to -1 to disable. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_AFSK_RXTIMEOUT 0 + + +/** + * AFSK Preamble length in [ms], before starting transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_PREAMBLE_LEN 300UL + + + +/** + * AFSK Trailer length in [ms], before stopping transmissions. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_AFSK_TRAILER_LEN 50UL + +#endif /* CFG_AFSK_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_ax25.h b/boards/arduino-mega/templates/kernel/cfg/cfg_ax25.h new file mode 100644 index 00000000..64f862f1 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_ax25.h @@ -0,0 +1,76 @@ +/** + * \file + * + * + * \brief Configuration file for the AX25 protocol module. + * + * \version $Id$ + * \author Francesco Sacchi + */ + +#ifndef CFG_AX25_H +#define CFG_AX25_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AX25_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AX25_LOG_FORMAT LOG_FMT_TERSE + +/** + * AX25 frame buffer lenght. + * + * $WIZ$ type = "int" + * $WIZ$ min = 18 + */ +#define CONFIG_AX25_FRAME_BUF_LEN 330 + + +/** + * Enable repeaters listing in AX25 frames. + * If enabled use 56 addtional bytes of RAM + * for each message received. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_AX25_RPT_LST 1 + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_battfs.h b/boards/arduino-mega/templates/kernel/cfg/cfg_battfs.h new file mode 100644 index 00000000..fb438a08 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_battfs.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for BattFS module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_BATTFS_H +#define CFG_BATTFS_H + + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define BATTFS_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define BATTFS_LOG_FORMAT LOG_FMT_VERBOSE + +/** + * Set to 1 to enable free page shuffling. + * This increase memories life but makes debugging + * more difficult due to its unrepeteable state. + * $WIZ$ type = "boolean" + */ +#define CONFIG_BATTFS_SHUFFLE_FREE_PAGES 0 + + +#endif /* BATTFS */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_context_switch.h b/boards/arduino-mega/templates/kernel/cfg/cfg_context_switch.h new file mode 100644 index 00000000..fe0b4f87 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_context_switch.h @@ -0,0 +1,71 @@ +/** + * \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. + * + * $WIZ$ type = "boolean" + * $WIZ$ module= "boolean" + * $WIZ$ conditional_deps = "ser" + */ +#define CONFIG_USE_HP_TIMER 1 + + +/** + * Use board led for benchmark. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_USE_LED 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/arduino-mega/templates/kernel/cfg/cfg_dataflash.h b/boards/arduino-mega/templates/kernel/cfg/cfg_dataflash.h new file mode 100644 index 00000000..8bd7828a --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_dataflash.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for data flash memory module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_DATAFLASH_H +#define CFG_DATAFLASH_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DATAFLASH_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DATAFLASH_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_DATAFLASH_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_dc_motor.h b/boards/arduino-mega/templates/kernel/cfg/cfg_dc_motor.h new file mode 100644 index 00000000..fd9bac73 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_dc_motor.h @@ -0,0 +1,111 @@ +/** + * \file + * + * + * \brief Configuration file for DC motor module. + * + * + * \author Daniele Basile + */ + +#ifndef CFG_DC_MOTOR_H +#define CFG_DC_MOTOR_H + +/** + * Number of the DC motors to manage. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_DC_MOTOR 4 + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define DC_MOTOR_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define DC_MOTOR_LOG_FORMAT LOG_FMT_VERBOSE + + +/** + * Min value of DC motor speed. + * \note Generally this value is the min value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_MIN_SPEED 0 + + +/** + * Max value of DC motor speed. + * \note Generally this value is the max value of the ADC conversion, + * if you use it. + * + * $WIZ$ type = "int" + * $WIZ$ max = 65535 + */ +#define CONFIG_DC_MOTOR_MAX_SPEED 65535 + + +/** + * Sampling period in millisecond. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_PERIOD 40 + +/** + * Amount of millisecond before to read sample. + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_SAMPLE_DELAY 2 + +/** + * This control set which mode the driver use to lock share + * resources when we use the preempitive kernel. + * If we set to 1 we use the semaphore module otherwise the + * driver disable the switch context every time we need to access + * to shared sources. + * + * $WIZ$ type = "int" + */ +#define CONFIG_DC_MOTOR_USE_SEM 1 + +#endif /* CFG_DC_MOTOR_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_debug.h b/boards/arduino-mega/templates/kernel/cfg/cfg_debug.h new file mode 100644 index 00000000..f7596ca1 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_debug.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for Debug module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_DEBUG_H +#define CFG_DEBUG_H + +/** + * Debug console port. + * $WIZ$ type = "int"; min = 0 + */ +#define CONFIG_KDEBUG_PORT 0 + +/** + * Baudrate for the debug console. + * $WIZ$ type = "int"; min = 300 + */ +#define CONFIG_KDEBUG_BAUDRATE 115200UL + +#endif /* CFG_DEBUG_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_fat.h b/boards/arduino-mega/templates/kernel/cfg/cfg_fat.h new file mode 100644 index 00000000..d418b783 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_fat.h @@ -0,0 +1,140 @@ +/** + * \file + * + * + * \brief Configuration file for Fat module. + * + * \version $Id$ + * + * \author Luca Ottaviano + * \author Francesco Sacchi + */ + +#ifndef CFG_FAT_H +#define CFG_FAT_H + +/** + * Use word alignment to access FAT structure. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_WORD_ACCESS 0 +#define _WORD_ACCESS CONFIG_FAT_WORD_ACCESS + +/** + * Enable read functions only. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_READONLY 0 +#define _FS_READONLY CONFIG_FAT_FS_READONLY + +/** + * Minimization level to remove some functions. + * $WIZ$ type = "int"; min = 0; max = 3 + */ +#define CONFIG_FAT_FS_MINIMIZE 0 +#define _FS_MINIMIZE CONFIG_FAT_FS_MINIMIZE + +/** + * If enabled, this reduces memory consumption 512 bytes each file object by using a shared buffer. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_FS_TINY 1 +#define _FS_TINY CONFIG_FAT_FS_TINY + +/** + * To enable string functions, set _USE_STRFUNC to 1 or 2. + * $WIZ$ type = "int" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_USE_STRFUNC 0 +#define _USE_STRFUNC CONFIG_FAT_USE_STRFUNC + +/** + * Enable f_mkfs function. Requires CONFIG_FAT_FS_READONLY = 0. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_MKFS 0 +#define _USE_MKFS (CONFIG_FAT_USE_MKFS && !CONFIG_FAT_FS_READONLY) + +/** + * Enable f_forward function. Requires CONFIG_FAT_FS_TINY. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_FORWARD 0 +#define _USE_FORWARD (CONFIG_FAT_USE_FORWARD && CONFIG_FAT_FS_TINY) + +/** + * Number of volumes (logical drives) to be used. + * $WIZ$ type = "int"; min = 1; max = 255 + */ +#define CONFIG_FAT_DRIVES 1 +#define _DRIVES CONFIG_FAT_DRIVES + +/** + * Maximum sector size to be handled. (512/1024/2048/4096). + * 512 for memory card and hard disk, 1024 for floppy disk, 2048 for MO disk + * $WIZ$ type = "int"; min = 512; max = 4096 + */ +#define CONFIG_FAT_MAX_SS 512 +#define _MAX_SS CONFIG_FAT_MAX_SS + +/** + * When _MULTI_PARTITION is set to 0, each volume is bound to the same physical + * drive number and can mount only first primaly partition. When it is set to 1, + * each volume is tied to the partitions listed in Drives[]. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_FAT_MULTI_PARTITION 0 +#define _MULTI_PARTITION CONFIG_FAT_MULTI_PARTITION + +/** + * Specifies the OEM code page to be used on the target system. + * $WIZ$ type = "int" + */ +#define CONFIG_FAT_CODE_PAGE 850 +#define _CODE_PAGE CONFIG_FAT_CODE_PAGE + +/** + * Support for long filenames. Enable only if you have a valid Microsoft license. + * $WIZ$ type = "boolean" + */ +#define CONFIG_FAT_USE_LFN 0 +#define _USE_LFN CONFIG_FAT_USE_LFN + +/** + * Maximum Long File Name length to handle. + * $WIZ$ type = "int"; min = 8; max = 255 + */ +#define CONFIG_FAT_MAX_LFN 255 +#define _MAX_LFN CONFIG_FAT_MAX_LFN + +#endif /* CFG_FAT_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_flash25.h b/boards/arduino-mega/templates/kernel/cfg/cfg_flash25.h new file mode 100644 index 00000000..f7ff219b --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_flash25.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for flash25 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_FLASH25_H +#define CFG_FLASH25_H + +/** + * Eeprom memory type. + * + *$WIZ$ type = "enum" + *$WIZ$ value_list = "flash25_list" + */ +#define CONFIG_FLASH25 FLASH25_AT25F2048 + +#endif /* CFG_FALSH25_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_formatwr.h b/boards/arduino-mega/templates/kernel/cfg/cfg_formatwr.h new file mode 100644 index 00000000..bac8aca7 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_formatwr.h @@ -0,0 +1,65 @@ +/** + * \file + * + * + * \brief Configuration file for formatted write module. + * + * \author Daniele Basile + */ + +#ifndef CFG_FORMATWR_H +#define CFG_FORMATWR_H + +/** + * printf()-style formatter configuration. + * $WIZ$ type = "enum"; value_list = "printf_list" + * + * \sa PRINTF_DISABLED + * \sa PRINTF_NOMODIFIERS + * \sa PRINTF_REDUCED + * \sa PRINTF_NOFLOAT + * \sa PRINTF_FULL + */ +#define CONFIG_PRINTF PRINTF_FULL + +/** + * Size of buffer to format "%" sequences in printf. + * + * Warning: no check on buffer size is done when formatting, be careful especially + * with big numbers and %f formatting. + * + * $WIZ$ type = "int" + * $WIZ$ min = 4 + */ +#define CONFIG_FRMWRI_BUFSIZE 134 + +#endif /* CFG_FORMATWR_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_gfx.h b/boards/arduino-mega/templates/kernel/cfg/cfg_gfx.h new file mode 100644 index 00000000..59dde04c --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_gfx.h @@ -0,0 +1,67 @@ +/** + * \file + * + * + * \brief Configuration file for GFX module. + * + * \author Daniele Basile + */ + +#ifndef CFG_GFX_H +#define CFG_GFX_H + +/** + * Enable line clipping algorithm. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_CLIPPING 1 + +/** + * Enable text rendering in bitmaps. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_TEXT 1 + +/** + * Enable virtual coordinate system. + * $WIZ$ type = "boolean" + */ +#define CONFIG_GFX_VCOORDS 1 + +/** + * Select bitmap pixel format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "bitmap_format" + */ +#define CONFIG_BITMAP_FMT BITMAP_FMT_PLANAR_V_LSB + +#endif /* CFG_GFX_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_hashtable.h b/boards/arduino-mega/templates/kernel/cfg/cfg_hashtable.h new file mode 100644 index 00000000..e4645f33 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_hashtable.h @@ -0,0 +1,51 @@ +/** + * \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/arduino-mega/templates/kernel/cfg/cfg_heap.h b/boards/arduino-mega/templates/kernel/cfg/cfg_heap.h new file mode 100644 index 00000000..dc4b1fa3 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_heap.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for heap module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_HEAP_H +#define CFG_HEAP_H + +/** + * Enable malloc/free like API. + * $WIZ$ type = "boolean" + */ +#define CONFIG_HEAP_MALLOC 1 + +#endif /* CFG_HEAP_H */ + + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_i2c.h b/boards/arduino-mega/templates/kernel/cfg/cfg_i2c.h new file mode 100644 index 00000000..7df0d097 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_i2c.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for I2C module. + * + * \author Daniele Basile + */ + +#ifndef CFG_I2C_H +#define CFG_I2C_H + +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ +#define CONFIG_I2C_FREQ 100000UL + +/** + * I2C start timeout. + * For how many milliseconds the i2c_start + * should try to get an ACK before + * returning error. + * + * $WIZ$ type = "int" + */ +#define CONFIG_I2C_START_TIMEOUT 100 + +/** + * I2C backend the driver should use. + * + * I2C_BACKEND_BUILTIN: Use (if present) the builtin i2c hardware. + * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. + * \see drv/i2c.h for more information. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "i2c_backend" + */ +#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define I2C_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define I2C_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_I2C_H */ + + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_i2s.h b/boards/arduino-mega/templates/kernel/cfg/cfg_i2s.h new file mode 100644 index 00000000..52fa8848 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_i2s.h @@ -0,0 +1,75 @@ +/** + * \file + * + * + * \brief Configuration file for I2S module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_I2S_H +#define CFG_I2S_H + +/** + * Length of each play buffer. + * + * $WIZ$ type = "int" + */ +#define CONFIG_PLAY_BUF_LEN 8192 + +/** + * Sampling frequency of the audio file. + * + * $WIZ$ type = "int" + * $WIZ$ min = 32000 + * $WIZ$ max = 192000 + */ +#define CONFIG_SAMPLE_FREQ 44100UL + +/** + * 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 + +#endif /* CFG_I2S_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_ini_reader.h b/boards/arduino-mega/templates/kernel/cfg/cfg_ini_reader.h new file mode 100644 index 00000000..702c78ee --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_ini_reader.h @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Configuration file for ini reader module. + * + * \version $Id$ + * + * \author Luca Ottaviano + */ + +#ifndef CFG_INI_READER_H +#define CFG_INI_READER_H + +/** + * Maximum ini file line length (chars). + * $WIZ$ type = "int"; min = 1 + */ +#define CONFIG_INI_MAX_LINE_LEN 64 + +#endif /* CFG_INI_READER_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_kbd.h b/boards/arduino-mega/templates/kernel/cfg/cfg_kbd.h new file mode 100644 index 00000000..116f3318 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_kbd.h @@ -0,0 +1,59 @@ +/** + * \file + * + * + * \brief Configuration file for keyboard module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_KBD_H +#define CFG_KBD_H + +/// Keyboard polling method. $WIZ$ supports = "False" +#define CONFIG_KBD_POLL KBD_POLL_SOFTINT + +/// Enable keyboard event delivery to observers. $WIZ$ type = "boolean" +#define CONFIG_KBD_OBSERVER 0 + +/// Enable key beeps. $WIZ$ type = "boolean" +#define CONFIG_KBD_BEEP 0 + +/// Enable long pression handler for keys. $WIZ$ type = "boolean" +#define CONFIG_KBD_LONGPRESS 0 + +/// Enable calling poor man's scheduler to be called inside kbd_peek. $WIZ$ type = "boolean" +#define CONFIG_KBD_SCHED 0 + +#endif /* CFG_KBD_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_keytag.h b/boards/arduino-mega/templates/kernel/cfg/cfg_keytag.h new file mode 100644 index 00000000..8bedadf6 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/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/arduino-mega/templates/kernel/cfg/cfg_kfile.h b/boards/arduino-mega/templates/kernel/cfg/cfg_kfile.h new file mode 100644 index 00000000..0ebed7b1 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_kfile.h @@ -0,0 +1,61 @@ +/** + * \file + * + * + * \brief Configuration file for KFile interface module. + * + * \author Daniele Basile + */ + +#ifndef CFG_KFILE_H +#define CFG_KFILE_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KFILE_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KFILE_LOG_FORMAT LOG_FMT_TERSE + +/** + * Enable the gets function with echo. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KFILE_GETS 0 + +#endif /* CFG_KFILE_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_lcd_32122a.h b/boards/arduino-mega/templates/kernel/cfg/cfg_lcd_32122a.h new file mode 100644 index 00000000..5a9b3ca7 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_lcd_32122a.h @@ -0,0 +1,63 @@ +/** + * \file + * + * + * \brief Displaytech 32122A LCD driver configuration file. + * + * \author Bernie Innocenti + * \author Stefano Fedrigo + * + */ +#ifndef CFG_LCD_32122A_H +#define CFG_LCD_32122A_H + +/** + * Enable soft interrupt to refresh the LCD. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_SOFTINT_REFRESH 0 + +/** + * Enable wait macro when display is busy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_WAIT 0 + +/** + * Display refresh time 32122a. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_LCD_REFRESH 100 + +#endif /* CFG_LCD_32122A_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_lcd_hd44.h b/boards/arduino-mega/templates/kernel/cfg/cfg_lcd_hd44.h new file mode 100644 index 00000000..78f1f20b --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_lcd_hd44.h @@ -0,0 +1,55 @@ +/** + * \file + * + * + * \brief Configuration file for lcd display module. + * + * \author Daniele Basile + */ + +#ifndef CFG_LCD_H +#define CFG_LCD_H + +/** + * Use 4 bit addressing mode. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_4BIT 0 + +/** + * Use a table to speed up LCD memory addressing. + * This will use about 100 bytes of RAM. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_ADDRESS_FAST 1 + +#endif /* CFG_LCD_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_lm75.h b/boards/arduino-mega/templates/kernel/cfg/cfg_lm75.h new file mode 100644 index 00000000..91b347ad --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_lm75.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for the LM75 sensor temperature. + * + * \author Daniele Basile + */ + +#ifndef CFG_LM75_H +#define CFG_LM75_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define LM75_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define LM75_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_AX25_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_md2.h b/boards/arduino-mega/templates/kernel/cfg/cfg_md2.h new file mode 100644 index 00000000..22ec7dbe --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_md2.h @@ -0,0 +1,54 @@ +/** + * \file + * + * + * \brief Configuration file for MD2 module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_MD2_H +#define CFG_MD2_H + +/** + * Size of block for MD2 algorithm. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_MD2_BLOCK_LEN 16 + +/// Use standard permutation in MD2 algorithm. $WIZ$ type = "boolean" +#define CONFIG_MD2_STD_PERM 0 + +#endif /* CFG_MD2_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_monitor.h b/boards/arduino-mega/templates/kernel/cfg/cfg_monitor.h new file mode 100644 index 00000000..6391b407 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_monitor.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel monitor configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_MONITOR_H +#define CFG_MONITOR_H + +/** + * Process monitor. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_MONITOR 1 + +#endif /* CFG_MONITOR_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_nmea.h b/boards/arduino-mega/templates/kernel/cfg/cfg_nmea.h new file mode 100644 index 00000000..9249a9af --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_nmea.h @@ -0,0 +1,85 @@ +/** + * \file + * + * + * \brief Configuration file for NMEA module. + * + * \author Daniele Basile + */ + +#ifndef CFG_NMEA_H +#define CFG_NMEA_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define NMEA_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define NMEA_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Maximum number of sentence parsers supported. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCES 8 + +/** + * Max length of a complete sentence. The standard says 82 bytes, but its probably + * better to go at least 128 since some units don't adhere to the 82 bytes + * especially for proprietary sentences. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_SENTENCE_LENGTH 255 + +/** + * Max tokens in one sentence. 24 is enough for any standard sentence. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NMEAP_MAX_TOKENS 24 + +#endif /* CFG_NMEA_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_parser.h b/boards/arduino-mega/templates/kernel/cfg/cfg_parser.h new file mode 100644 index 00000000..572b4a24 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/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/arduino-mega/templates/kernel/cfg/cfg_phase.h b/boards/arduino-mega/templates/kernel/cfg/cfg_phase.h new file mode 100644 index 00000000..57202930 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_phase.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for phase module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PHASE_H +#define CFG_PHASE_H + +/** + * Max value of the duty cycle on triac. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_DUTY 100 + +/** + * Max value of the triac power. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TRIAC_MAX_POWER 100 + +#endif /* CFG_PHASE_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_pocketbus.h b/boards/arduino-mega/templates/kernel/cfg/cfg_pocketbus.h new file mode 100644 index 00000000..aa0b090b --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_pocketbus.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for pocketbus module. + * + * \author Daniele Basile + */ + +#ifndef CFG_POCKETBUS_H +#define CFG_POCKETBUS_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define POCKETBUS_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define POCKETBUS_LOG_FORMAT LOG_FMT_TERSE + + +/** + *Buffer len for pockebus protocol. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_POCKETBUS_BUFLEN 128 + +/** + * Command replay timeout in milliseconds. + * $WIZ$ type = "int" + */ +#define CONFIG_POCKETBUS_CMD_REPLY_TIMEOUT 50 + +#endif /* CFG_POCKETBUS_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_proc.h b/boards/arduino-mega/templates/kernel/cfg/cfg_proc.h new file mode 100644 index 00000000..e779ebe4 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_proc.h @@ -0,0 +1,107 @@ +/** + * \file + * + * + * \brief Kernel configuration parameters + * + * \author Bernie Innocenti + */ + +#ifndef CFG_PROC_H +#define CFG_PROC_H + +/** + * Enable the multithreading kernel. + * + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN 1 + +/** + * Kernel interrupt supervisor. WARNING: Experimental, still incomplete! + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_KERN_IRQ 0 + +/** + * Preemptive process scheduling. + * + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "timer" + */ +#define CONFIG_KERN_PREEMPT 0 + +/** + * Time sharing quantum (a prime number prevents interference effects) [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_KERN_QUANTUM 11 + +/** + * Priority-based scheduling policy. + * $WIZ$ type = "boolean" + */ +#define CONFIG_KERN_PRI 1 + +/** + * Dynamic memory allocation for processes. + * $WIZ$ type = "boolean" + * $WIZ$ conditional_deps = "heap" + */ +#define CONFIG_KERN_HEAP 1 + +/** + * Size of the dynamic memory pool used by processes. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_KERN_HEAP_SIZE 1024L + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define KERN_LOG_LEVEL LOG_LVL_ERR + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PROC_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_pwm.h b/boards/arduino-mega/templates/kernel/cfg/cfg_pwm.h new file mode 100644 index 00000000..6627ee2d --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_pwm.h @@ -0,0 +1,57 @@ +/** + * \file + * + * + * \brief Configuration file for PWM module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_PWM_H +#define CFG_PWM_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define PWM_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define PWM_LOG_FORMAT LOG_FMT_VERBOSE + +#endif /* CFG_PWM_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_ramp.h b/boards/arduino-mega/templates/kernel/cfg/cfg_ramp.h new file mode 100644 index 00000000..1aeb8a89 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_ramp.h @@ -0,0 +1,116 @@ + /** + * \file + * + * + * \brief Configuration file Ramp algorithm module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_RAMP_H +#define CFG_RAMP_H + +/** + * Define whether the ramp will use floating point calculation within ramp_evaluate(). + * Otherwise, a less precise fixed point version will be used, which is faster on + * platforms which do no support floating point operations. + * + * \note Floating point operations will be always done within ramp_compute() to + * precalculate values, so there has to be at least a floating point emulation support. + * + * $WIZ$ type = "boolean" + */ +#define RAMP_USE_FLOATING_POINT 0 + + +#if !RAMP_USE_FLOATING_POINT + + /** + * Number of least-significant bits which are stripped away during ramp evaluation. + * This setting allows to specify larger ramps at the price of less precision. + * + * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks. + * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum + * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2 + * brings the maximum length to 13.4 secs, at the price of less precision. + * + * ramp_compute() will check that the length is below the maximum allowed through + * a runtime assertion. + * + * \note This macro is used only for the fixed-point version of the ramp. + * $WIZ$ type = "int" + * $WIZ$ min = 0 + * $WIZ$ max = 32 + */ + #define RAMP_CLOCK_SHIFT_PRECISION 2 +#endif + + +/** +* Negative pulse width for ramp. +* $WIZ$ type = "int" +* $WIZ$ min = 1 +*/ +#define RAMP_PULSE_WIDTH 50 + +/** + * Default ramp time (microsecs). + * $WIZ$ type = "int" + * $WIZ$ min = 1000 + */ +#define RAMP_DEF_TIME 6000000UL +/** + * Default ramp maxfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MAXFREQ 5000 +/** + * Default ramp minfreq (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define RAMP_DEF_MINFREQ 200 +/** + * Default ramp powerrun (deciampere). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERRUN 10 +/** + * Default ramp poweridle (Hz). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define RAMP_DEF_POWERIDLE 1 + +#endif /* CFG_RAMP_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_randpool.h b/boards/arduino-mega/templates/kernel/cfg/cfg_randpool.h new file mode 100644 index 00000000..83285984 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_randpool.h @@ -0,0 +1,56 @@ +/** + * \file + * + * + * \brief Configuration file for randpool module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_RANDPOOL_H +#define CFG_RANDPOOL_H + + +/** + * Define a size, in byte, of entropy pool. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_SIZE_ENTROPY_POOL 64 + +/// Enable timer in randpool algo. $WIZ$ type = "boolean" +#define CONFIG_RANDPOOL_TIMER 1 + +#endif /* CFG_RANDPOOL_H */ + + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_sem.h b/boards/arduino-mega/templates/kernel/cfg/cfg_sem.h new file mode 100644 index 00000000..86ed110d --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_sem.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel semaphores configuration parameters. + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SEM_H +#define CFG_SEM_H + +/** + * Re-entrant mutual exclusion primitives. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SEMAPHORES 1 + +#endif /* CFG_SEM_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_ser.h b/boards/arduino-mega/templates/kernel/cfg/cfg_ser.h new file mode 100644 index 00000000..91a10e0b --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_ser.h @@ -0,0 +1,222 @@ +/** + * \file + * + * + * \brief Configuration file for serial module. + * + * \author Daniele Basile + */ + +#ifndef CFG_SER_H +#define CFG_SER_H + +/** + * Example of setting for serial port and + * spi port. + * Edit these define for your project. + */ + +/** + * Size of the outbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + */ +#define CONFIG_UART0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2 or (at91 and not atmega8 and not atmega168 and not atmega32)" + */ +#define CONFIG_UART1_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 2 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lm3s or lpc2" + */ +#define CONFIG_UART2_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for port 3 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "lpc2" + */ +#define CONFIG_UART3_RXBUFSIZE 32 + + +/** + * Size of the outbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 0 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI0_RXBUFSIZE 32 + +/** + * Size of the outbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_TXBUFSIZE 32 + +/** + * Size of the inbound FIFO buffer for SPI port 1 [bytes]. + * $WIZ$ type = "int" + * $WIZ$ min = 2 + * $WIZ$ supports = "at91" + */ +#define CONFIG_SPI1_RXBUFSIZE 32 + +/** + * SPI data order. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_order_bit" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST + +/** + * SPI clock division factor. + * $WIZ$ type = "int" + * $WIZ$ supports = "avr" + */ +#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" + */ +#define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW + +/** + * SPI clock phase you can choose sample on first edge or + * sample on second clock edge. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ser_spi_phase" + * $WIZ$ supports = "avr" + */ +#define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE + +/** + * Default transmit timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_TXTIMEOUT -1 + +/** + * Default receive timeout (ms). Set to -1 to disable timeout support. + * $WIZ$ type = "int" + * $WIZ$ min = -1 + */ +#define CONFIG_SER_RXTIMEOUT -1 + +/** + * Use RTS/CTS handshake. + * $WIZ$ type = "boolean" + * $WIZ$ supports = "False" + */ +#define CONFIG_SER_HWHANDSHAKE 0 + +/** + * Default baudrate for all serial ports (set to 0 to disable). + * $WIZ$ type = "int" + * $WIZ$ min = 0 + */ +#define CONFIG_SER_DEFBAUDRATE 0UL + +/// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean" +#define CONFIG_SER_STROBE 0 + +#endif /* CFG_SER_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_signal.h b/boards/arduino-mega/templates/kernel/cfg/cfg_signal.h new file mode 100644 index 00000000..ed85119b --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_signal.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Kernel signals configuration parameters + * + * \version $Id$ + * \author Bernie Innocenti + */ + +#ifndef CFG_SIGNAL_H +#define CFG_SIGNAL_H + +/** + * Inter-process signals. + * $WIZ$ type = "autoenabled" + */ +#define CONFIG_KERN_SIGNALS 1 + +#endif /* CFG_SIGNAL_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_spi_bitbang.h b/boards/arduino-mega/templates/kernel/cfg/cfg_spi_bitbang.h new file mode 100644 index 00000000..6e9a96bc --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_spi_bitbang.h @@ -0,0 +1,52 @@ +/** + * \file + * + * + * \brief Configuration file for SPI bitbang module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_SPI_BITBANG_H +#define CFG_SPI_BITBANG_H + +/** + * Set data order for emulated SPI. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "ordet_bit_list" + */ +#define CONFIG_SPI_DATAORDER SPI_LSB_FIRST + +#endif /* CFG_SPI_BITBANG_H */ + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_stepper.h b/boards/arduino-mega/templates/kernel/cfg/cfg_stepper.h new file mode 100644 index 00000000..e086065c --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_stepper.h @@ -0,0 +1,70 @@ +/** + * \file + * + * + * \brief Configuration file for stepper motor module. + * + * \version $Id$ + * \author Daniele Basile + */ + +#ifndef CFG_STEPPER_H +#define CFG_STEPPER_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define STEPPER_LOG_LEVEL LOG_LVL_INFO + +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define STEPPER_LOG_FORMAT LOG_FMT_TERSE + +/** + * Max number of the stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_NUM_STEPPER_MOTORS 6 + +/** + * Max number of the timer usable on target to drive stepper motor. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_TC_STEPPER_MAX_NUM 6 + +#endif /* CFG_STEPPER_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_tas5706a.h b/boards/arduino-mega/templates/kernel/cfg/cfg_tas5706a.h new file mode 100644 index 00000000..e1112c0f --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_tas5706a.h @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Configuration file for the TAS5706A module. + * + * \version $Id$ + * \author Luca Ottaviano + */ + +#ifndef CFG_TAS5706A_H +#define CFG_TAS5706A_H + +/** + * Maximum output volume for TAS chip [dB]. + * + * $WIZ$ type = "int" + * $WIZ$ min = -100 + * $WIZ$ max = 24 + */ +#define CONFIG_TAS_MAX_VOL -39 + +#endif /* CFG_TAS5706A_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_thermo.h b/boards/arduino-mega/templates/kernel/cfg/cfg_thermo.h new file mode 100644 index 00000000..2734f899 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_thermo.h @@ -0,0 +1,71 @@ +/** + * \file + * + * + * \brief Configuration file for thermo module. + * + * \author Daniele Basile + */ + +#ifndef CFG_THERMO_H +#define CFG_THERMO_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_THERMO_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_THERMO_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Interval at which thermo control is performed [ms]. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_INTERVAL_MS 100 + +/** + * Number of different samples we interpolate over to get the hifi temperature. + * + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_THERMO_HIFI_NUM_SAMPLES 10 + +#endif /* CFG_THERMO_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_timer.h b/boards/arduino-mega/templates/kernel/cfg/cfg_timer.h new file mode 100644 index 00000000..1cff78b8 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_timer.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for timer module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_TIMER_H +#define CFG_TIMER_H + +/** + * Hardware timer selection for drv/timer.c. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "timer_select" + */ +#define CONFIG_TIMER TIMER_DEFAULT + +/** + * Debug timer interrupt using a strobe pin. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_STROBE 0 + +/** + * Enable asynchronous timers. + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_EVENTS 1 + +/** + * Support hi-res timer_usleep(). + * $WIZ$ type = "boolean" + */ +#define CONFIG_TIMER_UDELAY 1 + +#endif /* CFG_TIMER_H */ diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_wdt.h b/boards/arduino-mega/templates/kernel/cfg/cfg_wdt.h new file mode 100644 index 00000000..9f4caae9 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_wdt.h @@ -0,0 +1,48 @@ +/** + * \file + * + * + * \brief Configuration file for watchdog module. + * + * \version $Id$ + * + * \author Daniele Basile + */ + +#ifndef CFG_WDT_H +#define CFG_WDT_H + +/// Enable watchdog timer. $WIZ$ type = "autoenabled" +#define CONFIG_WATCHDOG 0 + +#endif /* CFG_WDT_H */ + + diff --git a/boards/arduino-mega/templates/kernel/cfg/cfg_xmodem.h b/boards/arduino-mega/templates/kernel/cfg/cfg_xmodem.h new file mode 100644 index 00000000..38db7359 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/cfg/cfg_xmodem.h @@ -0,0 +1,79 @@ +/** + * \file + * + * + * \brief Configuration file for xmodem module. + * + * \author Daniele Basile + */ + +#ifndef CFG_XMODEM_H +#define CFG_XMODEM_H + +/** + * Module logging level. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_XMODEM_LOG_LEVEL LOG_LVL_ERR +/** + * Module logging format. + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_XMODEM_LOG_FORMAT LOG_FMT_TERSE + + +/// Enable Rx. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_RECV 1 + +/// Enable TX. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_SEND 1 + +/// Allow a Rx/Tx of 1Kbyte block. $WIZ$ type = "boolean" +#define CONFIG_XMODEM_1KCRC 1 + +/** + * Max retries before giving up. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXRETRIES 15 + +/** + * Max retries before switching to BCC. + * $WIZ$ type = "int" + * $WIZ$ min = 1 + */ +#define CONFIG_XMODEM_MAXCRCRETRIES 7 + +#endif /* CFG_XMODEM_H */ + diff --git a/boards/arduino-mega/templates/kernel/kernel.mk b/boards/arduino-mega/templates/kernel/kernel.mk new file mode 100644 index 00000000..487247c1 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/kernel.mk @@ -0,0 +1,90 @@ +# +# Wizard autogenerated makefile. +# DO NOT EDIT, use the kernel_user.mk file instead. +# + +# Constants automatically defined by the selected modules +kernel_DEBUG = 1 + +# Our target application +TRG += kernel + +kernel_PREFIX = "avr-" + +kernel_SUFFIX = "" + +kernel_SRC_PATH = boards/arduino/templates/kernel + +kernel_HW_PATH = boards/arduino + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_USER_CSRC INSTEAD! +kernel_WIZARD_CSRC = \ + bertos/kern/kfile.c \ + bertos/kern/signal.c \ + bertos/cpu/avr/drv/timer_avr.c \ + bertos/kern/sem.c \ + bertos/mware/formatwr.c \ + bertos/struct/heap.c \ + bertos/kern/monitor.c \ + bertos/drv/timer.c \ + bertos/mware/event.c \ + bertos/kern/proc.c \ + bertos/cpu/avr/drv/ser_avr.c \ + bertos/drv/ser.c \ + bertos/mware/hex.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_USER_PCSRC INSTEAD! +kernel_WIZARD_PCSRC = \ + bertos/mware/formatwr.c \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_USER_CPPASRC INSTEAD! +kernel_WIZARD_CPPASRC = \ + bertos/cpu/avr/hw/switch_ctx_avr.S \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_USER_CXXSRC INSTEAD! +kernel_WIZARD_CXXSRC = \ + \ + # + +# Files automatically generated by the wizard. DO NOT EDIT, USE kernel_USER_ASRC INSTEAD! +kernel_WIZARD_ASRC = \ + \ + # + +kernel_CPPFLAGS = -D'CPU_FREQ=(16000000UL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$(kernel_HW_PATH) -I$(kernel_SRC_PATH) $(kernel_CPU_CPPFLAGS) $(kernel_USER_CPPFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_LDFLAGS = $(kernel_CPU_LDFLAGS) $(kernel_WIZARD_LDFLAGS) $(kernel_USER_LDFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_CPPAFLAGS = $(kernel_CPU_CPPAFLAGS) $(kernel_WIZARD_CPPAFLAGS) $(kernel_USER_CPPAFLAGS) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_CSRC = $(kernel_CPU_CSRC) $(kernel_WIZARD_CSRC) $(kernel_USER_CSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_PCSRC = $(kernel_CPU_PCSRC) $(kernel_WIZARD_PCSRC) $(kernel_USER_PCSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_CPPASRC = $(kernel_CPU_CPPASRC) $(kernel_WIZARD_CPPASRC) $(kernel_USER_CPPASRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_CXXSRC = $(kernel_CPU_CXXSRC) $(kernel_WIZARD_CXXSRC) $(kernel_USER_CXXSRC) + +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_ASRC = $(kernel_CPU_ASRC) $(kernel_WIZARD_ASRC) $(kernel_USER_ASRC) + +# CPU specific flags and options, defined in the CPU definition files. +# Automatically generated by the wizard. PLEASE DO NOT EDIT! +kernel_MCU = atmega328p +kernel_CPU_CPPFLAGS = -Os -Ibertos/cpu/avr/ +kernel_PROGRAMMER_CPU = atmega328p +kernel_STOPFLASH_SCRIPT = bertos/prg_scripts/avr/stopflash.sh +kernel_STOPDEBUG_SCRIPT = bertos/prg_scripts/none.sh +kernel_DEBUG_SCRIPT = bertos/prg_scripts/nodebug.sh +kernel_FLASH_SCRIPT = bertos/prg_scripts/avr/flash.sh + +include $(kernel_SRC_PATH)/kernel_user.mk diff --git a/boards/arduino-mega/templates/kernel/kernel_user.mk b/boards/arduino-mega/templates/kernel/kernel_user.mk new file mode 100644 index 00000000..6dfb4d8c --- /dev/null +++ b/boards/arduino-mega/templates/kernel/kernel_user.mk @@ -0,0 +1,43 @@ +# +# User makefile. +# Edit this file to change compiler options and related stuff. +# + +# Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help +kernel_PROGRAMMER_TYPE = none +kernel_PROGRAMMER_PORT = none + +# Files included by the user. +kernel_USER_CSRC = \ + $(kernel_SRC_PATH)/main.c \ + # + +# Files included by the user. +kernel_USER_PCSRC = \ + # + +# Files included by the user. +kernel_USER_CPPASRC = \ + # + +# Files included by the user. +kernel_USER_CXXSRC = \ + # + +# Files included by the user. +kernel_USER_ASRC = \ + # + +# Flags included by the user. +kernel_USER_LDFLAGS = \ + # + +# Flags included by the user. +kernel_USER_CPPAFLAGS = \ + # + +# Flags included by the user. +kernel_USER_CPPFLAGS = \ + -fno-strict-aliasing \ + -fwrapv \ + # diff --git a/boards/arduino-mega/templates/kernel/main.c b/boards/arduino-mega/templates/kernel/main.c new file mode 100644 index 00000000..663386f4 --- /dev/null +++ b/boards/arduino-mega/templates/kernel/main.c @@ -0,0 +1,122 @@ +/** + * \file + * + * + * \author Andrea Righi + * + * \brief Kernel project. + * + * This is a minimalist kernel project: it just initializes the hardware and + * creates an independent process to blink an LED, while the main loop + * continues to monitor the stack utilization of all the processes. + */ + +#include "hw/hw_led.h" + +#include + +#include +#include + +#include +#include + +#include +#include + +static Serial out; + +static void init(void) +{ + /* Enable all the interrupts */ + IRQ_ENABLE; + + /* Initialize debugging module (allow kprintf(), etc.) */ + kdbg_init(); + /* Initialize system timer */ + timer_init(); + /* + * XXX: Arduino has a single UART port that was previously + * initialized for debugging purpose. + * In order to activate the serial driver you should disable + * the debugging module. + */ +#if 0 + /* Initialize UART0 */ + ser_init(&out, SER_UART0); + /* Configure UART0 to work at 115.200 bps */ + ser_setbaudrate(&out, 115200); +#else + (void)out; +#endif + /* Initialize LED driver */ + LED_INIT(); + + /* + * Kernel initialization: processes (allow to create and dispatch + * processes using proc_new()). + */ + proc_init(); +} + +static void NORETURN led_process(void) +{ + int i; + + /* Periodically blink the led (toggle each 100 ms) */ + for (i = 0; ; i = !i) + { + if (i) + LED_ON(); + else + LED_OFF(); + timer_delay(100); + } +} + +int main(void) +{ + /* Hardware initialization */ + init(); + + /* Create a new child process */ + proc_new(led_process, NULL, KERN_MINSTACKSIZE * 2, NULL); + + /* + * The main process is kept to periodically report the stack + * utilization of all the processes (1 probe per second). + */ + while (1) + { + monitor_report(); + timer_delay(1000); + } +} diff --git a/boards/arduino-mega/templates/kernel/project.bertos b/boards/arduino-mega/templates/kernel/project.bertos new file mode 100644 index 00000000..e0b812be --- /dev/null +++ b/boards/arduino-mega/templates/kernel/project.bertos @@ -0,0 +1,85 @@ +(dp0 +S'BERTOS_PATH' +p1 +S'../../../..' +p2 +sS'SELECTED_FREQ' +p3 +V16000000 +p4 +sS'WIZARD_VERSION' +p5 +I3 +sS'PROJECT_NAME' +p6 +Vkernel +p7 +sS'TOOLCHAIN' +p8 +(dp9 +S'target' +p10 +Vavr +p11 +sS'thread' +p12 +Vsingle +p13 +sS'configured' +p14 +V../configure --prefix=/usr/local/avr-4.3.2/ --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 +p15 +sS'version' +p16 +V4.3.2 +p17 +sS'build' +p18 +VGCC +p19 +sS'path' +p20 +V/opt/avr-4.3.2/bin/avr-gcc +p21 +ssS'ENABLED_MODULES' +p22 +(lp23 +S'ser' +p24 +aS'kernel' +p25 +aS'semaphores' +p26 +aS'monitor' +p27 +aS'formatwr' +p28 +aS'debug' +p29 +aS'kfile' +p30 +aS'heap' +p31 +aS'signal' +p32 +aS'timer' +p33 +asS'CPU_NAME' +p34 +VATmega1280 +p35 +sS'PROJECT_HW_PATH' +p36 +S'../..' +p37 +sS'PROJECT_SRC_PATH' +p38 +S'.' +p39 +sS'PRESET' +p40 +I01 +sS'OUTPUT' +p41 +(lp42 +s. -- 2.25.1