Matteo Concas commented on a discussion on bsps/shared/grlib/1553/b1553rt.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/273#note_113963

 >          tsw = READ_DMA(&rt->mem[tx*0x3E0+suba]); 
 >  
 >          /* Build Message Information Word (B1553BRM-style) */
 > -        miw = (wc<<11) | (tsw&RT_TSW_BUS)>>4 | !(tsw&RT_TSW_OK)>>7 | 
 > (tsw&RT_TSW_ILL)>>5 | 

The `RT_TSW_OK` field is set to 1 if there was no error.
The Message Error (ME) field indicates an error and must be set to 0 if there 
was no error so the result of `tsw&RT_TSW_OK` must be negated. 

Another way to do this would be
```
~(tsw&RT_TSW_OK)>>7 & (1<<7)
```
But I don't think this is be cleaner than the current fix.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/273#note_113963
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to