mirror of
https://gitlab.cern.ch/wotsubo/endcap-sl-software-ri-generator.git
synced 2025-06-30 00:30:09 +09:00
Multiple backends
This commit is contained in:
parent
e62d935829
commit
dd119ccdb8
2 changed files with 19 additions and 16 deletions
|
@ -11,19 +11,19 @@ pub(super) fn gen_registerspec_impl(
|
|||
) -> TokenStream {
|
||||
let impl_rw = match modf {
|
||||
RwSpecifier::R => quote! {
|
||||
impl Readable for #reg_name<'_> {}
|
||||
impl<T: AxiC2c1Spec> Readable for #reg_name<'_, T> {}
|
||||
},
|
||||
RwSpecifier::W => quote! {
|
||||
impl Writable for #reg_name<'_> {}
|
||||
impl<T: AxiC2c1Spec> Writable for #reg_name<'_, T> {}
|
||||
},
|
||||
RwSpecifier::RW => quote! {
|
||||
impl Readable for #reg_name<'_> {}
|
||||
impl Writable for #reg_name<'_> {}
|
||||
impl Modifiable for #reg_name<'_> {}
|
||||
impl<T: AxiC2c1Spec> Readable for #reg_name<'_, T> {}
|
||||
impl<T: AxiC2c1Spec> Writable for #reg_name<'_, T> {}
|
||||
impl<T: AxiC2c1Spec> Modifiable for #reg_name<'_, T> {}
|
||||
},
|
||||
};
|
||||
quote! {
|
||||
impl RegisterSpec for #reg_name<'_> {
|
||||
impl<T: AxiC2c1Spec> RegisterSpec for #reg_name<'_, T> {
|
||||
type Ux = #type_ux;
|
||||
type T = #type_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue