```rust
use std::convert::Infallible;

use embedded_hal::digital::{ErrorType, InputPin, OutputPin};

struct MyDriver<O: OutputPin, IO: InputPin + OutputPin> {
    pin1: O,
    pin2: IO,
}

impl<O: OutputPin, IO: InputPin + OutputPin> MyDriver<O, IO> {
    fn new_two_pins(pin1: O, pin2: IO) -> Self {
        Self { pin1, pin2 }
    }
}

impl<O: OutputPin> MyDriver<O, NoIoPin> {
    fn new_one_pin(pin1: O) -> Self {
        Self {
            pin1,
            pin2: NoIoPin,
        }
    }
}

struct NoIoPin;
impl ErrorType for NoIoPin {
    type Error = Infallible;
}
impl InputPin for NoIoPin {
    fn is_high(&mut self) -> Result<bool, Self::Error> {
        todo!()
    }
    fn is_low(&mut self) -> Result<bool, Self::Error> {
        todo!()
    }
}

impl OutputPin for NoIoPin {
    fn set_high(&mut self) -> Result<(), Self::Error> {
        todo!()
    }
    fn set_low(&mut self) -> Result<(), Self::Error> {
        todo!()
    }
}