/******************************************************************* ** main : Main program function ** ******************************************************************** ** In : - ** ** Out : - ** *******************************************************************/ int main (void){ InitMicro(); _Monitor_Init(); _Monitor_SoftBreak; InitRFChip(); // Main Loop while(1){ if(EnableMaster){ OnMaster(); } else{ OnSlave(); } } return 0; }
/* * Main application entry point. */ int main( void ) { Radio = RadioDriverInit( ); Radio->Init( ); Radio->StartRx( ); while( 1 ) { if( EnableMaster == true ) { OnMaster( ); } else { OnSlave( ); } #if( PLATFORM == SX12xxEiger ) && ( USE_UART == 1 ) UartProcess( ); { uint8_t data = 0; if( UartGetChar( &data ) == UART_OK ) { UartPutChar( data ); } } #endif } #ifdef __GNUC__ return 0; #endif }