Subversion Repositories svn.mios32

Rev

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

Rev Author Line No. Line
61 tk 1
// $Id: mios32_config.h 1071 2010-09-21 23:12:32Z 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
 
229 tk 13
 
14
// The boot message which is print during startup and returned on a SysEx query
496 tk 15
#define MIOS32_LCD_BOOT_MSG_DELAY 0 // we delay the boot and print a message inside the app
728 tk 16
//                                <---------------------->
1068 tk 17
#define MIOS32_LCD_BOOT_MSG_LINE1 "MIDIbox SEQ V4.0Beta26"
944 tk 18
#define MIOS32_LCD_BOOT_MSG_LINE2 "(C) 2010 T. Klose"
229 tk 19
 
287 tk 20
// USB settings
21
#define MIOS32_USB_PRODUCT_STR  "MIDIbox SEQ V4"
22
#define MIOS32_USB_MIDI_NUM_PORTS 4
229 tk 23
 
24
 
308 tk 25
// port used for debugging via MIDI
26
//#define MIOS32_MIDI_DEBUG_PORT USB0
61 tk 27
 
343 tk 28
// function used to output debug messages (must be printf compatible!)
29
#define DEBUG_MSG MIOS32_MIDI_SendDebugMessage
30
 
31
 
248 tk 32
// Stack size for FreeRTOS tasks as defined by the programming model
33
// Note that each task maintains it's own stack!
34
// If you want to define a different stack size for your application tasks
35
// (-> xTaskCreate() function), keep in mind that it has to be divided by 4,
36
// since the stack width of ARM is 32bit.
37
// The FreeRTOS define "configMINIMAL_STACK_SIZE" is (MIOS32_MINIMAL_STACK_SIZE/4)
38
// it can be used in applications as well, e.g.
39
// xTaskCreate(TASK_Period1mS, (signed portCHAR *)"Period1mS", configMINIMAL_STACK_SIZE, NULL, PRIORITY_TASK_PERIOD1MS, NULL);
40
#define MIOS32_MINIMAL_STACK_SIZE 1024
134 tk 41
 
248 tk 42
// reserved memory for FreeRTOS pvPortMalloc function
1049 tk 43
#define MIOS32_HEAP_SIZE 20*1024
248 tk 44
 
45
 
736 tk 46
// optional performance measuring
737 tk 47
// see documentation under http://www.midibox.org/mios32/manual/group___f_r_e_e_r_t_o_s___u_t_i_l_s.html
736 tk 48
#define configGENERATE_RUN_TIME_STATS           0
49
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS  FREERTOS_UTILS_PerfCounterInit
50
#define portGET_RUN_TIME_COUNTER_VALUE          FREERTOS_UTILS_PerfCounterGet
51
 
52
 
702 tk 53
// maximum idle counter value to be expected
54
#define MAX_IDLE_CTR 223000
55
 
56
 
272 tk 57
// memory alloccation method:
58
// 0: internal static allocation with one byte for each flag
59
// 1: internal static allocation with 8bit flags
60
// 2: internal static allocation with 16bit flags
61
// 3: internal static allocation with 32bit flags
62
// 4: FreeRTOS based pvPortMalloc
63
// 5: malloc provided by library
64
#define SEQ_MIDI_OUT_MALLOC_METHOD 3
65
 
66
// max number of scheduled events which will allocate memory
67
// each event allocates 12 bytes
68
// MAX_EVENTS must be a power of two! (e.g. 64, 128, 256, 512, ...)
345 tk 69
#define SEQ_MIDI_OUT_MAX_EVENTS 512
272 tk 70
 
71
// enable seq_midi_out_max_allocated and seq_midi_out_dropouts
72
#define SEQ_MIDI_OUT_MALLOC_ANALYSIS 1
73
 
74
 
1071 tk 75
// enable third UART
76
#define MIOS32_UART_NUM 3
178 tk 77
 
1071 tk 78
 
652 tk 79
// configure IIC_MIDI
80
#define MIOS32_IIC_MIDI_NUM 4
81
// all interfaces are "OUT only"
82
#define MIOS32_IIC_MIDI0_ENABLED    1
83
#define MIOS32_IIC_MIDI1_ENABLED    1
84
#define MIOS32_IIC_MIDI2_ENABLED    1
85
#define MIOS32_IIC_MIDI3_ENABLED    1
86
#define MIOS32_IIC_MIDI4_ENABLED    1
87
#define MIOS32_IIC_MIDI5_ENABLED    1
88
#define MIOS32_IIC_MIDI6_ENABLED    1
89
#define MIOS32_IIC_MIDI7_ENABLED    1
90
 
91
 
524 tk 92
// configure BLM driver
93
#define BLM_DOUT_L1_SR  255 // dummy, will be changed in seq_file_hw.c
94
#define BLM_DOUT_R1_SR  255 // dummy, will be changed in seq_file_hw.c
95
#define BLM_DOUT_CATHODES_SR1   255 // dummy, will be changed in seq_file_hw.c
96
#define BLM_DOUT_CATHODES_SR2   255 // dummy, will be changed in seq_file_hw.c
97
#define BLM_CATHODES_INV_MASK   0x00
98
#define BLM_DOUT_L2_SR  255 // dummy, will be changed in seq_file_hw.c
99
#define BLM_DOUT_R2_SR  255 // dummy, will be changed in seq_file_hw.c
100
#define BLM_DOUT_L3_SR  0 // not used
101
#define BLM_DOUT_R3_SR  0 // not used
102
#define BLM_DIN_L_SR    255 // dummy, will be changed in seq_file_hw.c
103
#define BLM_DIN_R_SR    255 // dummy, will be changed in seq_file_hw.c
104
#define BLM_NUM_COLOURS 2
105
#define BLM_NUM_ROWS    8
106
#define BLM_DEBOUNCE_MODE 1
107
 
108
 
464 tk 109
// configure BLM_X driver
110
#define BLM_X_NUM_ROWS            8
111
#define BLM_X_BTN_NUM_COLS        8
112
#define BLM_X_LED_NUM_COLS        8
113
#define BLM_X_LED_NUM_COLORS      1
513 tk 114
#define BLM_X_ROWSEL_DOUT_SR      255 // dummy, will be changed in seq_file_hw.c
115
#define BLM_X_LED_FIRST_DOUT_SR   255 // dummy, will be changed in seq_file_hw.c
116
#define BLM_X_BTN_FIRST_DIN_SR    255 // dummy, will be changed in seq_file_hw.c
117
#define BLM_X_ROWSEL_INV_MASK     0   // dummy, will be changed in seq_file_hw.c
472 tk 118
#define BLM_X_DEBOUNCE_MODE       0
134 tk 119
 
821 tk 120
 
121
// optional for Francois' 4 * 20x2 LCD configuration
122
// currently this option cannot be enabled in the MBSEQ_HW.V4 file - this will be possible later
123
#if 0
124
#define LCD_NUM_DEVICES          4
125
#define LCD_COLUMNS_PER_DEVICE  20
126
#define MIOS32_BOARD_LCD_E3_PORT GPIOB       // J15C.A10
127
#define MIOS32_BOARD_LCD_E3_PIN  GPIO_Pin_0
128
 
129
#define MIOS32_BOARD_LCD_E4_PORT GPIOB       // J15C.A11
130
#define MIOS32_BOARD_LCD_E4_PIN  GPIO_Pin_1
131
#endif
132
 
1049 tk 133
 
134
// ENC28J60 settings
135
#define MIOS32_ENC28J60_FULL_DUPLEX 1
136
#define MIOS32_ENC28J60_MAX_FRAME_SIZE 1504
137
 
138
// Mutex for J16 access
139
extern void TASKS_J16SemaphoreTake(void);
140
extern void TASKS_J16SemaphoreGive(void);
141
#define MIOS32_SDCARD_MUTEX_TAKE   { TASKS_J16SemaphoreTake(); }
142
#define MIOS32_SDCARD_MUTEX_GIVE   { TASKS_J16SemaphoreGive(); }
143
#define MIOS32_ENC28J60_MUTEX_TAKE { TASKS_J16SemaphoreTake(); }
144
#define MIOS32_ENC28J60_MUTEX_GIVE { TASKS_J16SemaphoreGive(); }
145
 
146
// a unique MAC address in your network (6 bytes are required)
147
// If all bytes are 0, the serial number of STM32 will be taken instead,
148
// which should be unique in your private network.
149
#define MIOS32_ENC28J60_MY_MAC_ADDR1 0
150
#define MIOS32_ENC28J60_MY_MAC_ADDR2 0
151
#define MIOS32_ENC28J60_MY_MAC_ADDR3 0
152
#define MIOS32_ENC28J60_MY_MAC_ADDR4 0
153
#define MIOS32_ENC28J60_MY_MAC_ADDR5 0
154
#define MIOS32_ENC28J60_MY_MAC_ADDR6 0
155
 
156
// Ethernet configuration:
157
// (can be changed during runtime and stored in EEPROM)
158
 
159
//                      192        .  168        .    1       .  120
160
# define MY_IP_ADDRESS (192 << 24) | (168 << 16) | (  1 << 8) | (120 << 0)
161
//                      255        .  255        .  255       .    0
162
# define MY_NETMASK    (255 << 24) | (255 << 16) | (255 << 8) | (  0 << 0)
163
//                      192        .  168        .    1       .    1
164
# define MY_GATEWAY    (192 << 24) | (168 << 16) | (  1 << 8) | (  1 << 0)
165
 
166
 
167
//                     192        .  168        .    1       .  101
168
#define OSC_REMOTE_IP (192 << 24) | (168 << 16) | (  1 << 8) | (101 << 0)
169
 
170
#define OSC_REMOTE_PORT 10001
171
#define OSC_LOCAL_PORT  10000
172
 
61 tk 173
#endif /* _MIOS32_CONFIG_H */