⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lis

📁 sypress psoc express 驱动led发光的应用程序.
💻 LIS
字号:
 0000                   cpu LMM
                        .module main.c
                        .area text(rom, con, rel)
 0000                   .dbfile ./main.c
 0000                   .dbfunc e main _main fV
 0000           _main::
 0000                   .dbline -1
 0000                   .dbline 22
 0000           ; //----------------------------------------------------------------------------
 0000           ; // C main line
 0000           ; //----------------------------------------------------------------------------
 0000           ; 
 0000           ; #include <m8c.h>          // part specific constants and macros
 0000           ; #include "PSoCAPI.h"      // PSoC API definitions for all User Modules
 0000           ; 
 0000           ; #include "driverdecl.h"
 0000           ; #include "CMXSystem.h"
 0000           ; #include "CMXSystemExtern.h"
 0000           ; #include "TransferFunction.h"
 0000           ; 
 0000           ; #include "cmx.h"
 0000           ; #include "ProjectProperties.h"
 0000           ; #include "Custom.h"
 0000           ; 
 0000           ; // Channel includes
 0000           ; // ADC_00 Include
 0000           ; #include "CMX_ADC_CHAN.h"
 0000           ; 
 0000           ; void main()
 0000           ; {
 0000                   .dbline 24
 0000           ;     // Initialize Project
 0000           ;     M8C_EnableGInt;                            // Turn on interrupts 
 0000 7101                      or  F, 01h
 0002           
 0002                   .dbline 25
 0002           ;     I2C_CFG &= 0xFC;                           // Disable I2C in case it's not used.
 0002 41D6FC            and REG[0xd6],-4
 0005                   .dbline 26
 0005           ;     SystemTimer_Start();
 0005 10                push X
 0006 7C0000            xcall _SystemTimer_Start
 0009                   .dbline 27
 0009           ;     SystemTimer_SetInterval(SystemTimer_64_HZ);
 0009 5008              mov A,8
 000B 7C0000            xcall _SystemTimer_SetInterval
 000E                   .dbline 28
 000E           ;     SystemTimer_EnableInt();
 000E 7C0000            xcall _SystemTimer_EnableInt
 0011                   .dbline 32
 0011           ; 
 0011           ;     // Initialize Channels
 0011           ;     // ADC_00 Initialization  
 0011           ;     AdcScanReset(); // Initialize ADC scanner
 0011 7C0000            xcall _AdcScanReset
 0014                   .dbline 33
 0014           ;     ADC10_Start(ADC10_FULLRANGE);     // Start the User Module  
 0014 5003              mov A,3
 0016 7C0000            xcall _ADC10_Start
 0019                   .dbline 34
 0019           ;     ADC10_iCal(0x1FF, ADC10_CAL_VBG);  // Calibrate the ADC so 1.3V = 0x01FF  
 0019 5003              mov A,3
 001B 08                push A
 001C 5001              mov A,1
 001E 08                push A
 001F 50FF              mov A,-1
 0021 08                push A
 0022 7C0000            xcall _ADC10_iCal
 0025 38FD              add SP,-3
 0027 20                pop X
 0028                   .dbline 35
 0028           ;     bADC_Mode = 1;  // Turn scanning on after calibration
 0028 62D000            mov REG[0xd0],>_bADC_Mode
 002B 550001            mov [_bADC_Mode],1
 002E                   .dbline 36
 002E           ;     ADC10_StartADC();
 002E 10                push X
 002F 7C0000            xcall _ADC10_StartADC
 0032 20                pop X
 0033                   .dbline 39
 0033           ; 
 0033           ;     // Initialize Variables
 0033           ;       SystemVars.ReadOnlyVars.pse_Buzzer = 0;
 0033 62D000            mov REG[0xd0],>_SystemVars
 0036 550000            mov [_SystemVars],0
 0039                   .dbline 40
 0039           ;       SystemVars.ReadOnlyVars.pse_Light = 0;
 0039 550100            mov [_SystemVars+1],0
 003C                   .dbline 41
 003C           ;       SystemVars.ReadOnlyVars.pse_RLED = 0;
 003C 550200            mov [_SystemVars+2],0
 003F                   .dbline 44
 003F           ; 
 003F           ;     // Driver instantiations
 003F           ; CMX_BLINKINGLED_Instantiate(&pse_RLED);
 003F 5000              mov A,>_pse_RLED
 0041 08                push A
 0042 5000              mov A,<_pse_RLED
 0044 08                push A
 0045 7C0000            xcall _CMX_BLINKINGLED_Instantiate
 0048 38FE              add SP,-2
 004A                   .dbline 45
 004A           ; CMX_BLINKINGLED_SetValue(&pse_RLED, (BYTE)SystemVars.ReadOnlyVars.pse_RLED);
 004A 62D000            mov REG[0xd0],>_SystemVars
 004D 5102              mov A,[_SystemVars+2]
 004F 08                push A
 0050 5000              mov A,>_pse_RLED
 0052 08                push A
 0053 5000              mov A,<_pse_RLED
 0055 08                push A
 0056 7C0000            xcall _CMX_BLINKINGLED_SetValue
 0059                   .dbline 47
 0059           ; // Not require for ID_pse_Light
 0059           ; CMX_GENERICPWM_Instantiate(&pse_Buzzer);
 0059 5000              mov A,>_pse_Buzzer
 005B 08                push A
 005C 5000              mov A,<_pse_Buzzer
 005E 08                push A
 005F 7C0000            xcall _CMX_GENERICPWM_Instantiate
 0062 38FB              add SP,-5
 0064                   .dbline 50
 0064           ; 
 0064           ;     // Custom initization code.
 0064           ;     CustomInit();
 0064 7C0000            xcall _CustomInit
 0067 803A              xjmp L13
 0069           L12:
 0069                   .dbline 54
 0069                   .dbline 61
 0069 5000              mov A,>_pse_Light
 006B 08                push A
 006C 5000              mov A,<_pse_Light
 006E 08                push A
 006F 7C0000            xcall _CMX_LX1972L_GetValue
 0072 38FE              add SP,-2
 0074 62D000            mov REG[0xd0],>_SystemVars
 0077 5301              mov [_SystemVars+1],A
 0079                   .dbline 64
 0079 7C0000            xcall _CustomPostInputUpdate
 007C                   .dbline 67
 007C 7C0000            xcall _TransferFunction
 007F                   .dbline 70
 007F 7C0000            xcall _CustomPreOutputUpdate
 0082                   .dbline 73
 0082 62D000            mov REG[0xd0],>_SystemVars
 0085 5100              mov A,[_SystemVars]
 0087 08                push A
 0088 5000              mov A,>_pse_Buzzer
 008A 08                push A
 008B 5000              mov A,<_pse_Buzzer
 008D 08                push A
 008E 7C0000            xcall _CMX_GENERICPWM_SetValue
 0091                   .dbline 74
 0091 62D000            mov REG[0xd0],>_SystemVars
 0094 5102              mov A,[_SystemVars+2]
 0096 08                push A
 0097 5000              mov A,>_pse_RLED
 0099 08                push A
 009A 5000              mov A,<_pse_RLED
 009C 08                push A
 009D 7C0000            xcall _CMX_BLINKINGLED_SetValue
 00A0 38FA              add SP,-6
 00A2                   .dbline 76
 00A2           L13:
 00A2                   .dbline 53
 00A2 8FC6              xjmp L12
 00A4           X0:
 00A4                   .dbline -2
 00A4                   .dbline 77
 00A4           ;     // End Initialize Project
 00A4           ; 
 00A4           ;       while(1)
 00A4           ;       {
 00A4           ;         // Sync loop sample rate
 00A4           ; #if ( SAMPLE_DIVIDER  )
 00A4           ;         SystemTimer_SyncWait(SAMPLE_DIVIDER, SystemTimer_WAIT_RELOAD);
 00A4           ; #endif
 00A4           ; 
 00A4           ;               // update input variables
 00A4           ;               SystemVars.ReadOnlyVars.pse_Light = CMX_LX1972L_GetValue(&pse_Light);
 00A4           ; 
 00A4           ;         // Custom Post Input function
 00A4           ;         CustomPostInputUpdate();
 00A4           ; 
 00A4           ;               // run transfer function and update output variables
 00A4           ;               TransferFunction();
 00A4           ; 
 00A4           ;         // CustomPreOutputUpdate();
 00A4           ;         CustomPreOutputUpdate();
 00A4           ; 
 00A4           ;               // set outputs
 00A4           ;               CMX_GENERICPWM_SetValue(&pse_Buzzer, (BYTE)SystemVars.ReadOnlyVars.pse_Buzzer);
 00A4           ;               CMX_BLINKINGLED_SetValue(&pse_RLED, (BYTE)SystemVars.ReadOnlyVars.pse_RLED);
 00A4           ; 
 00A4           ;       }
 00A4           ; }
 00A4           L8:
 00A4                   .dbline 0 ; func end
 00A4 8FFF              jmp .
 00A6                   .dbend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -