![]() |
NEORV32 API Reference
The NEORV32 RISC-V Processor
|
General purpose timer (GPTMR) HW driver source file. More...
#include <neorv32.h>Functions | |
| int | neorv32_gptmr_available (void) |
| int | neorv32_gptmr_get_num_slices (void) |
| void | neorv32_gptmr_setup (int prsc) |
| void | neorv32_gptmr_enable_single (int sel) |
| void | neorv32_gptmr_disable_single (int sel) |
| void | neorv32_gptmr_enable_mask (uint16_t mask) |
| void | neorv32_gptmr_disable_mask (uint16_t mask) |
| void | neorv32_gptmr_configure (int sel, uint32_t cnt, uint32_t thr, int mode) |
| int | neorv32_gptmr_irq_get (void) |
| void | neorv32_gptmr_irq_ack (int sel) |
General purpose timer (GPTMR) HW driver source file.
| int neorv32_gptmr_available | ( | void | ) |
Check if general purpose timer unit was synthesized.
| void neorv32_gptmr_configure | ( | int | sel, |
| uint32_t | cnt, | ||
| uint32_t | thr, | ||
| int | mode ) |
Configure timer slice.
| [in] | sel | Timer slice to enable (0..15). |
| [in] | cnt | Initial counter value (32-bit). |
| [in] | thr | Counter threshold value (32-bit). |
| [in] | Mode | Operation mode: 0 = continuous mode, 1 = single-shot mode. |
| void neorv32_gptmr_disable_mask | ( | uint16_t | mask | ) |
Disable multiple GPTMR timer slices.
| [in] | mask | Bit mask, one bit for each slice; bit set = disable slice. |
| void neorv32_gptmr_disable_single | ( | int | sel | ) |
Disable single GPTMR timer slice.
| [in] | sel | Timer slice to disable (0..15). |
| void neorv32_gptmr_enable_mask | ( | uint16_t | mask | ) |
Disable multiple GPTMR timer slices.
| [in] | mask | Bit mask, one bit for each slice; bit set = enable slice. |
| void neorv32_gptmr_enable_single | ( | int | sel | ) |
Disable single GPTMR timer slice.
| [in] | sel | Timer slice to enable (0..15). |
| int neorv32_gptmr_get_num_slices | ( | void | ) |
Get number of implemented GPTMR timer slices.
| void neorv32_gptmr_irq_ack | ( | int | sel | ) |
Clear pending timer interrupt.
| [in] | sel | Timer slice interrupt to acknowledge/clear (0..15); no pending interrupt is cleared if an other value is provided). |
| int neorv32_gptmr_irq_get | ( | void | ) |
Get highest-priority pending interrupt.
| void neorv32_gptmr_setup | ( | int | prsc | ) |
Reset module and configure GPTMR global clock prescaler.
| [in] | prsc | Clock prescaler select (0..7). See NEORV32_CLOCK_PRSC_enum. |