Ignore:
Timestamp:
06/07/09 03:21:28 (3 years ago)
Author:
dh8ghh
Message:

FEC in Trunk integriert

Location:
trunk/Software
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Software

  • trunk/Software/RFM12_PHY.c

    r311 r318  
    1010#include "Timer.h" 
    1111#include "ADC.h" 
     12#include "rs.h" 
    1213#include "MenuSetup.h" 
    1314#include "Ressources.h" 
    14  
    1515 
    1616 
     
    233233                switch(_RFM12_PHY_state)  
    234234                { 
    235                 case RFM12_LISTEN: 
    236                         //                      RFM12_RX_LED_on(); 
    237                         //Timer_SetSystemSpeed_Fast(); 
    238                                  
    239                         _RFM12_PHY_state = RFM12_RX; 
    240                 case RFM12_RX:                   
    241                         data = RFM12_fifoRead(); 
    242                         Timer_SetSystemSpeed_Fast(); 
    243                         if(     //!(status & RFM12_RSSI_ATS) ||  
    244                                  
    245                                 RFM12_MAC_receiveCallback(data) )  
    246                         {               // end of frame 
    247                                 RFM12_PHY_modeRX(); 
    248                                 _RFM12_PHY_state = RFM12_LISTEN; 
    249                                 //                                      RFM12_RX_LED_off(); 
    250                         } 
    251                         Timer_SetSystemSpeed_Slow(); 
    252                          
    253                         break; 
    254                 case RFM12_TX: 
    255                         _RFM12_trans(0xB800 | RFM12_MAC_transmitCallback()); 
    256                         break; 
     235            case RFM12_LISTEN: 
     236                //                      RFM12_RX_LED_on(); 
     237                //Timer_SetSystemSpeed_Fast(); 
     238                     
     239                _RFM12_PHY_state = RFM12_RX; 
     240                //CW_Position=2; DEBUG 
     241////                dumppos = 0; 
     242////                txdumppos = 0; 
     243            case RFM12_RX:{ 
     244                Timer_SetSystemSpeed_Slow(RFM_ISR | FORCE); 
     245                data = RFM12_fifoRead(); 
     246                Timer_SetSystemSpeed_Fast(RFM_ISR); 
     247                //dump[dumppos++]=rx_state; 
     248////                dump[dumppos++]=data; 
     249                 
     250                if( RFM12_MAC_receiveCallback(data) )  
     251                {               // end of frame 
     252                    RFM12_PHY_modeRX();         // RFM12 soll wieder auf Sync warten 
     253                    _RFM12_PHY_state = RFM12_LISTEN; 
     254                    //                                  RFM12_RX_LED_off(); 
     255                } 
     256                 
     257                if ((rx_state >= 2) && g_parity_len ==0){ 
     258                    Timer_SetSystemSpeed_Slow(RFM_ISR); 
     259                    // System Speed nur drosseln, wenn gerade keine FEC Dekodierung lÀuft 
     260                } 
     261                break; 
     262            } 
     263            case RFM12_TX:{ 
     264                        _RFM12_trans(0xB800 | RFM12_MAC_transmitCallback()); 
     265//                txdump[txdumppos]= RFM12_MAC_transmitCallback();    //DEBUG 
     266  //              _RFM12_trans(0xB800 | txdump[txdumppos++]); 
     267                break; 
     268            } 
    257269                } 
    258270        } 
Note: See TracChangeset for help on using the changeset viewer.