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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [demo_twi/] [main.c] - Diff between revs 44 and 48

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

Rev 44 Rev 48
Line 81... Line 81...
  // 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();
 
 
 
 
  // init UART at default baud rate, no parity bits, no rx interrupt, no tx interrupt
  // init UART at default baud rate, no parity bits
  neorv32_uart_setup(BAUD_RATE, 0b00, 0, 0);
  neorv32_uart_setup(BAUD_RATE, 0b00);
 
 
  // check available hardware extensions and compare with compiler flags
  // check available hardware extensions and compare with compiler flags
  neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
  neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
 
 
  // intro
  // intro
Line 102... Line 102...
 
 
  // info
  // info
  neorv32_uart_printf("This program allows to create TWI transfers by hand.\n"
  neorv32_uart_printf("This program allows to create TWI transfers by hand.\n"
                      "Type 'help' to see the help menu.\n\n");
                      "Type 'help' to see the help menu.\n\n");
 
 
  // configure TWI, second slowest clock, no IRQ, no clock-stretching
  // configure TWI, second slowest clock, no clock-stretching
  neorv32_twi_setup(CLK_PRSC_2048, 0, 0);
  neorv32_twi_setup(CLK_PRSC_2048, 0);
 
 
  // no active bus session yet
  // no active bus session yet
  bus_claimed = 0;
  bus_claimed = 0;
 
 
  // Main menu
  // Main menu

powered by: WebSVN 2.1.0

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