'ldr' expects an integer #13073
Replies: 1 comment 1 reply
-
General remark: Use triple backticks if you want to format multi-line code.
read and write the value of r3 from / to the memory location r0 with offset stm.USART_CR1. Now, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks shared this impressive project from https://github.com/dhylands/bioloid3/blob/e2b8e4f044110b63decafe514b78b6f7f4d7883e/bioloid/stm_uart_port.py#L9 by @davehylands,but when build, show this error issue.
Error compiling umodbus/stm_uart_port.py:
Traceback (most recent call last):
File "umodbus/stm_uart_port.py", line 74, in _write_packet
SyntaxError: 'ldr' expects an integer
how to solve this issue? The micropython is V1.22
`"""This module implements the UART_Port class which talks to bioloid
devices using a UART on the pyboard.
"""
import stm
from pyb import UART
class UART_Port:
"""Implements a port which can send or receive commands with a bioloid
device using the pyboard UART class. This particular class takes
advantage of some features which are only available on the STM32F4xx processors.
"""
@micropython.asm_thumb
def _write_packet(r0, r1, r2): # uart(r0) buf(r1) len(r2)
loop
wait_txe # ;
write_dr
endloop
wait_tx_complete # ;
`
Beta Was this translation helpful? Give feedback.
All reactions