Several GCC warnings were getting generated on various compilers. This
patch solves those warnings.
For various platforms, a uint32_t is not the same as an unsigned int. On
these platforms, printf("%x", (uint32_t)0) generates a warning. Use the
<inttypes.h> formats (i.e. PRIx32) as formatters to silence these warnings.
There was also a security warning picked up by certain compilers when
calling printf(msg) in fernly-usb-loader. This has been fixed.
Finally, lcd.c was refactored to fold the unused lcd_dat_slot() function
into the lcd_cmd_slot() function as a brand-new unified lcd_slot().
Signed-off-by: Sean Cross <xobs@kosagi.com>
Rather than completely rewriting everything on each runthrough, we
now only refill the command buffer before toggling the RUN bit.
This will improve performance by eliminating excessive register writes.
Signed-off-by: Sean Cross <xobs@kosagi.com>
This supports setting up the LCD, and then starting a transfer.
Interrupts are required to have self-refresh working.
Signed-off-by: Sean Cross <xobs@kosagi.com>