URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
Subversion Repositories neorv32
Compare Revisions
- This comparison shows the changes necessary to convert path
/neorv32/trunk/sw/lib
- from Rev 51 to Rev 52
- ↔ Reverse comparison
Rev 51 → Rev 52
/include/neorv32.h
424,7 → 424,9
CSR_MISA_A_EXT = 0, /**< CPU misa CSR (0): A: Atomic instructions CPU extension available (r/-)*/ |
CSR_MISA_B_EXT = 1, /**< CPU misa CSR (1): B: Bit manipulation CPU extension available (r/-)*/ |
CSR_MISA_C_EXT = 2, /**< CPU misa CSR (2): C: Compressed instructions CPU extension available (r/-)*/ |
CSR_MISA_D_EXT = 3, /**< CPU misa CSR (3): D: Double-precision floating-point extension available (r/-)*/ |
CSR_MISA_E_EXT = 4, /**< CPU misa CSR (4): E: Embedded CPU extension available (r/-) */ |
CSR_MISA_F_EXT = 5, /**< CPU misa CSR (5): F: Single-precision floating-point extension available (r/-)*/ |
CSR_MISA_I_EXT = 8, /**< CPU misa CSR (8): I: Base integer ISA CPU extension available (r/-) */ |
CSR_MISA_M_EXT = 12, /**< CPU misa CSR (12): M: Multiplier/divider CPU extension available (r/-)*/ |
CSR_MISA_U_EXT = 20, /**< CPU misa CSR (20): U: User mode CPU extension available (r/-)*/ |
507,7 → 509,7
|
|
/**********************************************************************//** |
* Processor clock prescalers |
* Processor clock prescalers select |
**************************************************************************/ |
enum NEORV32_CLOCK_PRSC_enum { |
CLK_PRSC_2 = 0, /**< CPU_CLK (from clk_i top signal) / 2 */ |
931,6 → 933,53
|
|
/**********************************************************************//** |
* @name IO Device: Smart LED Hardware Interface (NEOLED) |
**************************************************************************/ |
/**@{*/ |
/** NEOLED control register (r/w) */ |
#define NEOLED_CT (*(IO_REG32 0xFFFFFFD8UL)) // r/w: control register |
/** NEOLED TX data register (-/w) */ |
#define NEOLED_DATA (*(IO_REG32 0xFFFFFFDCUL)) // -/w: TX data register |
|
/** NEOLED control register bits */ |
enum NEORV32_NEOLED_CT_enum { |
NEOLED_CT_EN = 0, /**< NEOLED control register(0) (r/w): NEOLED global enable */ |
NEOLED_CT_MODE = 1, /**< NEOLED control register(1) (r/w): TX mode (0=24-bit, 1=32-bit) */ |
NEOLED_CT_BSCON = 2, /**< NEOLED control register(2) (r/w): buffer status configuration -> busy_flag/IRQ config (0=at least one free entry, 1=whole buffer empty) */ |
NEOLED_CT_PRSC0 = 3, /**< NEOLED control register(3) (r/w): Clock prescaler select bit 0 (pulse-clock speed select) */ |
NEOLED_CT_PRSC1 = 4, /**< NEOLED control register(4) (r/w): Clock prescaler select bit 1 (pulse-clock speed select) */ |
NEOLED_CT_PRSC2 = 5, /**< NEOLED control register(5) (r/w): Clock prescaler select bit 2 (pulse-clock speed select) */ |
// |
NEOLED_CT_BUFS_0 = 6, /**< NEOLED control register(6) (r/-): log2(tx buffer size) bit 0 */ |
NEOLED_CT_BUFS_1 = 7, /**< NEOLED control register(7) (r/-): log2(tx buffer size) bit 1 */ |
NEOLED_CT_BUFS_2 = 8, /**< NEOLED control register(8) (r/-): log2(tx buffer size) bit 2 */ |
NEOLED_CT_BUFS_3 = 9, /**< NEOLED control register(9) (r/-): log2(tx buffer size) bit 3 */ |
// |
NEOLED_CT_T_TOT_0 = 10, /**< NEOLED control register(10) (r/w): pulse-clock ticks per total period bit 0 */ |
NEOLED_CT_T_TOT_1 = 11, /**< NEOLED control register(11) (r/w): pulse-clock ticks per total period bit 1 */ |
NEOLED_CT_T_TOT_2 = 12, /**< NEOLED control register(12) (r/w): pulse-clock ticks per total period bit 2 */ |
NEOLED_CT_T_TOT_3 = 13, /**< NEOLED control register(13) (r/w): pulse-clock ticks per total period bit 3 */ |
NEOLED_CT_T_TOT_4 = 14, /**< NEOLED control register(14) (r/w): pulse-clock ticks per total period bit 4 */ |
// |
NEOLED_CT_T_ZERO_H_0 = 15, /**< NEOLED control register(15) (r/w): pulse-clock ticks per ZERO high-time bit 0 */ |
NEOLED_CT_T_ZERO_H_1 = 16, /**< NEOLED control register(16) (r/w): pulse-clock ticks per ZERO high-time bit 1 */ |
NEOLED_CT_T_ZERO_H_2 = 17, /**< NEOLED control register(17) (r/w): pulse-clock ticks per ZERO high-time bit 2 */ |
NEOLED_CT_T_ZERO_H_3 = 18, /**< NEOLED control register(18) (r/w): pulse-clock ticks per ZERO high-time bit 3 */ |
NEOLED_CT_T_ZERO_H_4 = 19, /**< NEOLED control register(19) (r/w): pulse-clock ticks per ZERO high-time bit 4 */ |
// |
NEOLED_CT_T_ONE_H_0 = 20, /**< NEOLED control register(20) (r/w): pulse-clock ticks per ONE high-time bit 0 */ |
NEOLED_CT_T_ONE_H_1 = 21, /**< NEOLED control register(21) (r/w): pulse-clock ticks per ONE high-time bit 1 */ |
NEOLED_CT_T_ONE_H_2 = 22, /**< NEOLED control register(22) (r/w): pulse-clock ticks per ONE high-time bit 2 */ |
NEOLED_CT_T_ONE_H_3 = 23, /**< NEOLED control register(23) (r/w): pulse-clock ticks per ONE high-time bit 3 */ |
NEOLED_CT_T_ONE_H_4 = 24, /**< NEOLED control register(24) (r/w): pulse-clock ticks per ONE high-time bit 4 */ |
// |
NEOLED_CT_TX_STATUS = 30, /**< NEOLED control register(30) (r/-): serial transmit engine still busy when set */ |
NEOLED_CT_BUSY = 31 /**< NEOLED control register(31) (r/-): busy / buffer status flag (configured via #NEOLED_CT_BSCON) */ |
}; |
/**@}*/ |
|
|
/**********************************************************************//** |
* @name IO Device: System Configuration Info Memory (SYSINFO) |
**************************************************************************/ |
/**@{*/ |
974,7 → 1023,8
SYSINFO_FEATURES_IO_CFS = 23, /**< SYSINFO_FEATURES (23) (r/-): Custom functions subsystem implemented when 1 (via IO_CFS_EN generic) */ |
SYSINFO_FEATURES_IO_TRNG = 24, /**< SYSINFO_FEATURES (24) (r/-): True random number generator implemented when 1 (via IO_TRNG_EN generic) */ |
SYSINFO_FEATURES_IO_NCO = 25, /**< SYSINFO_FEATURES (25) (r/-): Numerically-controlled oscillator implemented when 1 (via IO_NCO_EN generic) */ |
SYSINFO_FEATURES_IO_UART1 = 26 /**< SYSINFO_FEATURES (26) (r/-): Secondary universal asynchronous receiver/transmitter 1 implemented when 1 (via IO_UART1_EN generic) */ |
SYSINFO_FEATURES_IO_UART1 = 26, /**< SYSINFO_FEATURES (26) (r/-): Secondary universal asynchronous receiver/transmitter 1 implemented when 1 (via IO_UART1_EN generic) */ |
SYSINFO_FEATURES_IO_NEOLED = 27 /**< SYSINFO_FEATURES (27) (r/-): NeoPixel-compatible smart LED interface implemented when 1 (via IO_NEOLED_EN generic) */ |
}; |
|
/**********************************************************************//** |
1017,6 → 1067,7
#include "neorv32_gpio.h" |
#include "neorv32_mtime.h" |
#include "neorv32_nco.h" |
#include "neorv32_neoled.h" |
#include "neorv32_pwm.h" |
#include "neorv32_spi.h" |
#include "neorv32_trng.h" |
/include/neorv32_neoled.h
0,0 → 1,57
// ################################################################################################# |
// # << NEORV32: neorv32_neoled.h - Smart LED Interface (NEOLED) HW Driver >> # |
// # ********************************************************************************************* # |
// # BSD 3-Clause License # |
// # # |
// # Copyright (c) 2021, Stephan Nolting. All rights reserved. # |
// # # |
// # Redistribution and use in source and binary forms, with or without modification, are # |
// # permitted provided that the following conditions are met: # |
// # # |
// # 1. Redistributions of source code must retain the above copyright notice, this list of # |
// # conditions and the following disclaimer. # |
// # # |
// # 2. Redistributions in binary form must reproduce the above copyright notice, this list of # |
// # conditions and the following disclaimer in the documentation and/or other materials # |
// # provided with the distribution. # |
// # # |
// # 3. Neither the name of the copyright holder nor the names of its contributors may be used to # |
// # endorse or promote products derived from this software without specific prior written # |
// # permission. # |
// # # |
// # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS # |
// # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # |
// # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # |
// # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # |
// # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE # |
// # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED # |
// # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # |
// # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # |
// # OF THE POSSIBILITY OF SUCH DAMAGE. # |
// # ********************************************************************************************* # |
// # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting # |
// ################################################################################################# |
|
|
/**********************************************************************//** |
* @file neorv32_neoled.h |
* @author Stephan Nolting |
* @brief Smart LED Interface (NEOLED) HW driver header file. |
* |
* @note These functions should only be used if the NEOLED unit was synthesized (IO_NEOLED_EN = true). |
**************************************************************************/ |
|
#ifndef neorv32_neoled_h |
#define neorv32_neoled_h |
|
// prototypes |
int neorv32_neoled_available(void); |
void neorv32_neoled_setup_raw(uint32_t bs_config, uint32_t prsc, uint32_t t_total, uint32_t t_high_zero, uint32_t t_high_one); |
void neorv32_neoled_setup_ws2812(uint32_t bs_config); |
void neorv32_neoled_enable(void); |
void neorv32_neoled_disable(void); |
void neorv32_neoled_send_polling(uint32_t mode, uint32_t data); |
void neorv32_neoled_send_direct(uint32_t mode, uint32_t data); |
uint32_t neorv32_neoled_get_buffer_size(void); |
|
#endif // neorv32_neoled_h |
/source/neorv32_neoled.c
0,0 → 1,231
// ################################################################################################# |
// # << NEORV32: neorv32_neoled.c - Smart LED Interface (NEOLED) HW Driver >> # |
// # ********************************************************************************************* # |
// # BSD 3-Clause License # |
// # # |
// # Copyright (c) 2021, Stephan Nolting. All rights reserved. # |
// # # |
// # Redistribution and use in source and binary forms, with or without modification, are # |
// # permitted provided that the following conditions are met: # |
// # # |
// # 1. Redistributions of source code must retain the above copyright notice, this list of # |
// # conditions and the following disclaimer. # |
// # # |
// # 2. Redistributions in binary form must reproduce the above copyright notice, this list of # |
// # conditions and the following disclaimer in the documentation and/or other materials # |
// # provided with the distribution. # |
// # # |
// # 3. Neither the name of the copyright holder nor the names of its contributors may be used to # |
// # endorse or promote products derived from this software without specific prior written # |
// # permission. # |
// # # |
// # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS # |
// # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # |
// # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # |
// # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # |
// # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE # |
// # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED # |
// # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # |
// # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # |
// # OF THE POSSIBILITY OF SUCH DAMAGE. # |
// # ********************************************************************************************* # |
// # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting # |
// ################################################################################################# |
|
|
/**********************************************************************//** |
* @file neorv32_neoled.c |
* @author Stephan Nolting |
* @brief Smart LED Interface (NEOLED) HW driver source file. |
* |
* @note These functions should only be used if the NEOLED unit was synthesized (IO_NEOLED_EN = true). |
**************************************************************************/ |
|
#include "neorv32.h" |
#include "neorv32_neoled.h" |
|
|
/**********************************************************************//** |
* Check if NEOLED unit was synthesized. |
* |
* @return 0 if NEOLED was not synthesized, 1 if NEOLED is available. |
**************************************************************************/ |
int neorv32_neoled_available(void) { |
|
if (SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_IO_NEOLED)) { |
return 1; |
} |
else { |
return 0; |
} |
} |
|
|
/**********************************************************************//** |
* Enable and configure NEOLED controller. The NEOLED control register bits are listed in #NEORV32_NEOLED_CT_enum. |
* This function performs a "raw" configuration (just configuraing the according control register bit). |
* |
* @param[in] bs_config Busy flag / IRQ configuration (0 = at least one free entry, 1 = whole buffer empty). |
* @param[in] prsc Clock prescaler select (0..7). See #NEORV32_CLOCK_PRSC_enum. |
* @param[in] t_total Number of pre-scaled clock ticks for total bit period (0..31). |
* @param[in] t_high_zero Number of pre-scaled clock ticks to generate high-time for sending a '0' (0..31). |
* @param[in] t_high_one Number of pre-scaled clock ticks to generate high-time for sending a '1' (0..31). |
**************************************************************************/ |
void neorv32_neoled_setup_raw(uint32_t bs_config, uint32_t prsc, uint32_t t_total, uint32_t t_high_zero, uint32_t t_high_one) { |
|
NEOLED_CT = 0; // reset |
|
// module enable |
uint32_t ct_enable = 1 << NEOLED_CT_EN; |
|
// busy flag / IRQ config |
uint32_t ct_bs_config = (bs_config & 0x1) << NEOLED_CT_BSCON; |
|
// clock pre-scaler |
uint32_t ct_prsc = (prsc & 0x7) << NEOLED_CT_PRSC0; |
|
// serial data output: total period length for one bit |
uint32_t ct_t_total = (t_total & 0x1f) << NEOLED_CT_T_TOT_0; |
|
// serial data output: high-time for sending a '0' |
uint32_t ct_t_zero = (t_high_zero & 0x1f) << NEOLED_CT_T_ZERO_H_0; |
|
// serial data output: high-time for sending a '1' |
uint32_t ct_t_one = (t_high_one & 0x1f) << NEOLED_CT_T_ONE_H_0; |
|
// set new configuration |
NEOLED_CT = ct_enable | ct_bs_config | ct_prsc | ct_t_total | ct_t_zero | ct_t_one; |
} |
|
|
/**********************************************************************//** |
* Configure NEOLED controller for using WS2812 LEDs (NeoPixel-compatible). This function computes |
* all the required timings and finally calls #neorv32_neoled_setup_raw. |
* |
* @note WS2812 timing: T_period = 1.2us, T_high_zero = 0.4us, T_high_one = 0.8us. Change the constants if required. |
* @note This function uses the SYSINFO_CLK value (from the SYSINFO HW module) to do the timing computations. |
* |
* @param[in] bs_config Busy flag / IRQ configuration (0 = at least one free entry, 1 = whole buffer empty). |
**************************************************************************/ |
void neorv32_neoled_setup_ws2812(uint32_t bs_config) { |
|
// WS2812 timing |
const uint32_t T_TOTAL_C = 1200; // ns |
const uint32_t T_H_ZERO_C = 400; // ns |
const uint32_t T_H_ONE_C = 800; // ns |
|
// processor clock pre-scalers |
const uint32_t CLK_PRSC_FACTOR_LUT[8] = {2, 4, 8, 64, 128, 1024, 2048, 4096}; |
|
// get base clock period in multiples of 0.5ns |
uint32_t t_clock_x500ps = (2 * 1000 * 1000 * 1000) / SYSINFO_CLK; |
|
// compute LED interface timing parameters |
uint32_t t_base = 0; |
uint32_t t_total = 0; |
uint32_t t_high_zero = 0; |
uint32_t t_high_one = 0; |
uint32_t clk_prsc_sel = CLK_PRSC_2; // initial prsc = CLK/2 |
uint32_t clk_prsc_fac = 0; // corresponding clock scaling factor |
|
//neorv32_uart0_printf("\nNEOLED.T_clk: %u x 500ps\n", t_clock_x500ps); // DEBUG |
|
while (clk_prsc_sel < 7) { |
clk_prsc_fac = CLK_PRSC_FACTOR_LUT[clk_prsc_sel & 7]; |
|
//neorv32_uart0_printf("NEOLED.clk_prsc: %u\n", clk_prsc_fac); // DEBUG |
|
t_base = t_clock_x500ps * clk_prsc_fac; |
|
//neorv32_uart0_printf("NEOLED.t_base: %u x 0.5ns\n", t_base); // DEBUG |
|
// compute bit period and high-times for sending a 0 or 1 |
t_total = (2*T_TOTAL_C) / t_base; |
t_high_zero = (2*T_H_ZERO_C) / t_base; |
t_high_one = (2*T_H_ONE_C) / t_base; |
|
//neorv32_uart0_printf("NEOLED.t_total: %u\n", t_total); // DEBUG |
//neorv32_uart0_printf("NEOLED.t_high_zero: %u\n", t_high_zero); // DEBUG |
//neorv32_uart0_printf("NEOLED.t_high_one: %u\n", t_high_one); // DEBUG |
|
if ((t_base == 0) || (t_total >= 32) || (t_high_zero == 0) || (t_high_one == 0)) { // out of range or invalid resolution |
clk_prsc_sel++; // try next-higher clock prescaler |
} |
else { |
break; |
} |
} |
|
// set raw configuration |
neorv32_neoled_setup_raw(bs_config, clk_prsc_sel, t_total, t_high_zero, t_high_one); |
} |
|
|
/**********************************************************************//** |
* Enable NEOLED controller. |
**************************************************************************/ |
void neorv32_neoled_enable(void) { |
|
NEOLED_CT |= ((uint32_t)(1 << NEOLED_CT_EN)); |
} |
|
|
/**********************************************************************//** |
* Disable NEOLED controller. |
**************************************************************************/ |
void neorv32_neoled_disable(void) { |
|
NEOLED_CT &= ~((uint32_t)(1 << NEOLED_CT_EN)); |
} |
|
|
/**********************************************************************//** |
* Send single data word to NEOLED module. |
* |
* @warning This function is blocking as it polls the NEOLED busy flag. |
* |
* @param[in] mode 0 = 24-bit mode (RGB), 1 = 32-bit mode (RGBW) |
* @param[in] data 24-bit RGB or 32-bit RGBW data |
**************************************************************************/ |
void neorv32_neoled_send_polling(uint32_t mode, uint32_t data) { |
|
while(NEOLED_CT & (1 << NEOLED_CT_BUSY)); // wait for busy flag to clear |
|
neorv32_neoled_send_direct(mode, data); |
} |
|
|
/**********************************************************************//** |
* Send single data word to NEOLED module. |
* |
* @warning This function used NO busy checks at all! |
* @note This function can be called several times in a row to fill the TX buffer (when busy_flag is cleared and bscon = 1). |
* |
* @param[in] mode 0 = 24-bit mode (RGB), 1 = 32-bit mode (RGBW) |
* @param[in] data 24-bit RGB or 32-bit RGBW data |
**************************************************************************/ |
void neorv32_neoled_send_direct(uint32_t mode, uint32_t data) { |
|
// configure TX mode (data size) |
uint32_t ctrl = NEOLED_CT; |
ctrl &= ~(0b1 << NEOLED_CT_MODE); // clear current mode |
ctrl |= ((mode & 1) << NEOLED_CT_MODE); // set new mode |
NEOLED_CT = ctrl; |
|
NEOLED_DATA = data; // send new LED data |
} |
|
|
/**********************************************************************//** |
* Get NEOLED hardware buffer size. |
* |
* @return Number of entries in NEOLED TX buffer. |
**************************************************************************/ |
uint32_t neorv32_neoled_get_buffer_size(void) { |
|
uint32_t tmp = NEOLED_CT; |
tmp = tmp >> NEOLED_CT_BUFS_0; |
tmp = tmp & 0b1111; // insulate buffer size flags |
|
return (1 << tmp); // num entries = pow(2, buffer size flags) |
} |
/source/neorv32_rte.c
55,6 → 55,14
|
|
/**********************************************************************//** |
* Floating-Point extension notifier. |
**************************************************************************/ |
#ifdef __riscv_flen |
#warning Floating-point extension <F> is WORK-IN-PROGRESS and NOT FULLY OPERATIONAL yet! |
#endif |
|
|
/**********************************************************************//** |
* Setup NEORV32 runtime environment. |
* |
* @note This function installs a debug handler for ALL exception and interrupt sources, which |
431,38 → 439,41
|
tmp = SYSINFO_FEATURES; |
|
neorv32_uart_printf("GPIO - "); |
neorv32_uart_printf("GPIO - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_GPIO)); |
|
neorv32_uart_printf("MTIME - "); |
neorv32_uart_printf("MTIME - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_MTIME)); |
|
neorv32_uart_printf("UART0 - "); |
neorv32_uart_printf("UART0 - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_UART0)); |
|
neorv32_uart_printf("UART1 - "); |
neorv32_uart_printf("UART1 - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_UART1)); |
|
neorv32_uart_printf("SPI - "); |
neorv32_uart_printf("SPI - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_SPI)); |
|
neorv32_uart_printf("TWI - "); |
neorv32_uart_printf("TWI - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_TWI)); |
|
neorv32_uart_printf("PWM - "); |
neorv32_uart_printf("PWM - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_PWM)); |
|
neorv32_uart_printf("WDT - "); |
neorv32_uart_printf("WDT - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_WDT)); |
|
neorv32_uart_printf("TRNG - "); |
neorv32_uart_printf("TRNG - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_TRNG)); |
|
neorv32_uart_printf("CFS - "); |
neorv32_uart_printf("CFS - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFS)); |
|
neorv32_uart_printf("NCO - "); |
neorv32_uart_printf("NCO - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_NCO)); |
|
neorv32_uart_printf("NEOLED - "); |
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_NEOLED)); |
} |
|
|
644,6 → 655,10
misa_cc |= 1 << CSR_MISA_C_EXT; |
#endif |
|
#if (__riscv_flen == 64) |
misa_cc |= 1 << CSR_MISA_D_EXT; |
#endif |
|
#ifdef __riscv_32e |
misa_cc |= 1 << CSR_MISA_E_EXT; |
#else |
650,6 → 665,10
misa_cc |= 1 << CSR_MISA_I_EXT; |
#endif |
|
#if (__riscv_flen == 32) |
misa_cc |= 1 << CSR_MISA_F_EXT; |
#endif |
|
#ifdef __riscv_mul |
misa_cc |= 1 << CSR_MISA_M_EXT; |
#endif |
/source/neorv32_spi.c
89,7 → 89,7
|
|
/**********************************************************************//** |
* Disable and SPI controller. |
* Disable SPI controller. |
**************************************************************************/ |
void neorv32_spi_disable(void) { |
|