コード例 #1
0
////////////////////////////////////////////////////////////////////////
// net_initialise()
// This function is an entry point from the main() program loop, and
// gives the NET framework an opportunity to initialise itself.
//
void net_initialise(void)
  {
  // I/O configuration PORT C
  TRISC = 0x80; // Port C RC0-6 output, RC7 input
  PORTBbits.RB0 = 1;
  UARTIntInit();

  led_net(0);
  net_reg = 0;
  net_state_enter(NET_STATE_START);
  }
コード例 #2
0
ファイル: user.c プロジェクト: jschisler/pic
void InitApp(void)
{
    /* TODO Initialize User Ports/Peripherals/Project here */

    /* Setup analog functionality and port direction */

    /* Initialize peripherals */
    UARTIntInit();
    
    /*
    Open1USART( USART_TX_INT_ON |
                USART_RX_INT_ON |
                USART_ASYNCH_MODE |
                USART_EIGHT_BIT |
                USART_CONT_RX |
                USART_BRGH_HIGH |
                TX_PRIORITY_ON |
                RX_PRIORITY_ON,
                SPBRG_VAL);
                */
}