📄 simple_phy.lst
字号:
001a 5f CLRX
001b 9eff05 STHX 5,SP
364: upperword &= TIMESTAMP_HI_MASK; /* Clears TS_HELD bit. */
001e 9ee604 LDA 4,SP
0021 97 TAX
0022 9eff03 STHX 3,SP
0025 5f CLRX
0026 9eff01 STHX 1,SP
365: current_time = (__uint32__) (upperword << 16) | lowerword;
0029 95 TSX
002a a610 LDA #16
002c cd0000 JSR _LLSL
002f af04 AIX #4
0031 89 PSHX
0032 8b PSHH
0033 aff8 AIX #-8
0035 cd0000 JSR _LOR
0038 af0c AIX #12
003a cd0000 JSR _POP32
366: return current_time;
003d 9efe11 LDHX 17,SP
0040 89 PSHX
0041 8b PSHH
0042 95 TSX
0043 af0e AIX #14
0045 a604 LDA #4
0047 cd0000 JSR _COPY
367: }
004a a712 AIS #18
004c 81 RTS
368:
369: /**************************************************************
370: * Function: Set MC13192 CLKo frequency
371: * Parameters: frequency value
372: * Return: status
373: **************************************************************/
374: int PLME_set_MC13192_clock_rate(__uint8__ freq)
375: {
Function: PLME_set_MC13192_clock_rate
Source : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200
0000 87 PSHA
0001 a7fe AIS #-2
376: volatile __uint16__ current_value;
377: current_value = drv_read_spi_1(CLKS_ADDR); /* Read register and re-write */
0003 a60a LDA #10
0005 cd0000 JSR drv_read_spi_1
0008 9eff01 STHX 1,SP
378: current_value &= 0xFFF8;
000b 95 TSX
000c e601 LDA 1,X
000e a4f8 AND #-8
0010 e701 STA 1,X
379: current_value |= freq;
0012 9efe01 LDHX 1,SP
0015 9f TXA
0016 9eea03 ORA 3,SP
0019 97 TAX
001a 9eff01 STHX 1,SP
380: drv_write_spi_1(CLKS_ADDR, current_value);
001d a60a LDA #10
001f 9efe01 LDHX 1,SP
0022 cd0000 JSR drv_write_spi_1
381: return SUCCESS;
0025 ae77 LDX #119
0027 8c CLRH
382: }
0028 a703 AIS #3
002a 81 RTS
383:
384: /**************************************************************
385: * Function: Set MC13192 timer frequency
386: * Parameters: frequency value
387: * Return: status
388: **************************************************************/
389: int PLME_set_MC13192_tmr_prescale (__uint8__ freq)
390: {
Function: PLME_set_MC13192_tmr_prescale
Source : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200
0000 87 PSHA
0001 a7fe AIS #-2
391: volatile __uint16__ current_value;
392: current_value = drv_read_spi_1(PRESCALE_ADDR);
0003 a609 LDA #9
0005 cd0000 JSR drv_read_spi_1
0008 9eff01 STHX 1,SP
393: current_value &= 0xFFF8;
000b 95 TSX
000c e601 LDA 1,X
000e a4f8 AND #-8
0010 e701 STA 1,X
394: current_value |= freq;
0012 9efe01 LDHX 1,SP
0015 9f TXA
0016 9eea03 ORA 3,SP
0019 97 TAX
001a 9eff01 STHX 1,SP
395: drv_write_spi_1(PRESCALE_ADDR, current_value);
001d a609 LDA #9
001f 9efe01 LDHX 1,SP
0022 cd0000 JSR drv_write_spi_1
396: return SUCCESS;
0025 ae77 LDX #119
0027 8c CLRH
397: }
0028 a703 AIS #3
002a 81 RTS
398:
399: /**************************************************************
400: * Function: Set MC13192 timer value (i.e. initialize)
401: * Parameters: timer value
402: * Return: none
403: **************************************************************/
404: void PLME_set_time_request(__uint32__ requested_time)
405: {
Function: PLME_set_time_request
Source : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200
0000 a7fc AIS #-4
406: __uint16__ upperword, lowerword, mode2_reg_val;
407: /* Split 32 bit input into 2 16 bit values */
408: upperword = (__uint16__) (requested_time >> 16) & 0x000000FF;
409: lowerword = (__uint16__) requested_time & 0x0000FFFF;
0002 9efe09 LDHX 9,SP
0005 9eff03 STHX 3,SP
410: /* Program Time1 comparator with the desired value */
411: drv_write_spi_1(T1_HI_ADDR, upperword);
0008 a61b LDA #27
000a 95 TSX
000b ee07 LDX 7,X
000d 8c CLRH
000e cd0000 JSR drv_write_spi_1
412: drv_write_spi_1(T1_LO_ADDR, lowerword);
0011 a61c LDA #28
0013 9efe03 LDHX 3,SP
0016 cd0000 JSR drv_write_spi_1
413: /* Get current state of the MODE2 MC13192 register */
414: mode2_reg_val = drv_read_spi_1(MODE2_ADDR);
0019 a607 LDA #7
001b cd0000 JSR drv_read_spi_1
001e 9eff01 STHX 1,SP
415: /* Set the Tmr_load bit */
416: mode2_reg_val |= 0x8000;
0021 95 TSX
0022 f6 LDA ,X
0023 aa80 ORA #-128
0025 f7 STA ,X
417: /* Now write the value back to MC13192 register MODE2 */
418: drv_write_spi_1(MODE2_ADDR, mode2_reg_val);
0026 a607 LDA #7
0028 9efe01 LDHX 1,SP
002b cd0000 JSR drv_write_spi_1
419: /* Clear the tmr_load bit */
420: mode2_reg_val &= 0x7FFF;
002e 95 TSX
002f f6 LDA ,X
0030 a47f AND #127
0032 f7 STA ,X
421: /* Clr the tmr_load bit to prepare for next set_time_request. */
422: drv_write_spi_1(MODE2_ADDR, mode2_reg_val);
0033 a607 LDA #7
0035 9efe01 LDHX 1,SP
0038 cd0000 JSR drv_write_spi_1
423: return;
424: }
003b a704 AIS #4
003d 81 RTS
425:
426: /**************************************************************
427: * Function: Set MC13192 timer compare value
428: * Parameters: timer value
429: * Return: status
430: **************************************************************/
431: int PLME_enable_MC13192_timer1(__uint32__ counter_value)
432: {
Function: PLME_enable_MC13192_timer1
Source : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200
433: /* Load the timeout value into T1 with Timer disabled. */
434: drv_write_spi_1(T1_HI_ADDR, (__uint16__) ((counter_value >> 16) & 0x000000FF) | 0x000080FF);
0000 a61b LDA #27
0002 4580ff LDHX #-32513
0005 ad0c BSR L13 ;abs = 0013
435: drv_write_spi_1(T1_LO_ADDR, (__uint16__) (counter_value & 0x0000FFFF));
436: /* Turn Timer1 mask on. */
437: drv_write_spi_1(T1_HI_ADDR, (__uint16__) ((counter_value >> 16) & 0x000000FF));
0007 a61b LDA #27
0009 95 TSX
000a ee03 LDX 3,X
000c 8c CLRH
000d ad04 BSR L13 ;abs = 0013
438: drv_write_spi_1(T1_LO_ADDR, (__uint16__) (counter_value & 0x0000FFFF));
439: return SUCCESS;
000f ae77 LDX #119
0011 8c CLRH
440: }
0012 81 RTS
0013 L13:
0013 cd0000 JSR drv_write_spi_1
0016 a61c LDA #28
0018 9efe07 LDHX 7,SP
001b cc0000 JMP drv_write_spi_1
441:
442: /**************************************************************
443: * Function: Disable MC13192 timer comparator TC1
444: * Parameters: none
445: * Return: status
446: **************************************************************/
447: int PLME_disable_MC13192_timer1(void)
448: {
Function: PLME_disable_MC13192_timer1
Source : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200
449: /* Load the timeout value into T1 with Timer disabled. */
450: /* Clear Timer1 if in RX_MODE_WTO */
451: drv_write_spi_1(T1_HI_ADDR, 0x8000);
0000 a61b LDA #27
0002 458000 LDHX #-32768
0005 cd0000 JSR drv_write_spi_1
452: drv_write_spi_1(T1_LO_ADDR, 0x0000);
0008 a61c LDA #28
000a 5f CLRX
000b 8c CLRH
000c cd0000 JSR drv_write_spi_1
453: // irq_mask_reg = drv_read_spi_1(IRQ_MASK);
454: // irq_mask_reg &= ~TIMER1_IRQMASK_BIT;
455: // drv_write_spi_1(IRQ_MASK, irq_mask_reg);
456: return SUCCESS;
000f ae77 LDX #119
0011 8c CLRH
457: }
0012 81 RTS
458:
459: /**************************************************************
460: * Function: Indicate a MC13192 reset condition
461: * Parameters: none
462: * Return: none
463: **************************************************************/
464: void PLME_MC13192_reset_indication (void)
465: {
Function: PLME_MC13192_reset_indication
Source : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -