Subversion Repositories svn.mios

Rev

Rev 73 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 73 Rev 1198
Line 1... Line 1...
1
; $Id: main.inc 73 2008-02-03 00:00:52Z tk $
1
; $Id: main.inc 1198 2015-09-13 19:19:34Z tk $
2
;
2
;
3
; MIOS Application
3
; MIOS Application
4
; MIDIO128
4
; MIDIO128
5
;
5
;
6
; ==========================================================================
6
; ==========================================================================
Line 86... Line 86...
86
	;; load values from internal dump
86
	;; load values from internal dump
87
	call	MIDIO_DUMP_RestoreAll
87
	call	MIDIO_DUMP_RestoreAll
88

88

89
	;; init default LCD offsets
89
	;; init default LCD offsets
90
	call	MIDIO_LCD_SetDefaultOffsets
90
	call	MIDIO_LCD_SetDefaultOffsets
-
 
91

-
 
92
#if DEFAULT_AIN_ENABLED > 0
-
 
93
	;; optional:
-
 
94
        ;; initialize the AIN driver
-
 
95
        movlw   DEFAULT_AIN_ENABLED
-
 
96
        call    MIOS_AIN_NumberSet
-
 
97
#if DEFAULT_AIN_ENABLED > 8
-
 
98
        call    MIOS_AIN_Muxed        ; use multiplexer interface
-
 
99
#else
-
 
100
        call    MIOS_AIN_UnMuxed        ; don't use multiplexer interface
-
 
101
#endif
-
 
102
        movlw   0x07                    ; set deadband to 7
-
 
103
        call    MIOS_AIN_DeadbandSet
-
 
104
#endif
91

105
92
	;; ------------------------------------------------------------------
106
	;; ------------------------------------------------------------------
93
	return
107
	return
94

108

95
109
Line 278... Line 292...
278
;;     o Pot number in WREG and MIOS_PARAMETER1
292
;;     o Pot number in WREG and MIOS_PARAMETER1
279
;;     o LSB value in MIOS_PARAMETER2
293
;;     o LSB value in MIOS_PARAMETER2
280
;;     o MSB value in MIOS_PARAMETER3
294
;;     o MSB value in MIOS_PARAMETER3
281
;; --------------------------------------------------------------------------
295
;; --------------------------------------------------------------------------
282
USER_AIN_NotifyChange
296
USER_AIN_NotifyChange
-
 
297
#if DEFAULT_AIN_ENABLED > 0
-
 
298
        ;; store pot number in PRODL
-
 
299
        movwf   PRODL
-
 
300

-
 
301
        ;; copy 7bit value into MIOS_PARAMETER2 (pot number already in WREG)
-
 
302
        call    MIOS_AIN_Pin7bitGet
-
 
303
        movwf   MIOS_PARAMETER2
-
 
304
-
 
305
        ;; restore pot number
-
 
306
	movff	PRODL, MIOS_PARAMETER1
-
 
307

-
 
308
        ;; now: pot number in WREG and MIOS_PARAMETER1
-
 
309
        ;; 7-bit value in MIOS_PARAMETER2
-
 
310

-
 
311
	movlw	0xb0			; CC channel #1
-
 
312
	call	MIOS_MIDI_TxBufferPut
-
 
313
	movf	MIOS_PARAMETER1, W
-
 
314
	addlw	16			; CC#16 + pot number
-
 
315
	call	MIOS_MIDI_TxBufferPut
-
 
316
	movf	MIOS_PARAMETER2, W	; CC value
-
 
317
	call	MIOS_MIDI_TxBufferPut
-
 
318
#endif
-
 
319
	
283
	return
320
	return
284

321

285
	
322
	
286
;; ==========================================================================
323
;; ==========================================================================
287
;;  Application code (see comments in files)
324
;;  Application code (see comments in files)