OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [blink_led/] [main.c] - Diff between revs 60 and 61

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 60 Rev 61
Line 77... Line 77...
  neorv32_uart_setup(BAUD_RATE, PARITY_NONE, FLOW_CONTROL_NONE);
  neorv32_uart_setup(BAUD_RATE, PARITY_NONE, FLOW_CONTROL_NONE);
 
 
  // check if GPIO unit is implemented at all
  // check if GPIO unit is implemented at all
  if (neorv32_gpio_available() == 0) {
  if (neorv32_gpio_available() == 0) {
    neorv32_uart_print("Error! No GPIO unit synthesized!\n");
    neorv32_uart_print("Error! No GPIO unit synthesized!\n");
    return 0; // nope, no GPIO unit synthesized
    return 1; // nope, no GPIO unit synthesized
  }
  }
 
 
  // capture all exceptions and give debug info via UART
  // capture all exceptions and give debug info via UART
  // this is not required, but keeps us safe
  // this is not required, but keeps us safe
  neorv32_rte_setup();
  neorv32_rte_setup();
 
 
  // check available hardware extensions and compare with compiler flags
 
  neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
 
 
 
  // say hello
  // say hello
  neorv32_uart_print("Blinking LED demo program\n");
  neorv32_uart_print("Blinking LED demo program\n");
 
 
 
 
// use ASM version of LED blinking (file: blink_led_in_asm.S)
// use ASM version of LED blinking (file: blink_led_in_asm.S)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.