Subversion Repositories svn.mios32

Rev

Rev 1937 | Rev 2406 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1298 tk 1
// $Id: mios32_config.h 1960 2014-02-09 20:21:24Z tk $
2
/*
3
 * Local MIOS32 configuration file
4
 *
5
 * this file allows to disable (or re-configure) default functions of MIOS32
6
 * available switches are listed in $MIOS32_PATH/modules/mios32/MIOS32_CONFIG.txt
7
 *
8
 */
9
 
10
#ifndef _MIOS32_CONFIG_H
11
#define _MIOS32_CONFIG_H
12
 
13
// The boot message which is print during startup and returned on a SysEx query
1394 tk 14
#define MIOS32_LCD_BOOT_MSG_LINE1 "MIDIboxCV V2.000"
1937 tk 15
#define MIOS32_LCD_BOOT_MSG_LINE2 "(C) 2014 T.Klose"
1298 tk 16
 
17
// define a unique VID/PID for this application
1299 tk 18
#define MIOS32_USB_PRODUCT_STR  "MIDIboxCV"
1298 tk 19
 
20
// only enable a single USB port by default to avoid USB issue under Win7 64bit
21
#define MIOS32_USB_MIDI_NUM_PORTS 1
22
 
23
 
24
#define DEBUG_MSG MIOS32_MIDI_SendDebugMessage
25
 
1905 tk 26
// reserved memory for FreeRTOS pvPortMalloc function
1906 tk 27
#define MIOS32_MINIMAL_STACK_SIZE 1500
1905 tk 28
#define MIOS32_HEAP_SIZE 13*1024
29
 
30
 
1901 tk 31
// use 16 DOUT pages
32
#define MIOS32_SRIO_NUM_DOUT_PAGES 16
33
 
34
// disables the default SRIO scan routine in programming_models/traditional/main.c
35
// allows to implement an own handler
36
// -> see app.c, APP_SRIO_*
37
#define MIOS32_DONT_SERVICE_SRIO_SCAN 1
38
 
39
// increased number of SRs
40
// (we are not using so many SRs... the intention is to enlarge the SRIO update cycle
41
// so that an update takes place ca. each 250 uS)
42
#define MIOS32_SRIO_NUM_SR 32
43
 
44
 
1905 tk 45
// for LPC17: simplify allocation of large arrays
46
#if defined(MIOS32_FAMILY_LPC17xx)
47
# define AHB_SECTION __attribute__ ((section (".bss_ahb")))
48
#else
49
# define AHB_SECTION
50
#endif
51
 
52
 
1960 tk 53
// AIN configuration:
54
 
55
// bit mask to enable channels
56
//
57
// Pin mapping on MBHP_CORE_STM32 module:
58
//   15       14      13     12     11     10      9      8   
59
// J16.SO  J16.SI  J16.SC J16.RC J5C.A11 J5C.A10 J5C.A9 J5C.A8
60
//   7        6       5      4      3      2      1       0
61
// J5B.A7  J5B.A6  J5B.A5 J5B.A4 J5A.A3 J5A.A2 J5A.A1  J5A.A0
62
//
63
// Examples:
64
//   mask 0x000f will enable all J5A channels
65
//   mask 0x00f0 will enable all J5B channels
66
//   mask 0x0f00 will enable all J5C channels
67
//   mask 0x0fff will enable all J5A/B/C channels
68
// (all channels are disabled by default)
69
#if defined(MIOS32_FAMILY_STM32F10x) || defined(MIOS32_FAMILY_LPC17xx)
70
// reduced to 6 pins due to conflict with MIDI OUT3/IN3
71
#define MIOS32_AIN_CHANNEL_MASK 0x003f
72
#else
73
#define MIOS32_AIN_CHANNEL_MASK 0x00ff
74
#endif
75
 
76
// define the deadband (min. difference to report a change to the application hook)
77
// typically set to (2^(12-desired_resolution)-1)
78
// e.g. for a resolution of 7 bit, it's set to (2^(12-7)-1) = (2^5 - 1) = 31
79
#define MIOS32_AIN_DEADBAND 3
80
 
81
// Normally the ADC channels are converted each mS from the programming
82
// model (main.c) - optionally this can be skipped with
83
// #define MIOS32_DONT_SERVICE_AIN 1 in mios32_config.h
84
// 
85
// In this case, the MIOS32_AIN_StartConversions() function has to be called
86
// periodically from the application (e.g. from a timer), and conversion values
87
// can be retrieved with MIOS32_AIN_PinGet()
88
#define MIOS32_DONT_SERVICE_AIN 1
89
 
1298 tk 90
#endif /* _MIOS32_CONFIG_H */