Log the constants reported by the MCU and log the number of move items
allocated after configuration.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a DECL_CONSTANT macro to allow the firmware to define constants
that are to be exported to the host during the "identify" phase. This
replaces the existing hardcoded mechanism of scanning the Kconfig
header file for certain constants.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The arduino style serial port interfaces can reset the MCU when the
serial port is opened. Clearing the HUPCL flag makes this less
likely.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use the greenlet mechanism to wait for the response directly in the
send_with_response() method. This simplifies the calling code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use the greenlet mechanism to wait for the connection to come up in
the serial connect() method. This simplifies the calling code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Setup the reactor and run the MCU connection code as a timer within
the reactor. The connection code will make use of reactor greenlets
so that it can wait for events during the connection phase.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Store the baud rate the MCU is configured for in the "identify" data
and use that rate when calculating the baudadjust parameter.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The Arduino Due uses a 1200 baud connection to signal an erase
sequence, so avoid it during normal serial resets.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>