summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vs/floppyMusic/v14/.atsuobin63488 -> 67584 bytes
-rw-r--r--floppyMusic/floppyMusic.cproj73
-rw-r--r--floppyMusic/midi.c13
-rw-r--r--floppyMusic/midi.h2
4 files changed, 52 insertions, 36 deletions
diff --git a/.vs/floppyMusic/v14/.atsuo b/.vs/floppyMusic/v14/.atsuo
index f99dcac..faf3960 100644
--- a/.vs/floppyMusic/v14/.atsuo
+++ b/.vs/floppyMusic/v14/.atsuo
Binary files differ
diff --git a/floppyMusic/floppyMusic.cproj b/floppyMusic/floppyMusic.cproj
index 34cd8d5..60dd65f 100644
--- a/floppyMusic/floppyMusic.cproj
+++ b/floppyMusic/floppyMusic.cproj
@@ -120,43 +120,44 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGcc>
- <avrgcc.common.Device>-mmcu=atmega32 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega32"</avrgcc.common.Device>
- <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
- <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
- <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
- <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
- <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
- <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
- <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
- <avrgcc.compiler.symbols.DefSymbols>
- <ListValues>
- <Value>DEBUG</Value>
- <Value>F_CPU=16000000UL</Value>
- </ListValues>
- </avrgcc.compiler.symbols.DefSymbols>
- <avrgcc.compiler.directories.IncludePaths>
- <ListValues>
- <Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
- </ListValues>
- </avrgcc.compiler.directories.IncludePaths>
- <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
- <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
- <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
- <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
- <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
- <avrgcc.linker.libraries.Libraries>
- <ListValues>
- <Value>libm</Value>
- </ListValues>
- </avrgcc.linker.libraries.Libraries>
- <avrgcc.assembler.general.IncludePaths>
- <ListValues>
- <Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
- </ListValues>
- </avrgcc.assembler.general.IncludePaths>
- <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-</AvrGcc>
+ <avrgcc.common.Device>-mmcu=atmega32 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega32"</avrgcc.common.Device>
+ <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
+ <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
+ <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
+ <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
+ <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
+ <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
+ <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
+ <avrgcc.compiler.symbols.DefSymbols>
+ <ListValues>
+ <Value>DEBUG</Value>
+ <Value>F_CPU=16000000UL</Value>
+ </ListValues>
+ </avrgcc.compiler.symbols.DefSymbols>
+ <avrgcc.compiler.directories.IncludePaths>
+ <ListValues>
+ <Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
+ </ListValues>
+ </avrgcc.compiler.directories.IncludePaths>
+ <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
+ <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
+ <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
+ <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
+ <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
+ <avrgcc.linker.libraries.Libraries>
+ <ListValues>
+ <Value>libm</Value>
+ </ListValues>
+ </avrgcc.linker.libraries.Libraries>
+ <avrgcc.assembler.general.IncludePaths>
+ <ListValues>
+ <Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include</Value>
+ </ListValues>
+ </avrgcc.assembler.general.IncludePaths>
+ <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
+ </AvrGcc>
</ToolchainSettings>
+ <PostBuildEvent>copy "$(MSBuildProjectDirectory)\Debug\$(AssemblyName).hex" "$(USERPROFILE)\Documents\$(AssemblyName).hex"</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Compile Include="floppy.c">
diff --git a/floppyMusic/midi.c b/floppyMusic/midi.c
index 8e760a8..62c1b1d 100644
--- a/floppyMusic/midi.c
+++ b/floppyMusic/midi.c
@@ -31,6 +31,8 @@ void midi_setup()
UCSRB = (1<<RXEN) | (1<<TXEN) | (1<<RXCIE); //Enable Tx, Rx and Rx Interrupt
UCSRC = (1<<URSEL) | (1<<USBS) | (3<<UCSZ0);
+ midi_uart_outs("MIDI set up successfully");
+
}
void midi_process()
@@ -52,6 +54,8 @@ void midi_process()
midi_command(command, note, velocity);
+ //midi_uart_outs("\nCommand received:\n");
+ midi_uart_out(command);
}
void midi_command(char _cmd, char _note, char _vel)
@@ -138,3 +142,12 @@ void midi_uart_out(unsigned char _c)
/* Put data into buffer, sends the data */
UDR = _c;
}
+
+ void midi_uart_outs( char *_s)
+ {
+ while(*_s)
+ {
+ midi_uart_out(*_s);
+ _s++;
+ }
+ } \ No newline at end of file
diff --git a/floppyMusic/midi.h b/floppyMusic/midi.h
index 82248b4..583c7d1 100644
--- a/floppyMusic/midi.h
+++ b/floppyMusic/midi.h
@@ -68,4 +68,6 @@ static void midi_update_note(uint16_t _note, uint8_t _status);
static void midi_uart_out(unsigned char _c);
+static void midi_uart_outs( char *_s);
+
#endif /* MIDI_H_ */ \ No newline at end of file