📄 readme.txt
字号:
/******************************************************************************/
project name: lc_odu_zte
hardware base: 15G lc odu
fuction: the application software for BB
author: wang.ping
version: 1.001
beginning data: October 20th in 2007
accomplish data: January 31th,2008
/******************************************************************************/
/******************************************************************************/
Head files:
board.h: the definition of the signals on the board.
defines.h: the definition of all global defines
vars.h : declare all the global parameters
hardctrl.h: declare the extern functions in lcodu_hardctrl.c
usart.h : declare the extern functions in lcodu_msg.c
spi.h : declare the extern functions in lcodu_spi.c
/******************************************************************************/
/******************************************************************************/
Source files:
cstartup.s79 : Generic CStartup for IAR No Use REMAP
interrupt.s79 : MSR Read and Write
lcodu_cstart.c: Low level initializations written in C for Tools
lcodu_hardctrl.c: execute hardware actions (set attenuation,mute,write flash,
read flash,ect. )
lcodu_init.c : initiate mcu(timer0,timer1,pio,irq,usart0,usart1,adc and RTT)
lcodu_interrupt.c: all the interrupt service routines are here(timer0,timer1,
irq0,irq1,usart0,usart1,adc)
lcodu_msg.c : handle the usart communications,including searching frames,
unpacking frames,crc cheching,crc calculating,getting commands,
handling commands,packing messages,loading frames,sending
frames,and transfering the receiving and translating messages
to the other USART port.
lcodu_spi.c : The operation about SPI port.Including SPI initiation,TX/RX RF
PLL initiation and DAC control.
There are two different types of PLL,and their initiation and
control routines differs.
lcodu_main.c : odu initiation and running control which handled in main loop,
and main fuction.
/******************************************************************************/
/******************************************************************************/
functions in lcodu_hardctrl.c:
//*-----------------------------------------------------------------------------
//* Function Name : AT91F_Flash_Init
//* Object : flash initiation
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none.
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : at91f_flash_ready
//* Object : Wait the flash ready.Reset flash if the waiting time
exceding the deadline.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : status:the status of the flash.
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : at91f_flash_write
//* Object : Write in one or two Flash page located in AT91C_IFLASH,
//* size in 32 bits
//* autor : wang ping
//* Input Parameters : Flash_Address: start at 0x0010 0000;
size: in byte,less than 256 bytes
//* buff:the bytes to be write to flash
//* Output Parameters : ture:write correctly; false:error happens..
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : at91f_flash_read
//* Object : Read data located in AT91C_IFLASH, size in 8 bits
//* autor : wang ping
//* Input Parameters : Flash_Address: start at 0x0010 0000;
size: in byte,less than 256 bytes
//* buff:the bytes got from the flash
//* Output Parameters : true.
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : reset_pro
//* Object : reset the flash
//* autor : wang ping
//* Input Parameters : c=1:software reset; c=0:hardware reset
//* Output Parameters : none.
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : set_att
//* Object : set the attenuation
//* autor : wang ping
//* Input Parameters : chn=1:set att1; chn=0:set att0
//* : att(0~31),the attenuation value
//* Output Parameters : 0:the attenuation was set correctly;
//* others:something unexpected taken place.
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : set_mute
//* Object : set the tx rf muted or unmuted
//* autor : wang ping
//* Input Parameters : v=1(TX_MUTED),mute the tx rf
//* : v=0(TX_NOTMUTED),unmute the tx rf
//* Output Parameters : 0:the attenuation was set correctly;
//* others:v is invalidity
//*-----------------------------------------------------------------------------
/******************************************************************************/
/******************************************************************************/
functions in lcodu_init.c:
//*-----------------------------------------------------------------------------
//* Function Name : ADC_int
//* Object : initiate the ADC device.Using PDC and interrupt.
//* : And initiate TC2.TC2 is the trigger,Auto mode.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : IRQ_int
//* Object : initiate IRQ interrupts,IRQ0 is TX RF PLL alarm interrupt
//* : IRQ1 is RX RF PLL alarm interrupt.Negative edge trige.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : TC_int
//* Object : initiate TC0 and TC1.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : US_int
//* Object : initiate US0 and US1.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : init_pio
//* Object : initiate PIO,enable PIO clock.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : initiation
//* Object : initiate RTT.And it's the entrance of the initiation
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
/******************************************************************************/
/******************************************************************************/
functions in lcodu_interrupt.c:
//*-----------------------------------------------------------------------------
//* Function Name : timer0_c_irq_handler
//* Object : Timer0 interrupt service routine,8ms,
//* used for rssi reporting
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : timer1_c_irq_handler
//* Object : Timer1 interrupt service routine,
//* used for cheching the TX input alarm
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : US0_c_irq_handler
//* Object : USART0 interrupt service routine,
//* reset the DMA buffer pointer.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : US1_c_irq_handler
//* Object : USART1 interrupt service routine,
//* reset the DMA buffer pointer.
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : ADC_c_irq_handler
//* Object : ADC interrupt service routine,
//* reset the ADC DMA buffer pointer.
//* calculate the average value of the 16 converts of each
//* channel
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : IRQ0_c_irq_handler
//* Object : tx synthlock alarm
//* negative edge trige
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
//* Function Name : IRQ1_c_irq_handler
//* Object : rx synthlock alarm
//* negative edge trige
//* autor : wang ping 29/10/2007
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
/******************************************************************************/
/******************************************************************************/
functions in lcodu_msg.c:
//*-----------------------------------------------------------------------------
//* Function Name : send_msg_USART0
//* Object : send the newly loaded messages stored in us0_send_dma[].
//* send_point is to memory the pointer of the first byte
//* to be sended. tx_wr_pt is to memory the writing pointer
//* of the us0_send_dma[]
//* autor : wang ping
//* Input Parameters : none
//* Output Parameters : none
//*-----------------------------------------------------------------------------
//*-----------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -