1.1 --- a/pkg/devices/lib/dma/src/x1600.cc Thu Feb 01 01:16:04 2024 +0100
1.2 +++ b/pkg/devices/lib/dma/src/x1600.cc Thu Feb 01 22:40:19 2024 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * DMA support for the X1600.
1.6 *
1.7 - * Copyright (C) 2021, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -439,7 +439,7 @@
1.13 bool
1.14 Dma_x1600_chip::have_interrupt(uint8_t channel)
1.15 {
1.16 - return _regs[Dma_irq_pending] & (1 << channel) ? true : false;
1.17 + return _regs[Dma_irq_pending] & (1UL << channel) ? true : false;
1.18 }
1.19
1.20 // Acknowledge an interrupt condition on the given channel.
1.21 @@ -447,7 +447,7 @@
1.22 void
1.23 Dma_x1600_chip::ack_irq(uint8_t channel)
1.24 {
1.25 - _regs[Dma_irq_pending] = _regs[Dma_irq_pending] & ~(1 << channel);
1.26 + _regs[Dma_irq_pending] = _regs[Dma_irq_pending] & ~(1UL << channel);
1.27 }
1.28
1.29 // Return whether an address error condition has arisen.