Content-Length: 265720 | pFad | http://github.com/micropython/micropython/commit/d5f3fcd935f778d89918449b123f1c7bd6398cdf

D5 rp2/rp2_dma: Fix fetching 'write' buffers for writing not reading. · micropython/micropython@d5f3fcd · GitHub
Skip to content

Commit d5f3fcd

Browse files
nickovsdpgeorge
authored andcommitted
rp2/rp2_dma: Fix fetching 'write' buffers for writing not reading.
Signed-off-by: Nicko van Someren <nicko@nicko.org>
1 parent 9b8c64c commit d5f3fcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/rp2/rp2_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ STATIC const uint32_t rp2_dma_ctrl_field_count = MP_ARRAY_SIZE(rp2_dma_ctrl_fiel
8686
STATIC uint32_t rp2_dma_register_value_from_obj(mp_obj_t o, int reg_type) {
8787
if (reg_type == REG_TYPE_ADDR_READ || reg_type == REG_TYPE_ADDR_WRITE) {
8888
mp_buffer_info_t buf_info;
89-
mp_uint_t flags = MP_BUFFER_READ;
89+
mp_uint_t flags = (reg_type == REG_TYPE_ADDR_READ) ? MP_BUFFER_READ : MP_BUFFER_WRITE;
9090
if (mp_get_buffer(o, &buf_info, flags)) {
9191
return (uint32_t)buf_info.buf;
9292
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython/commit/d5f3fcd935f778d89918449b123f1c7bd6398cdf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy