Added func for simple periph clock toggling without the horrible if jungle

This commit is contained in:
2018-01-14 12:49:09 +01:00
parent 137619d942
commit e2e4d91cf3
14 changed files with 317 additions and 159 deletions
+3 -3
View File
@@ -97,9 +97,9 @@ static error_t Npx_init(Unit *unit)
struct priv *priv = unit->data;
// --- Parse config ---
priv->ll_pin = pin2ll(priv->pin_number, &suc);
priv->port = port2periph(priv->port_name, &suc);
Resource rsc = pin2resource(priv->port_name, priv->pin_number, &suc);
priv->ll_pin = hw_pin2ll(priv->pin_number, &suc);
priv->port = hw_port2periph(priv->port_name, &suc);
Resource rsc = hw_pin2resource(priv->port_name, priv->pin_number, &suc);
if (!suc) return E_BAD_CONFIG;
// --- Claim resources ---