RTIC - Generic type in Shared

Hello.
I have a problem with the Generic type in the Shared struct.
How to fix it?

  struct Test<T>
  {
      x: T
  }

  impl<T> Test<T>
  {
      pub fn new(x: T) -> Self
      {
          Test{x}
      }
  }

  #[shared]
  struct Shared
   {
       t: Test<T>
   }
    
  #[init]
  fn init(cx: init::Context) -> (Shared<T>, Local, init::Monotonics) { }

error:

error: the `#[init]` function must have signature `fn(init::Context) -> (Shared resources struct, Local resources struct, init::Monotonics)`
  --> app/src/main.rs:138:8
   |
138 |     fn init(cx: init::Context) -> (Shared<T>, Local, init::Monotonics) {
   |        ^^^^

Similar problem: RTIC. Is it able to use generic resources?
posted by: @BrMisha

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.