@@ -66,11 +66,11 @@ public:
6666 using Connector = GpioConnector<Peripheral::{{ peripheral }}, Signals...>;
6767 using Dp = typename Connector::template GetSignal< Gpio::Signal::Dp >;
6868 using Dm = typename Connector::template GetSignal< Gpio::Signal::Dm >;
69- %% if is_otg
69+ %% if has_id
7070 using Id = typename Connector::template GetSignal< Gpio::Signal::Id >;
7171%% endif
7272 static constexpr bool all_usb =
73- Connector::template IsValid<Dp> and Connector::template IsValid<Dm>;
73+ Connector::template IsValid<Dp> and Connector::template IsValid<Dm>{% if has_id %} and Connector::template IsValid<Id>{% endif %} ;
7474%% if is_ulpi
7575 static constexpr bool any_usb =
7676 Connector::template IsValid<Dp> or Connector::template IsValid<Dm>;
@@ -90,7 +90,7 @@ public:
9090%% endfor
9191%#
9292 static_assert((any_ulpi xor any_usb) and (all_ulpi or all_usb),
93- "{{ name }}::connect() requires at least Dp, Dm (+Id) signals OR 12 ULPI signals:\n"
93+ "{{ name }}::connect() requires at least Dp, Dm{% if has_id %} (+Id){% endif %} signals OR 12 ULPI signals:\n"
9494%% for signal in ulpi_signals
9595 " - {{ signal.replace("Ulpi", "") | upper }}{% if loop.last %}");{% else %}\n"{% endif %}
9696%% endfor
@@ -111,7 +111,7 @@ public:
111111%% set idt = ""
112112%% endif
113113 {{idt}}GpioSet<Dp, Dm>::configure(Gpio::OutputType::PushPull, Gpio::OutputSpeed::High);
114- %% if is_otg
114+ %% if has_id
115115 {{idt}}Id::configure(Gpio::OutputType::OpenDrain, Gpio::OutputSpeed::High);
116116 {{idt}}Id::configure(Gpio::InputType::PullUp);
117117%% endif
0 commit comments