Skip to content

Commit

Permalink
Make rtic-monotonic macros create a public type
Browse files Browse the repository at this point in the history
  • Loading branch information
korken89 committed Jun 2, 2024
1 parent d06c6ee commit 689c4a0
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
6 changes: 6 additions & 0 deletions rtic-monotonics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!

## Unreleased

## v2.0.1 - 2024-06-02

### Changed

- Make monotonics created with their respective macros public

## v2.0.0 - 2024-05-29

### Changed
Expand Down
2 changes: 1 addition & 1 deletion rtic-monotonics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rtic-monotonics"
version = "2.0.0"
version = "2.0.1"

edition = "2021"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion rtic-monotonics/src/imxrt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ macro_rules! __internal_create_imxrt_timer_interrupt {
macro_rules! __internal_create_imxrt_timer_struct {
($name:ident, $mono_backend:ident, $timer:ident, $tick_rate_hz:expr) => {
/// A `Monotonic` based on the GPT peripheral.
struct $name;
pub struct $name;

impl $name {
/// Starts the `Monotonic`.
Expand Down
2 changes: 1 addition & 1 deletion rtic-monotonics/src/nrf/rtc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ macro_rules! __internal_create_nrf_rtc_interrupt {
macro_rules! __internal_create_nrf_rtc_struct {
($name:ident, $mono_backend:ident, $timer:ident) => {
/// A `Monotonic` based on the nRF RTC peripheral.
struct $name;
pub struct $name;

impl $name {
/// Starts the `Monotonic`.
Expand Down
2 changes: 1 addition & 1 deletion rtic-monotonics/src/nrf/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ macro_rules! __internal_create_nrf_timer_interrupt {
macro_rules! __internal_create_nrf_timer_struct {
($name:ident, $mono_backend:ident, $timer:ident, $tick_rate_hz:expr) => {
/// A `Monotonic` based on the nRF Timer peripheral.
struct $name;
pub struct $name;

impl $name {
/// Starts the `Monotonic`.
Expand Down
2 changes: 1 addition & 1 deletion rtic-monotonics/src/rp2040.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl TimerQueueBackend for TimerBackend {
macro_rules! rp2040_timer_monotonic {
($name:ident) => {
/// A `Monotonic` based on the RP2040 Timer peripheral.
struct $name;
pub struct $name;

impl $name {
/// Starts the `Monotonic`.
Expand Down
3 changes: 2 additions & 1 deletion rtic-monotonics/src/stm32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ macro_rules! __internal_create_stm32_timer_interrupt {
#[macro_export]
macro_rules! __internal_create_stm32_timer_struct {
($name:ident, $mono_backend:ident, $timer:ident, $tick_rate_hz:expr) => {
struct $name;
/// A `Monotonic` based on an STM32 timer peripheral.
pub struct $name;

impl $name {
/// Starts the `Monotonic`.
Expand Down
2 changes: 1 addition & 1 deletion rtic-monotonics/src/systick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ macro_rules! systick_monotonic {
};
($name:ident, $tick_rate_hz:expr) => {
/// A `Monotonic` based on SysTick.
struct $name;
pub struct $name;

impl $name {
/// Starts the `Monotonic`.
Expand Down

0 comments on commit 689c4a0

Please sign in to comment.