Commit graph

6 commits

Author SHA1 Message Date
Sean Cross
516c74096d fernly: fix gcc warnings
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>
2015-04-07 18:17:26 +08:00
Sean Cross
deced0717a Revert "Silenced GCC warnings"
This reverts commit 11ac2200ff.
2015-04-07 18:17:26 +08:00
Robert Foss
11ac2200ff Silenced GCC warnings 2015-03-16 11:32:11 +01:00
Sean Cross
c2d17ffef2 lcd: get rid of lcd_setup()
Combine init and setup into one function, and call it lcd_init().

Signed-off-by: Sean Cross <xobs@kosagi.com>
2014-11-28 17:43:42 +08:00
Sean Cross
a7ff5acb5d lcd: improve DMA support
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>
2014-11-28 17:30:33 +08:00
Sean Cross
b8a7aedbd7 lcd: Add basic LCD library
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>
2014-11-28 17:10:00 +08:00