Merge branch 'cc32d9-dev' into dev

This commit is contained in:
Manuel Bl
2020-07-31 21:54:26 +02:00
2 changed files with 25 additions and 2 deletions

View File

@ -124,14 +124,22 @@ void hal_pin_rst(u1_t val)
return;
if (val == 0 || val == 1)
{ // drive pin
{
// drive pin
gpio_set_level(ttn_hal.pinRst, val);
gpio_set_direction(ttn_hal.pinRst, GPIO_MODE_OUTPUT);
}
else
{ // keep pin floating
{
#if defined(CONFIG_TTN_RESET_STATES_ASSERTED)
// drive up the pin because the hardware is nonstandard
gpio_set_level(ttn_hal.pinRst, 1);
gpio_set_direction(ttn_hal.pinRst, GPIO_MODE_OUTPUT);
#else
// keep pin floating
gpio_set_level(ttn_hal.pinRst, val);
gpio_set_direction(ttn_hal.pinRst, GPIO_MODE_INPUT);
#endif
}
}