grlib/ascs: Fix evaluation order violations, CIDs 1399778, 1399782

This commit is contained in:
Matteo Concas authored and Sebastian Huber committed 2024-10-21 07:02:51 +00:00
1 parent 93413ed315
commit a5f64ff27d
1 file changed
+2 -2
+2 -2
View File
@@ -329,7 +329,7 @@ int ASCS_input_select(int slave) {
return -GRASCS_ERROR_TRANSACTIVE;
}
cfg->regs->cmd = ((cfg->regs->cmd &= ~GRASCS_CMD_SLAVESEL) |
cfg->regs->cmd = ((cfg->regs->cmd & ~GRASCS_CMD_SLAVESEL) |
(slave << GRASCS_CMD_SLAVESEL_BITS));
rtems_semaphore_release(cfg->tmsem1);
@@ -364,7 +364,7 @@ int ASCS_etr_select(int etr, int freq) {
}
cfg->regs->clk = ASCS_calc_clkreg(cfg->caps->clkfreq,freq);
cfg->regs->cmd = ((cfg->regs->cmd &= ~GRASCS_CMD_ETRCTRL) |
cfg->regs->cmd = ((cfg->regs->cmd & ~GRASCS_CMD_ETRCTRL) |
(etr << GRASCS_CMD_ETRCTRL_BITS));
return 0;