mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2025-04-21 12:27:27 +03:00
ubb-vga: avoid diodes; redesign for luminance bit (Y) and MMC controller
- ubb-vga.sch: use resistive divider instead of diodes - ubb-vga.sch, ubb-vga.c (VSYNC): moved VSYNC from DAT3 to CLK to make all MMC data lines available for pixel data - ubb-vga.sch, ubb-vga.c (R): moved red from DAT2 to DAT3 for convenient access to the 4th channel - ubb-vga.sch: added luminance (Y) channel - ubb-vga.sch: added pull-down to HSYNC/CMD, for later use with the MMC controller - ubb-vga.c (pdfuns, pdfunc, ben_setup, setup): make UBB signals GPIOs, in case someone left them in a different configuration
This commit is contained in:
@@ -48,11 +48,11 @@ static uint8_t thres = 63;
|
||||
#define CMD (1 << 8)
|
||||
#define CLK (1 << 9)
|
||||
|
||||
#define R DAT2
|
||||
#define R DAT3
|
||||
#define G DAT0
|
||||
#define B DAT1
|
||||
#define HSYNC CMD
|
||||
#define VSYNC DAT3
|
||||
#define VSYNC CLK
|
||||
|
||||
|
||||
/* ----- Ben hardware ------------------------------------------------------ */
|
||||
@@ -73,6 +73,7 @@ static uint32_t old_clkgr;
|
||||
|
||||
static volatile uint32_t *pdpin, *pddats, *pddatc;
|
||||
static volatile uint32_t *pddirs, *pddirc;
|
||||
static volatile uint32_t *pdfuns, *pdfunc;
|
||||
|
||||
static volatile uint32_t *tssr, *tscr;
|
||||
static volatile uint32_t *tesr, *tecr;
|
||||
@@ -169,6 +170,9 @@ static void ben_setup(void)
|
||||
pddats = base+0x10314;
|
||||
pddatc = base+0x10318;
|
||||
|
||||
pdfuns = base+0x10344;
|
||||
pdfunc = base+0x10348;
|
||||
|
||||
pddirs = base+0x10364;
|
||||
pddirc = base+0x10368;
|
||||
|
||||
@@ -237,6 +241,7 @@ void setup(void)
|
||||
{
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
ben_setup();
|
||||
*pdfunc = R | G | B | HSYNC | VSYNC;
|
||||
*pddirs = R | G | B | HSYNC | VSYNC;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user