summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-22 16:56:17 +0100
committerNao Pross <naopross@thearcway.org>2018-02-22 16:56:17 +0100
commit3a9a9b6ba4ba751b93c5b1a25859e7ec8b94e1d0 (patch)
tree3903fff01fdebd3f9c62d5df175c9f368067735a /src
parentAdd recepit and minor correction (diff)
downloadXilofono-3a9a9b6ba4ba751b93c5b1a25859e7ec8b94e1d0.tar.gz
Xilofono-3a9a9b6ba4ba751b93c5b1a25859e7ec8b94e1d0.zip
Minor fix in RS232, still needs to be fixed
Diffstat (limited to 'src')
-rw-r--r--src/dist/default/production/src.production.cmf52
-rw-r--r--src/dist/default/production/src.production.elfbin12232 -> 12232 bytes
-rw-r--r--src/dist/default/production/src.production.hex10
-rw-r--r--src/dist/default/production/src.production.lst72
-rw-r--r--src/dist/default/production/src.production.map6
-rw-r--r--src/dist/default/production/src.production.objbin7095 -> 7095 bytes
-rw-r--r--src/dist/default/production/src.production.rlfbin59843 -> 59843 bytes
-rw-r--r--src/dist/default/production/src.production.sym6
-rw-r--r--src/main.c7
-rw-r--r--src/nbproject/Makefile-genesis.properties9
-rw-r--r--src/nbproject/Makefile-variables.mk13
-rw-r--r--src/nbproject/private/private.xml1
-rw-r--r--src/rs232.c12
13 files changed, 87 insertions, 101 deletions
diff --git a/src/dist/default/production/src.production.cmf b/src/dist/default/production/src.production.cmf
index b190b8c..ab9fe32 100644
--- a/src/dist/default/production/src.production.cmf
+++ b/src/dist/default/production/src.production.cmf
@@ -11,10 +11,6 @@
# All addresses and the length are given in unqualified hexadecimal
# in delta units. Any other numeric values are decimal.
%PSECTS
-$C:\Users\_prossn\AppData\Local\Temp\s438.obj
-idloc IDLOC 0 200000 200000 8 1
-init CODE 0 0 0 4 1
-config CONFIG 0 300000 300000 E 1
$dist/default/production\src.production.obj
cinit CODE 0 7E60 7E60 6 1
text0 CODE 0 7ED4 7ED4 2E 1
@@ -25,6 +21,10 @@ text4 CODE 0 7F78 7F78 88 1
text5 CODE 0 7E66 7E66 C 1
text6 CODE 0 7E72 7E72 18 1
cstackCOMRAM COMRAM 1 1 1 14 1
+$C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+idloc IDLOC 0 200000 200000 8 1
+init CODE 0 0 0 4 1
+config CONFIG 0 300000 300000 E 1
# %UNUSED Section
# This section enumerates the unused ranges of each CLASS. Each entry
# is described on a single line as follows:
@@ -96,8 +96,8 @@ $dist/default/production\src.production.obj
7F02 text1 CODE >64:Z:\SAMB_4\projects\xilofono\src\midi.c
7F02 text1 CODE >66:Z:\SAMB_4\projects\xilofono\src\midi.c
7F0A text1 CODE >70:Z:\SAMB_4\projects\xilofono\src\midi.c
-7F1A text1 CODE >71:Z:\SAMB_4\projects\xilofono\src\midi.c
-7F2E text1 CODE >73:Z:\SAMB_4\projects\xilofono\src\midi.c
+7F1E text1 CODE >74:Z:\SAMB_4\projects\xilofono\src\midi.c
+7F2E text1 CODE >75:Z:\SAMB_4\projects\xilofono\src\midi.c
7F42 text1 CODE >77:Z:\SAMB_4\projects\xilofono\src\midi.c
7F52 text1 CODE >78:Z:\SAMB_4\projects\xilofono\src\midi.c
7F62 text1 CODE >81:Z:\SAMB_4\projects\xilofono\src\midi.c
@@ -107,12 +107,12 @@ $dist/default/production\src.production.obj
7EF4 text0 CODE >113:Z:\SAMB_4\projects\xilofono\src\main.c
7EF4 text0 CODE >114:Z:\SAMB_4\projects\xilofono\src\main.c
7F00 text0 CODE >113:Z:\SAMB_4\projects\xilofono\src\main.c
-7E60 cinit CODE >1149:C:\Users\_prossn\AppData\Local\Temp\s438.
-7E60 cinit CODE >1151:C:\Users\_prossn\AppData\Local\Temp\s438.
-7E60 cinit CODE >1154:C:\Users\_prossn\AppData\Local\Temp\s438.
-7E60 cinit CODE >1160:C:\Users\_prossn\AppData\Local\Temp\s438.
-7E60 cinit CODE >1162:C:\Users\_prossn\AppData\Local\Temp\s438.
-7E62 cinit CODE >1163:C:\Users\_prossn\AppData\Local\Temp\s438.
+7E60 cinit CODE >1149:C:\Users\_prossn\AppData\Local\Temp\s4jk.
+7E60 cinit CODE >1151:C:\Users\_prossn\AppData\Local\Temp\s4jk.
+7E60 cinit CODE >1154:C:\Users\_prossn\AppData\Local\Temp\s4jk.
+7E60 cinit CODE >1160:C:\Users\_prossn\AppData\Local\Temp\s4jk.
+7E60 cinit CODE >1162:C:\Users\_prossn\AppData\Local\Temp\s4jk.
+7E62 cinit CODE >1163:C:\Users\_prossn\AppData\Local\Temp\s4jk.
# %SYMTAB Section
# An enumeration of all symbols in the program.
# The beginning of the section is indicated by %SYMTAB.
@@ -132,14 +132,14 @@ __Hspace_2 0 0 ABS 0 - dist/default/production\src.production.obj
__CFG_IESO$OFF 0 0 ABS 0 - dist/default/production\src.production.obj
__end_of_midi_set_status 7EAE 0 CODE 0 text2 dist/default/production\src.production.obj
__Hibigdata 0 0 CODE 0 ibigdata dist/default/production\src.production.obj
-__mediumconst 0 0 MEDIUMCONST 0 mediumconst C:\Users\_prossn\AppData\Local\Temp\s438.obj
+__mediumconst 0 0 MEDIUMCONST 0 mediumconst C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
__Heeprom_data 0 0 EEDATA 0 eeprom_data dist/default/production\src.production.obj
__Lsmallconst 0 0 SMALLCONST 0 smallconst dist/default/production\src.production.obj
_RCIF 7CF5 0 ABS 0 - dist/default/production\src.production.obj
_TXIF 7CF4 0 ABS 0 - dist/default/production\src.production.obj
-___sp 0 0 STACK 2 stack C:\Users\_prossn\AppData\Local\Temp\s438.obj
+___sp 0 0 STACK 2 stack C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
_main 7ED4 0 CODE 0 text0 dist/default/production\src.production.obj
-start 0 0 CODE 0 init C:\Users\_prossn\AppData\Local\Temp\s438.obj
+start 0 0 CODE 0 init C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
__size_of_main 0 0 ABS 0 - dist/default/production\src.production.obj
eusart_write_midi@data 8 0 COMRAM 1 cstackCOMRAM dist/default/production\src.production.obj
__CFG_CCP2MX$PORTC1 0 0 ABS 0 - dist/default/production\src.production.obj
@@ -147,11 +147,11 @@ midi_note_on@channel 8 0 COMRAM 1 cstackCOMRAM dist/default/production\src.produ
__Hpowerup 0 0 CODE 0 powerup dist/default/production\src.production.obj
__CFG_CCP3MX$PORTB5 0 0 ABS 0 - dist/default/production\src.production.obj
__size_of_eusart_write_midi 0 0 ABS 0 - dist/default/production\src.production.obj
-__accesstop 60 0 ABS 0 - C:\Users\_prossn\AppData\Local\Temp\s438.obj
-intlevel0 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s438.obj
-intlevel1 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s438.obj
-intlevel2 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s438.obj
-intlevel3 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s438.obj
+__accesstop 60 0 ABS 0 - C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+intlevel0 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+intlevel1 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+intlevel2 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+intlevel3 0 0 CODE 0 text C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
_midi_set_status 7E8A 0 CODE 0 text2 dist/default/production\src.production.obj
__LnvFARRAM 0 0 FARRAM 0 nvFARRAM dist/default/production\src.production.obj
__CFG_EBTR0$OFF 0 0 ABS 0 - dist/default/production\src.production.obj
@@ -164,8 +164,8 @@ __Hclrtext 0 0 ABS 0 clrtext dist/default/production\src.production.obj
__CFG_PRICLKEN$ON 0 0 ABS 0 - dist/default/production\src.production.obj
_eusart_init 7E72 0 CODE 0 text6 dist/default/production\src.production.obj
midi_note_on@velocity B 0 COMRAM 1 cstackCOMRAM dist/default/production\src.production.obj
-___inthi_sp 0 0 STACK 2 stack C:\Users\_prossn\AppData\Local\Temp\s438.obj
-___intlo_sp 0 0 STACK 2 stack C:\Users\_prossn\AppData\Local\Temp\s438.obj
+___inthi_sp 0 0 STACK 2 stack C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+___intlo_sp 0 0 STACK 2 stack C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
eusart_write_midi@length 6 0 COMRAM 1 cstackCOMRAM dist/default/production\src.production.obj
__Hintcode_body 0 0 ABS 0 intcode_body dist/default/production\src.production.obj
__Lintsave_regs 0 0 BIGRAM 1 intsave_regs dist/default/production\src.production.obj
@@ -208,7 +208,7 @@ __Htext5 0 0 ABS 0 text5 dist/default/production\src.production.obj
__Htext6 0 0 ABS 0 text6 dist/default/production\src.production.obj
__Hbigbss 0 0 BIGRAM 1 bigbss dist/default/production\src.production.obj
__Hbigram 0 0 ABS 0 bigram dist/default/production\src.production.obj
-__smallconst 0 0 SMALLCONST 0 smallconst C:\Users\_prossn\AppData\Local\Temp\s438.obj
+__smallconst 0 0 SMALLCONST 0 smallconst C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
__Hcomram 0 0 ABS 0 comram dist/default/production\src.production.obj
__Hconfig 30000E 0 CONFIG 0 config dist/default/production\src.production.obj
midi_note_on@pkt 6 0 COMRAM 1 cstackCOMRAM dist/default/production\src.production.obj
@@ -281,8 +281,8 @@ __Lfarbss 0 0 FARRAM 0 farbss dist/default/production\src.production.obj
__Lfardata 0 0 FARRAM 0 fardata dist/default/production\src.production.obj
midi_set_status@status 3 0 COMRAM 1 cstackCOMRAM dist/default/production\src.production.obj
__size_of_midi_note_on 0 0 ABS 0 - dist/default/production\src.production.obj
-stackhi 5FF 0 ABS 0 - C:\Users\_prossn\AppData\Local\Temp\s438.obj
-stacklo 60 0 ABS 0 - C:\Users\_prossn\AppData\Local\Temp\s438.obj
+stackhi 5FF 0 ABS 0 - C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
+stacklo 60 0 ABS 0 - C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
__Lintcode 0 0 CODE 0 intcode dist/default/production\src.production.obj
__Lintret 0 0 ABS 0 intret dist/default/production\src.production.obj
__Lirdata 0 0 CODE 0 irdata dist/default/production\src.production.obj
@@ -309,7 +309,7 @@ __ptext4 7F78 0 CODE 0 text4 dist/default/production\src.production.obj
__ptext5 7E66 0 CODE 0 text5 dist/default/production\src.production.obj
__ptext6 7E72 0 CODE 0 text6 dist/default/production\src.production.obj
__Lstruct 0 0 COMRAM 1 struct dist/default/production\src.production.obj
-__ramtop 600 0 RAM 0 ramtop C:\Users\_prossn\AppData\Local\Temp\s438.obj
+__ramtop 600 0 RAM 0 ramtop C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
putch@c 1 0 COMRAM 1 cstackCOMRAM dist/default/production\src.production.obj
__Lpowerup 0 0 CODE 0 powerup dist/default/production\src.production.obj
__Leeprom_data 0 0 EEDATA 0 eeprom_data dist/default/production\src.production.obj
diff --git a/src/dist/default/production/src.production.elf b/src/dist/default/production/src.production.elf
index 23490b8..7e5fec8 100644
--- a/src/dist/default/production/src.production.elf
+++ b/src/dist/default/production/src.production.elf
Binary files differ
diff --git a/src/dist/default/production/src.production.hex b/src/dist/default/production/src.production.hex
index 126724a..97a4d49 100644
--- a/src/dist/default/production/src.production.hex
+++ b/src/dist/default/production/src.production.hex
@@ -9,11 +9,11 @@
:107ED000DF6E12000E0E066E000E076E000E096EAB
:107EE000000E086E3C0E0A6E7F0E0B6E81EC3FF0AA
:107EF00039EC3FF00E0E026E000E036EBCEC3FF04C
-:107F0000F9D706500710D8B4120006C001F007C018
-:107F100002F0080E036E45EC3FF006C001F007C00A
-:107F200002F008C003F009C004F057EC3FF0030E64
-:107F300006240C6E000E07200D6E0C500D10D8B4E8
-:107F4000120020EE03F00650D9260750DA220AC0AC
+:107F0000F9D706500710D8B41200030E06240C6EE1
+:107F1000000E07200D6E0C500D10D8B4120006C0D4
+:107F200001F007C002F0080E036E45EC3FF006C0FA
+:107F300001F007C002F008C003F009C004F057ECDC
+:107F40003FF020EE03F00650D9260750DA220AC08F
:107F5000DFFF20EE04F00650D9260750DA220BC0CE
:107F6000DFFF20EE01F00650D9260750DA22020E7C
:107F7000DE6E000EDD6E120002500310D8B4120047
diff --git a/src/dist/default/production/src.production.lst b/src/dist/default/production/src.production.lst
index fd44914..5839790 100644
--- a/src/dist/default/production/src.production.lst
+++ b/src/dist/default/production/src.production.lst
@@ -1,7 +1,7 @@
Microchip Technology PIC18 LITE Macro Assembler V1.44 build -154322312
- Thu Feb 01 17:09:31 2018
+ Thu Feb 22 10:47:56 2018
Microchip Technology Omniscient Code Generator v1.44 (Free mode) build 201709140600
1 processor 18F45K22
@@ -277,40 +277,40 @@ Microchip Technology Omniscient Code Generator v1.44 (Free mode) build 201709140
263 007F08 0012 return
264
265 ;midi.c: 68: }
- 266 ;midi.c: 70: midi_set_status(pkt, NOTE_ON);
+ 266 ;midi.c: 70: if (pkt->data == (0)) {
267
268 ;midi.c: 67: return -1;
269 ; Return value of _midi_note_on is never used
- 270 007F0A C006 F001 movff midi_note_on@pkt,midi_set_status@pkt
- 271 007F0E C007 F002 movff midi_note_on@pkt+1,midi_set_status@pkt+1
- 272 007F12 0E08 movlw 8
- 273 007F14 6E03 movwf midi_set_status@status,c
- 274 007F16 EC45 F03F call _midi_set_status ;wreg free
- 275
- 276 ;midi.c: 71: midi_set_channel(pkt, channel);
- 277 007F1A C006 F001 movff midi_note_on@pkt,midi_set_channel@pkt
- 278 007F1E C007 F002 movff midi_note_on@pkt+1,midi_set_channel@pkt+1
- 279 007F22 C008 F003 movff midi_note_on@channel,midi_set_channel@channel
- 280 007F26 C009 F004 movff midi_note_on@channel+1,midi_set_channel@channel+1
- 281 007F2A EC57 F03F call _midi_set_channel ;wreg free
- 282
- 283 ;midi.c: 73: if (pkt->data == (0)) {
- 284 007F2E 0E03 movlw 3
- 285 007F30 2406 addwf midi_note_on@pkt,w,c
- 286 007F32 6E0C movwf ??_midi_note_on& (0+255),c
- 287 007F34 0E00 movlw 0
- 288 007F36 2007 addwfc midi_note_on@pkt+1,w,c
- 289 007F38 6E0D movwf (??_midi_note_on+1)& (0+255),c
- 290 007F3A 500C movf ??_midi_note_on,w,c
- 291 007F3C 100D iorwf ??_midi_note_on+1,w,c
- 292 007F3E B4D8 btfsc status,2,c
- 293 007F40 0012 return
- 294
- 295 ;midi.c: 75: }
- 296 ;midi.c: 77: pkt->data[0] = note;
- 297
- 298 ;midi.c: 74: return -2;
- 299 ; Return value of _midi_note_on is never used
+ 270 007F0A 0E03 movlw 3
+ 271 007F0C 2406 addwf midi_note_on@pkt,w,c
+ 272 007F0E 6E0C movwf ??_midi_note_on& (0+255),c
+ 273 007F10 0E00 movlw 0
+ 274 007F12 2007 addwfc midi_note_on@pkt+1,w,c
+ 275 007F14 6E0D movwf (??_midi_note_on+1)& (0+255),c
+ 276 007F16 500C movf ??_midi_note_on,w,c
+ 277 007F18 100D iorwf ??_midi_note_on+1,w,c
+ 278 007F1A B4D8 btfsc status,2,c
+ 279 007F1C 0012 return
+ 280
+ 281 ;midi.c: 72: }
+ 282 ;midi.c: 74: midi_set_status(pkt, NOTE_ON);
+ 283
+ 284 ;midi.c: 71: return -2;
+ 285 ; Return value of _midi_note_on is never used
+ 286 007F1E C006 F001 movff midi_note_on@pkt,midi_set_status@pkt
+ 287 007F22 C007 F002 movff midi_note_on@pkt+1,midi_set_status@pkt+1
+ 288 007F26 0E08 movlw 8
+ 289 007F28 6E03 movwf midi_set_status@status,c
+ 290 007F2A EC45 F03F call _midi_set_status ;wreg free
+ 291
+ 292 ;midi.c: 75: midi_set_channel(pkt, channel);
+ 293 007F2E C006 F001 movff midi_note_on@pkt,midi_set_channel@pkt
+ 294 007F32 C007 F002 movff midi_note_on@pkt+1,midi_set_channel@pkt+1
+ 295 007F36 C008 F003 movff midi_note_on@channel,midi_set_channel@channel
+ 296 007F3A C009 F004 movff midi_note_on@channel+1,midi_set_channel@channel+1
+ 297 007F3E EC57 F03F call _midi_set_channel ;wreg free
+ 298
+ 299 ;midi.c: 77: pkt->data[0] = note;
300 007F42 EE20 F003 lfsr 2,3
301 007F46 5006 movf midi_note_on@pkt,w,c
302 007F48 26D9 addwf fsr2l,f,c
@@ -591,7 +591,7 @@ Microchip Technology Omniscient Code Generator v1.44 (Free mode) build 201709140
577
578 ;main.c: 96: while (length--) {
579 007FDA D009 goto l12
- 580 007FDC l826:
+ 580 007FDC l832:
581
582 ;main.c: 97: putch((char) *(data++));
583 007FDC C008 FFD9 movff eusart_write_midi@data,fsr2l
@@ -605,7 +605,7 @@ Microchip Technology Omniscient Code Generator v1.44 (Free mode) build 201709140
591 007FF0 A0D8 btfss status,0,c
592 007FF2 0607 decf eusart_write_midi@length+1,f,c
593 007FF4 2806 incf eusart_write_midi@length,w,c
- 594 007FF6 E1F2 bnz l826
+ 594 007FF6 E1F2 bnz l832
595 007FF8 2807 incf eusart_write_midi@length+1,w,c
596 007FFA B4D8 btfsc status,2,c
597 007FFC 0012 return
@@ -907,11 +907,11 @@ SFR 0 0 0 200 0.0%
Microchip Technology PIC18 Macro Assembler V1.44 build -154322312
-Symbol Table Thu Feb 01 17:09:31 2018
+Symbol Table Thu Feb 22 10:47:56 2018
l12 7FEE l13 7FDC l19 7EF4
__CFG_CP0$OFF 000000 __CFG_CP1$OFF 000000 __CFG_LVP$ON 000000
- l700 7E68 l826 7FDC __CFG_CPB$OFF 000000
+ l700 7E68 l832 7FDC __CFG_CPB$OFF 000000
__CFG_CPD$OFF 000000 _RCIF 007CF5 _TXIF 007CF4
_main 7ED4 midi_note_on@channel 0008 fsr2h 000FDA
indf2 000FDF fsr2l 000FD9 __CFG_BORV$190 000000
diff --git a/src/dist/default/production/src.production.map b/src/dist/default/production/src.production.map
index 8323a28..84c417f 100644
--- a/src/dist/default/production/src.production.map
+++ b/src/dist/default/production/src.production.map
@@ -5,7 +5,7 @@ Linker command line:
-W-3 --edf=C:\Program Files\Microchip\xc8\v1.44\dat\en_msgs.txt -cs \
-h+dist/default/production\src.production.sym \
--cmf=dist/default/production\src.production.cmf -z -Q18F45K22 \
- -oC:\Users\_prossn\AppData\Local\Temp\s438.2 \
+ -oC:\Users\_prossn\AppData\Local\Temp\s4jk.2 \
-Mdist/default/production/src.production.map -E1 -ver=XC8 \
-ASTACK=060h-05ffh -pstack=STACK -ACODE=00h-07FFFh -ACONST=00h-07FFFh \
-ASMALLCONST=0600h-06FFhx122 -AMEDIUMCONST=0600h-07FFFh -ACOMRAM=01h-05Fh \
@@ -22,7 +22,7 @@ Linker command line:
-pfarbss=FARRAM,fardata=FARRAM,nvFARRAM=FARRAM \
-pintsave_regs=BIGRAM,bigbss=BIGRAM,bigdata=BIGRAM -pbss=RAM \
-pidata=CODE,irdata=CODE,ibigdata=CODE,ifardata=CODE -prparam=COMRAM \
- C:\Users\_prossn\AppData\Local\Temp\s438.obj \
+ C:\Users\_prossn\AppData\Local\Temp\s4jk.obj \
dist/default/production\src.production.obj
Object code version is 3.11
@@ -35,7 +35,7 @@ Call graph: (short form)
Name Link Load Length Selector Space Scale
-C:\Users\_prossn\AppData\Local\Temp\s438.obj
+C:\Users\_prossn\AppData\Local\Temp\s4jk.obj
init 0 0 4 0 0
idloc 200000 200000 8 200000 0
config 300000 300000 E 300000 0
diff --git a/src/dist/default/production/src.production.obj b/src/dist/default/production/src.production.obj
index 50131cd..70358f1 100644
--- a/src/dist/default/production/src.production.obj
+++ b/src/dist/default/production/src.production.obj
Binary files differ
diff --git a/src/dist/default/production/src.production.rlf b/src/dist/default/production/src.production.rlf
index c5cd828..77628c7 100644
--- a/src/dist/default/production/src.production.rlf
+++ b/src/dist/default/production/src.production.rlf
Binary files differ
diff --git a/src/dist/default/production/src.production.sym b/src/dist/default/production/src.production.sym
index 9cb149a..c64cc64 100644
--- a/src/dist/default/production/src.production.sym
+++ b/src/dist/default/production/src.production.sym
@@ -249,7 +249,7 @@ cinit 7E60 7E65 CODE 7E60 0
%locals
dist/default/production\src.production.obj
C:\Program Files\Microchip\xc8\v1.44\include\pic18f45k22.h
-C:\Users\_prossn\AppData\Local\Temp\s438.
+C:\Users\_prossn\AppData\Local\Temp\s4jk.
1149 7E60 0 CODE 0
1151 7E60 0 CODE 0
1154 7E60 0 CODE 0
@@ -267,8 +267,8 @@ midi.c
64 7F02 0 CODE 0
66 7F02 0 CODE 0
70 7F0A 0 CODE 0
-71 7F1A 0 CODE 0
-73 7F2E 0 CODE 0
+74 7F1E 0 CODE 0
+75 7F2E 0 CODE 0
77 7F42 0 CODE 0
78 7F52 0 CODE 0
81 7F62 0 CODE 0
diff --git a/src/main.c b/src/main.c
index 4fb245a..c6a2a96 100644
--- a/src/main.c
+++ b/src/main.c
@@ -80,6 +80,9 @@
int eusart_write_midi(midi_message_t *pkt)
{
+ size_t length;
+ uint8_t *data;
+
if (pkt == NULL) {
return -1;
}
@@ -88,8 +91,8 @@ int eusart_write_midi(midi_message_t *pkt)
return -2;
}
- size_t length = pkt->data_size;
- uint8_t *data = pkt->data;
+ length = pkt->data_size;
+ data = pkt->data;
putch((char)((pkt->status << 4) | pkt->channel));
diff --git a/src/nbproject/Makefile-genesis.properties b/src/nbproject/Makefile-genesis.properties
deleted file mode 100644
index 251d7a2..0000000
--- a/src/nbproject/Makefile-genesis.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-#Thu Feb 01 16:10:54 CET 2018
-default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc8\\v1.44\\bin
-configurations-xml=af2f7bf849f43cec780e74f66603aaa1
-com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5d30ff5128b14865c8a3796a8f0bb8a0
-default.languagetoolchain.version=1.44
-host.platform=windows
-conf.ids=default
-default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=1ecde863556371fa9144cadd16f678d4
diff --git a/src/nbproject/Makefile-variables.mk b/src/nbproject/Makefile-variables.mk
deleted file mode 100644
index 095430d..0000000
--- a/src/nbproject/Makefile-variables.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Generated - do not edit!
-#
-# NOCDDL
-#
-CND_BASEDIR=`pwd`
-# default configuration
-CND_ARTIFACT_DIR_default=dist/default/production
-CND_ARTIFACT_NAME_default=src.production.hex
-CND_ARTIFACT_PATH_default=dist/default/production/src.production.hex
-CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
-CND_PACKAGE_NAME_default=src.tar
-CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/src.tar
diff --git a/src/nbproject/private/private.xml b/src/nbproject/private/private.xml
index 790aed3..ad4dc09 100644
--- a/src/nbproject/private/private.xml
+++ b/src/nbproject/private/private.xml
@@ -6,6 +6,7 @@
<file>file:/Z:/SAMB_4/projects/xilofono/src/main.c</file>
<file>file:/Z:/SAMB_4/projects/xilofono/src/midi.h</file>
<file>file:/Z:/SAMB_4/projects/xilofono/src/midi.c</file>
+ <file>file:/Z:/SAMB_4/projects/xilofono/src/rs232.c</file>
</group>
</open-files>
</project-private>
diff --git a/src/rs232.c b/src/rs232.c
index f4cf404..05d8b22 100644
--- a/src/rs232.c
+++ b/src/rs232.c
@@ -1,7 +1,8 @@
#include "rs232.h"
#include <xc.h>
-void eusart_init(void) {
+void eusart_init(void)
+{
// set Async and 8 bits frame
TXSTAbits.SYNC = 0;
@@ -20,19 +21,22 @@ void eusart_init(void) {
TXSTAbits.TXEN = 1;
}
-void putch(char c) {
+void putch(char c)
+{
while (!TXIF);
TXREG = c;
}
-char getch(void) {
+char getch(void)
+{
while (!RCIF);
return RCREG;
}
-char getche(void) {
+char getche(void)
+{
char c = getch();
putch(c); // echo