コード例 #1
0
/******************************************************************************
* Function name: main
* Description  : Main program function
* Arguments    : none
* Return value : none
******************************************************************************/
void main(void)
{
    /* Used to pace toggling of the LED */
    uint32_t led_counter;
    
    /* Initialize LCD */
    YRDKRX62N_RSPI_Init();
    lcd_initialize();
    
    /* Clear LCD */
    lcd_clear();
    
    /* Display message on LCD */
    lcd_display(LCD_LINE1, "  RENESAS   ");
    lcd_display(LCD_LINE2, " YRDKRX62N  ");

    /* 
        STDOUT is routed through the virtual console window tunneled through the JTAG debugger.
        Open the console window in HEW to see the output 
    */
    printf("This is the debug console\r\n");
    
    /* The three pushbuttons on the YRDK board are tied to interrupt lines, set them up here */
    switches_initialize();
    
    /* This is the main loop.  It does nothing but toggle LED4 periodically */
    while (1)
    {
        for (led_counter = 0; led_counter < 1000000; led_counter++)
        {
        }
        LED4 = ~LED4;
    }
}
コード例 #2
0
ファイル: main_uart.c プロジェクト: andrecurvello/rx62n
/*******************************************************************************
* Outline       : main
* Description   : Main program function. This function first displays on the 
*                 debug LCD; then calls the async initialisation function, which
*                 configures and starts the SCI unit to transmit the numbers 0 to
*                 9 on the terminal untill the character 'z' is typed into the
*                 terminal. Any other key will resume the transfer.
* Argument      : none
* Return value  : none
*******************************************************************************/
void main(void)
{
    /* Initialise the LCD on the RSPI bus */
    YRDKRX62N_RSPI_Init(RSPI_CHANNEL_0);
    InitialiseLCD();

    /* Display instructions onto the LCD */
    DisplayLCD(LCD_LINE1, "Async   ");
    DisplayLCD(LCD_LINE2, "Serial  ");

    /* Initialise the SCI unit for asynchronous operation */
    Init_Async();

    /* Infinite while loop */
    while (1);

}