Line 1... |
Line 1... |
// #################################################################################################
|
// #################################################################################################
|
// # << NEORV32 - TWI Bus Explorer Demo Program >> #
|
// # << NEORV32 - TWI Bus Explorer Demo Program >> #
|
// # ********************************************************************************************* #
|
// # ********************************************************************************************* #
|
// # BSD 3-Clause License #
|
// # BSD 3-Clause License #
|
// # #
|
// # #
|
// # Copyright (c) 2020, Stephan Nolting. All rights reserved. #
|
// # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
|
// # #
|
// # #
|
// # Redistribution and use in source and binary forms, with or without modification, are #
|
// # Redistribution and use in source and binary forms, with or without modification, are #
|
// # permitted provided that the following conditions are met: #
|
// # permitted provided that the following conditions are met: #
|
// # #
|
// # #
|
// # 1. Redistributions of source code must retain the above copyright notice, this list of #
|
// # 1. Redistributions of source code must retain the above copyright notice, this list of #
|
Line 84... |
Line 84... |
|
|
|
|
// init UART at default baud rate, no parity bits, no rx interrupt, no tx interrupt
|
// init UART at default baud rate, no parity bits, no rx interrupt, no tx interrupt
|
neorv32_uart_setup(BAUD_RATE, 0b00, 0, 0);
|
neorv32_uart_setup(BAUD_RATE, 0b00, 0, 0);
|
|
|
|
// check available hardware extensions and compare with compiler flags
|
|
neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
|
|
|
// intro
|
// intro
|
neorv32_uart_printf("\n--- TWI Bus Explorer ---\n\n");
|
neorv32_uart_printf("\n--- TWI Bus Explorer ---\n\n");
|
|
|
|
|
// check if TWI unit is implemented at all
|
// check if TWI unit is implemented at all
|