1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::{Config, Element, Encode, EncodeError};

use crate::svd::RegisterCluster;

impl Encode for RegisterCluster {
    type Error = EncodeError;

    fn encode_with_config(&self, config: &Config) -> Result<Element, EncodeError> {
        match self {
            RegisterCluster::Register(r) => r.encode_with_config(config),
            RegisterCluster::Cluster(c) => c.encode_with_config(config),
        }
    }
}