亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? psocradio.asm

?? CYRF6936 zigbee模塊設(shè)計的全部資料
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
.section
;--------------------------------------------------------------------------------
;
; RadioSetPtr:     Set the buffer pointer address for RadioBurstRead,
;                  RadioFileRead, RadioBurstWrite and RadioFileWrite functions.
;
; 'C' Call:        void RadioSetPtr(unsigned char ramPtr);
;
_RadioSetPtr::     MOV     [RadioPtr], X
                   RET

.endsection
.section
;--------------------------------------------------------------------------------
;
; RadioSetLength:  Set the buffer length for RadioBurstRead & RadioFileRead.
;
; 'C' Call:        void RadioSetLength(unsigned char length);
;
_RadioSetLength::  MOV     [RadioLen], A
                   RET

.endsection
.section
;--------------------------------------------------------------------------------
;
; RadioBurstWriteWip:
;                  Write a sequence of bytes to a sequence of Radio registers.
;                  This, like all the WIP versions of the file read and write
;                  functions uses RadioWipPtr instead of RadioPtr as the data pointer.                   
;
; Assembly Call:   RadioWipPtr: Address of buffer to write.
;                  A: The register number to write.
;                     (Top two bits MUST be clear.)
;                  X: Length of the buffer.
;
; Assembly Return: A: Undefined
;                  X: Undefined
;
 RadioBurstWriteWip::
                   OR      A, bSPI_AUTO_INC            ; Set the increment flag.
                   JMP     RadioFileWriteWip

;--------------------------------------------------------------------------------
;
; RadioBurstWrite: Write a sequence of bytes to a sequence of Radio registers.
;
; 'C' Call:        void RadioBurstWrite(unsigned char regAddr, unsigned char cnt);
;                  (Must set RadioPtr by calling RadioSetPtr prior to RadioBurstWrite.)
;                  
; Assembly Call:   RadioPtr: Address of buffer to write.
;                  A: The register number to write.
;                     (Top two bits MUST be clear.)
;                  X: Length of the buffer.
;
; Assembly Return: A: Undefined
;                  X: Undefined
;
 RadioBurstWrite::
_RadioBurstWrite:: OR      A, bSPI_AUTO_INC            ; Set the increment flag.

;--------------------------------------------------------------------------------
;
; RadioFileWrite:  Write a sequence of bytes to a single Radio register.
;
; 'C' Call:        void RadioFileWrite(LS_REG_ADDR regAddr, BYTE cnt);
;                  (Must set RadioPtr by calling RadioSetPtr prior to RadioFileWrite.)
;
; Assembly Call:   RadioPtr: Address of buffer to write.
;                  A: The register number to write.
;                     (Top two bits MUST be clear.)
;                  X: Length of the buffer.
;
; Assembly Return: A: Undefined
;                  X: Undefined
;
; TODO:            Remove Empty/Complete race and IRQ disable.
;
 RadioFileWrite::
_RadioFileWrite::  MOV     [RadioWipPtr], [RadioPtr]   ; Copy the buffer pointer.
 RadioFileWriteWip::
                   DEC     X                           ; If the length is zero
                   JC      .Done                       ;  do nothing at all.
                   CLEAR_TEMP_IE                       ; Disable global IRQ for this function.
                   OR      A, bSPI_WRITE               ; Set the write flag. 
                   AND     REG[LP_nSS_Data_ADDR],~LP_nSS_MASK
                                                       ; Assert Radio Select.
                   MOV     REG[SPIM_Radio_TX_BUFFER_REG],A

.Burst:            MVI     A,[RadioWipPtr]             ; Get the data.
.WaitLoop8:        TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_TX_BUFFER_EMPTY
                   JZ      .WaitLoop8
                   MOV     REG[SPIM_Radio_TX_BUFFER_REG],A
                   DEC     X
                   JNC     .Burst
;
; All done bursting, wait for the last byte to leave the holding register.
;                                                       
.Burst0:           TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_TX_BUFFER_EMPTY
                   JZ      .Burst0
;                    
; Wait for the shifting to complete and the SPI transaction to finish.
;
.WaitComp:         TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_SPI_COMPLETE
                   JZ      .WaitComp
                   OR      REG[LP_nSS_Data_ADDR],LP_nSS_MASK
                                                       ; Deassert the Slave Select
.Done:             RET_RESTORE_IE_THROUGH_X

.endsection
.section
;--------------------------------------------------------------------------------
;
; RadioBurstReadWip:
;                  Read a sequence of bytes from a sequence of Radio registers
;                  using RadioWipPtr as the buffer pointer.
;
; Assembly Call:   RadioWipPtr: Address of buffer to read.
;                  A: The register number to write.
;                     (Top two bits MUST be clear.)
;                  X: Length of the buffer.
;
; Assembly Return: A: Undefined
;                  X: Undefined
;
 RadioBurstReadWip::
                   OR      A,bSPI_AUTO_INC             ; Set the increment flag.
                   JMP     RadioFileReadWip

.endsection
.section
;--------------------------------------------------------------------------------
;
; RadioBurstRead:  Read a sequence of bytes from a sequence of Radio registers.
;
; 'C' Call:        void RadioBurstRead(unsigned char cnt);
;                  (Must set RadioPtr by calling RadioSetPtr prior to RadioBurstRead.)
;                  
; Assembly Call:   RadioPtr: Address of buffer to read.
;                  A: The register number to write.
;                     (Top two bits MUST be clear.)
;                  X: Length of the buffer.
;
; Assembly Return: A: Undefined
;                  X: Undefined
;
 RadioBurstRead::
_RadioBurstRead::  OR    A,bSPI_AUTO_INC               ; Set the increment flag.

;--------------------------------------------------------------------------------
;
; RadioFileRead:   Read a sequence of bytes from a single Radio registers.
;
;                      time->           |8spiclk|8spiclk|8spiclk|
;                  Assert Slave Select  |       |       |       |
;                  Write Address        |       |       |       |
;                  Wait for Empty(1)----+       |       |       |
;                  Write Nul Data               |       |       |
;                  Wait for Empty(2)------------+       |       |
;                  Write Nul Data                       |       |
;                  Read Nul Data                        |       |
;                  Wait for Empty(3)--------------------+       |
;                  Write Nul Data                               |
;                  Read Data                                    |
;                  Wait for Empty and complete------------------+
;                  Read Data
;                  De-assert Slave Select
;
;                  As it stands the main loop of this routine is a littler
;                  slower than it should be. With a 12MHz CPU the burst is not
;                  always continuous. There are occasionally gaps between bytes
;                  in the burst. It should be possible to correct this, but it
;                  is a minor problem and this is already pretty convoluted
;                  to deal with the latency caused by the TX and RX holding
;                  buffers.
;
;                  This routine properly handles all cases of length including
;                  zero and one. 
;
; 'C' Call:        (Must set RadioPtr and RadioLen by calling RadioSetPtr prior
;                  to RadioFileRead.)
;                  void RadioFileRead(unsigned char regAddr, unsigned char cnt);
;
; Assembly Call:   RadioPtr: Address of buffer to read.
;                  RadioLen: Size of buffer
;                  A: The register number to write.
;                     (Top two bits MUST be clear.)
;                  X: Length of the buffer.
;
; Assembly Return: A: Undefined
;                  X: Undefined
;
 RadioFileRead::
_RadioFileRead::   MOV     [RadioWipPtr], [RadioPtr]     ; Initialize working pointer
                   MOV     [RadioWipLen], [RadioLen]     ;  and length.
 RadioFileReadWip::DEC     X                             ; Check for zero length case.
                   JC      .Done                         ; If zero, nothing to do.
                   CLEAR_TEMP_IE                         ; Disable global IRQ for this function.
;
; At this point X is the number of bytes in the file read -1. This last one needs
;  to be handled specially by waiting for COMPLETE instead of EMPTY - that is done
;  below at .LastByte.
;
                   AND     REG[LP_nSS_Data_ADDR],~LP_nSS_MASK ; Assert Radio Select.
                   MOV     REG[SPIM_Radio_TX_BUFFER_REG],A ; Write the SPI address.
;
; For speed we are going to use the SP as our data point to write data into the buffer.
;  This would not be possible if interrupts were not disabled. Swap SP<->RadioWipPtr.
;  (PUSH A is 6 cycles faster than MVI).
;
                   SWAP    A, SP
                   SWAP    [RadioWipPtr], A
                   SWAP    A, SP
                   
.WaitLoop1:        TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_TX_BUFFER_EMPTY
                   JZ      .WaitLoop1
                   MOV     REG[SPIM_Radio_TX_BUFFER_REG],A ; Write null data.
;
; We need to get three items set up for this execution of the routine and the next as
;  well based on whether there is room in the buffer.
;                                      bytes to read(X) - space in buffer(RadioWipLen)
;                                          C (RadioWipLen>X)  NC (RadioWipLen<=X)
;------------------------------------------------------------------------------------
; Reads that fit in buffer : X             = X                = RadioWipLen
; Reads thrown away        : RadioSpiTemp  = 0                = X-RadioWipLen
; Bytes left in buffer     : RadioWipLen   = RadioWipLen-X    = 0
;                                                         
                   MOV     A, X
                   SUB     A, [RadioWipLen]
;
; This test does not affect C.
;                   
.WaitLoop2:        TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_TX_BUFFER_EMPTY
                   JZ      .WaitLoop2
                                                         ; Throw (address phase) data away .
                   JNC     .1
                   MOV     [RadioSpiTemp], 0
                   MOV     A, X
                   SUB     [RadioWipLen], A
                   JMP     .BurstBottom
;
; A contains the number of bytes we are going to move -1. We need to subtract the total
;  number of bytes which is A+1.
;
.1:                MOV     [RadioSpiTemp], A
                   MOV     X, [RadioWipLen]
                   MOV     [RadioWipLen], 0
                   JMP     .BurstBottom

                        
.BurstLoop1:       MOV     REG[SPIM_Radio_TX_BUFFER_REG],A        
                                                         ; Write null data.
.WaitLoop3:        TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_TX_BUFFER_EMPTY
                   JZ      .WaitLoop3
                   MOV     A,REG[SPIM_Radio_RX_BUFFER_REG]
                                                         ; Get data.
                   PUSH    A                             ;  write the data.
                        
.BurstBottom:      DEC     X                             ; Count
                   JNC     .BurstLoop1                   ; Repeat

;
; We've moved all the data we have room for in the buffer. Do we need to pull any
;  extra data from the register that we are not going to store? If so, the count
;  is in RadioSpiTemp
;                   
                   MOV     X, [RadioSpiTemp]
                   JMP     .BurstBottom2
.BurstLoop2:       MOV     REG[SPIM_Radio_TX_BUFFER_REG],A        
.WaitLoop4:        TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_TX_BUFFER_EMPTY
                   JZ      .WaitLoop4
.BurstBottom2:     DEC     X
                   JNC     .BurstLoop2              
;
; Moved moved all the data except for one last byte. Wait for it and if we have room
;  in the buffer, go get it and store it.
;
.LastByte:         TST     REG[SPIM_Radio_CONTROL_REG],SPIM_Radio_SPIM_SPI_COMPLETE
                   JZ      .LastByte
                   CMP     [RadioWipLen], 0
                   JZ      .Done2
                   
                   MOV     A,REG[SPIM_Radio_RX_BUFFER_REG] ; Get the data 
                   PUSH    A                             ;    and save it.
                   DEC     [RadioWipLen]
                        
.Done2:            OR      REG[LP_nSS_Data_ADDR],LP_nSS_MASK ; Deassert the Slave Select

;
; Swap back SP<->RadioWipPtr.
;
                   SWAP    A, SP
                   SWAP    [RadioWipPtr], A
                   SWAP    A, SP
                   
.Done:             RET_RESTORE_IE_THROUGH_X              ; Restore IRQ state.
.endsection

;
; Re-enable code compression.
;
                   ENABLE_CODE_COMPRESSION

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩久久久久久| 激情小说欧美图片| 国产乱色国产精品免费视频| 成人黄色网址在线观看| 欧美另类一区二区三区| 中文字幕在线不卡视频| 美女在线观看视频一区二区| 色综合久久精品| 国产亚洲精品资源在线26u| 午夜精品久久久久久| www.爱久久.com| 久久蜜桃av一区精品变态类天堂 | 91精品国产福利| 欧美国产日本视频| 美日韩一区二区三区| 欧美中文字幕一区| 成人h版在线观看| 欧美日韩电影在线播放| 中文字幕一区二区三区四区不卡| 日韩高清一区在线| 在线观看视频一区二区欧美日韩| 国产夜色精品一区二区av| 蜜桃精品视频在线观看| 精品视频在线视频| 亚洲精品国产高清久久伦理二区| 国产美女精品人人做人人爽| 日韩欧美国产综合一区| 视频一区二区欧美| 欧美三级视频在线播放| 亚洲精品美腿丝袜| 一本到不卡免费一区二区| 国产精品国产精品国产专区不蜜| 国产一区二区三区四区五区入口 | 婷婷成人激情在线网| 欧美偷拍一区二区| 亚洲一区二区高清| 欧美亚洲一区三区| 亚洲国产日韩在线一区模特| 99久久免费视频.com| 国产精品成人午夜| 色乱码一区二区三区88| 亚洲精品水蜜桃| 欧美在线视频全部完| 午夜电影一区二区| 日韩一区二区三区免费看 | 欧美精品三级在线观看| 日韩电影在线一区二区| 欧美成人精品1314www| 九九国产精品视频| 久久久久久久久久久久久久久99| 国产盗摄一区二区| 日韩理论在线观看| 欧美亚洲图片小说| 久久99精品久久久久久| 久久久五月婷婷| 94色蜜桃网一区二区三区| 一二三四社区欧美黄| 91精品国产一区二区三区| 国产一区二区三区黄视频 | 一区二区视频免费在线观看| 欧美日韩免费一区二区三区视频| 日韩国产一二三区| 久久蜜桃香蕉精品一区二区三区| av中文字幕不卡| 视频一区欧美精品| 中文字幕乱码久久午夜不卡| 在线欧美一区二区| 狠狠色2019综合网| 亚洲精品国产成人久久av盗摄| 欧美日韩在线电影| 国产精品原创巨作av| 亚洲免费伊人电影| 精品国产精品网麻豆系列| 91在线观看成人| 久久精品国内一区二区三区| 欧美国产日韩在线观看| 欧美亚一区二区| 国产成人综合自拍| 五月婷婷久久丁香| 中文字幕一区二区不卡| 欧美一区二区三区在线电影| 99久久精品情趣| 美女脱光内衣内裤视频久久网站| 国产精品国产a级| 欧美v国产在线一区二区三区| 成人18视频日本| 麻豆免费精品视频| 一区二区三区欧美日| 亚洲国产成人在线| 精品国产污污免费网站入口 | 国产成人av电影| 蜜臀av性久久久久av蜜臀妖精| 国产精品久久久久久久久免费樱桃| 欧美高清一级片在线| 91麻豆国产在线观看| 国产一区二区免费视频| 日韩电影在线观看网站| 亚洲精品久久久蜜桃| 久久久精品免费免费| 日韩欧美一二区| 在线不卡一区二区| 欧美日韩免费在线视频| 色偷偷成人一区二区三区91| 成人高清视频在线观看| 国产中文字幕一区| 久久精品国产精品亚洲红杏 | 欧美亚州韩日在线看免费版国语版| 成人视屏免费看| 美女脱光内衣内裤视频久久影院| 亚洲小说欧美激情另类| 一区二区激情视频| 亚洲综合另类小说| 亚洲丶国产丶欧美一区二区三区| 国产欧美日韩亚州综合| 久久综合九色综合久久久精品综合| 7799精品视频| 欧美一区二区福利视频| 日韩限制级电影在线观看| 91精品国产福利在线观看| 日韩亚洲电影在线| 26uuu精品一区二区 | 欧美一区二区三区视频| 6080国产精品一区二区| 在线不卡免费欧美| 日韩一区二区视频| 2019国产精品| 亚洲国产成人一区二区三区| 综合精品久久久| 亚洲午夜激情网站| 免费成人在线影院| 国产一区二区不卡在线| 国产美女久久久久| 成人福利视频在线看| 99国产精品99久久久久久| 欧美影院精品一区| 欧美一卡2卡3卡4卡| 国产视频911| 亚洲人成精品久久久久| 午夜欧美一区二区三区在线播放| 日韩国产精品91| 国模套图日韩精品一区二区 | 国产香蕉久久精品综合网| 国产欧美日韩不卡免费| 一区二区三区在线视频免费观看| 亚洲精品综合在线| 男女性色大片免费观看一区二区 | 欧美一区二区三区在线| 久久久不卡网国产精品二区| 亚洲欧洲三级电影| 日精品一区二区三区| 国产激情精品久久久第一区二区| 99精品久久只有精品| 777亚洲妇女| 国产精品日韩成人| 日韩av一级片| 成人午夜激情片| 91精品国产高清一区二区三区蜜臀| 久久久亚洲精品石原莉奈| 亚洲亚洲精品在线观看| 国产精品亚洲第一区在线暖暖韩国| 色综合一个色综合| 久久九九国产精品| 五月综合激情网| 92国产精品观看| 精品久久久影院| 亚洲最新视频在线播放| 国产精品资源网| 日韩一二三区不卡| 一区二区三区日韩| 丁香六月综合激情| 日韩一区二区三区四区五区六区| 国产精品久久免费看| 激情综合色丁香一区二区| 欧美在线视频日韩| 亚洲视频免费在线观看| 国内成人自拍视频| 91精品国产欧美一区二区成人 | 久久色视频免费观看| 亚洲国产成人porn| 91理论电影在线观看| 久久精品视频一区二区三区| 日本午夜精品视频在线观看| 91麻豆免费看| 国产精品福利一区二区三区| 国产综合久久久久影院| 欧美一区二区三区在线视频| 亚洲国产日韩a在线播放性色| 成人av电影在线观看| 久久先锋影音av| 久久精品国产网站| 欧美老肥妇做.爰bbww视频| 一区二区成人在线视频| 一本在线高清不卡dvd| 国产精品久久久久桃色tv| 国产一区二区精品久久99| 欧美成人官网二区| 国内精品国产三级国产a久久| 欧美精品xxxxbbbb| www.亚洲在线| 美日韩黄色大片|