Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules: hal: nordic: Define NRFX_ASSERT as __ASSERT_NO_MSG #22869

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nrfx_twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int twi_nrfx_pm_control(struct device *dev, u32_t ctrl_command,
}
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = get_dev_data(dev)->pm_state;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_nrfx_twim.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static int twim_nrfx_pm_control(struct device *dev, u32_t ctrl_command,
}
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = get_dev_data(dev)->pm_state;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/pwm/pwm_nrfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static int pwm_nrfx_set_power_state(u32_t new_state,
}
break;
default:
assert(false);
__ASSERT_NO_MSG(false);
break;
}
return err;
Expand All @@ -320,7 +320,7 @@ static int pwm_nrfx_pm_control(struct device *dev,
}
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = (*current_state);
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/serial/uart_nrfx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,9 +1026,9 @@ static void uart_nrfx_set_power_state(struct device *dev, u32_t new_state)
nrf_uart_enable(uart0_addr);
nrf_uart_task_trigger(uart0_addr, NRF_UART_TASK_STARTRX);
} else {
assert(new_state == DEVICE_PM_LOW_POWER_STATE ||
new_state == DEVICE_PM_SUSPEND_STATE ||
new_state == DEVICE_PM_OFF_STATE);
__ASSERT_NO_MSG(new_state == DEVICE_PM_LOW_POWER_STATE ||
new_state == DEVICE_PM_SUSPEND_STATE ||
new_state == DEVICE_PM_OFF_STATE);
nrf_uart_disable(uart0_addr);
uart_nrfx_pins_enable(dev, false);
}
Expand All @@ -1047,7 +1047,7 @@ static int uart_nrfx_pm_control(struct device *dev, u32_t ctrl_command,
current_state = new_state;
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = current_state;
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/serial/uart_nrfx_uarte.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,9 +1285,9 @@ static void uarte_nrfx_set_power_state(struct device *dev, u32_t new_state)
#endif
nrf_uarte_task_trigger(uarte, NRF_UARTE_TASK_STARTRX);
} else {
assert(new_state == DEVICE_PM_LOW_POWER_STATE ||
new_state == DEVICE_PM_SUSPEND_STATE ||
new_state == DEVICE_PM_OFF_STATE);
__ASSERT_NO_MSG(new_state == DEVICE_PM_LOW_POWER_STATE ||
new_state == DEVICE_PM_SUSPEND_STATE ||
new_state == DEVICE_PM_OFF_STATE);

/* if pm is already not active, driver will stay indefinitely
* in while loop waiting for event NRF_UARTE_EVENT_RXTO
Expand Down Expand Up @@ -1332,7 +1332,7 @@ static int uarte_nrfx_pm_control(struct device *dev, u32_t ctrl_command,
data->pm_state = new_state;
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = data->pm_state;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_nrfx_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static int spi_nrfx_pm_control(struct device *dev, u32_t ctrl_command,
}
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = get_dev_data(dev)->pm_state;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_nrfx_spim.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static int spim_nrfx_pm_control(struct device *dev, u32_t ctrl_command,
}
}
} else {
assert(ctrl_command == DEVICE_PM_GET_POWER_STATE);
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
*((u32_t *)context) = get_dev_data(dev)->pm_state;
}

Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ manifest:
revision: a12d92816a53a521d79cefcf5c38b9dc8a4fed6e
path: modules/hal/cypress
- name: hal_nordic
revision: 12d7647870888e4cb0e421f2b26884c2e76915ac
revision: 62f9c632209ce9438edfcfdcee7a846344359647
path: modules/hal/nordic
- name: hal_openisa
revision: 3b54187649cc9b37161d49918f1ad28ff7c7f830
Expand Down