summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2013-12-23 22:51:03 +0100
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2013-12-23 22:51:03 +0100
commitc16b3d2c3ed616150104f2a6782c880faec68579 (patch)
tree783cf03d811fd465f23a8b0e0c58f02a526b0202
parent35c9449c31bdb18598c95b44f55e6b11b5bf0cd2 (diff)
downloadvgaedidinjector-c16b3d2c3ed616150104f2a6782c880faec68579.tar.gz
vgaedidinjector-c16b3d2c3ed616150104f2a6782c880faec68579.tar.bz2
v0.1v0.1
-rw-r--r--eagle.epf56
-rwxr-xr-xfirmware.binbin3162 -> 3138 bytes
-rw-r--r--part_loc_values.pdfbin19485 -> 19514 bytes
-rw-r--r--twi_master_driver.c40
-rw-r--r--twi_slave_driver.c5
-rw-r--r--vga_edid_injector.brdbin30793 -> 30793 bytes
6 files changed, 8 insertions, 93 deletions
diff --git a/eagle.epf b/eagle.epf
index 196a87d..a58abf8 100644
--- a/eagle.epf
+++ b/eagle.epf
@@ -12,18 +12,12 @@ UsedLibrary="edid_IC.lbr"
UsedLibrary="/home/wolfgangd/downloads/WW-Power.lbr"
[Win_1]
-Type="Control Panel"
-Loc="1 20 1438 457"
-State=1
-Number=0
-
-[Win_2]
Type="Schematic Editor"
-Loc="959 19 1437 897"
+Loc="720 301 1437 597"
State=2
Number=1
File="vga_edid_injector.sch"
-View="133984 913714 1605632 1538186"
+View="-213330 1357602 522494 1669842"
WireWidths=" 0 3048 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 4064 1524"
PadDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
PadDrills=" 5000 6000 7000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 8000"
@@ -55,50 +49,16 @@ ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=91
-Views=" 1: 133984 913714 1605632 1538186"
+Views=" 1: -213330 1357602 522494 1669842"
Sheet=1
-[Win_3]
-Type="Board Editor"
-Loc="0 19 1437 897"
-State=1
-Number=2
-File="vga_edid_injector.brd"
-View="120410 41984 612026 237272"
-WireWidths=" 0 2540 3048 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 4064"
-PadDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
-PadDrills=" 5000 6000 7000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 8000"
-ViaDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
-ViaDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
-HoleDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
-TextSizes=" 2540 3048 4064 8128 10160 12700 14224 16764 19304 21844 25400 38100 50800 64516 17780 6096"
-PolygonSpacings=" 2540 3048 4064 6096 8128 10160 14224 16764 17780 19304 21844 25400 38100 50800 64516 12700"
-PolygonIsolates=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
-MiterRadiuss=" 2540 3175 6350 12700 25400 10000 20000 25000 50000 75000 100000 0"
-SmdSizes=" 3048 1524 4064 2032 6096 3048 8128 4064 10160 5080 12700 6604 14224 7112 16764 8128 17780 9144 19304 9652 21844 10668 25400 12700 38100 19304 50800 25400 64516 32512 12700 6350"
-WireBend=0
-WireBendSet=0
-WireCap=1
-MiterStyle=0
-PadShape=0
-ViaShape=0
-PolygonPour=0
-PolygonRank=1
-PolygonThermals=1
-PolygonOrphans=0
-TextRatio=8
-PinDirection=3
-PinFunction=0
-PinLength=2
-PinVisible=3
-SwapLevel=0
-ArcDirection=0
-AddLevel=2
-PadsSameType=0
-Layer=16
+[Win_2]
+Type="Control Panel"
+Loc="720 600 1437 897"
+State=2
+Number=0
[Desktop]
Screen="1440 900"
Window="Win_1"
Window="Win_2"
-Window="Win_3"
diff --git a/firmware.bin b/firmware.bin
index a7961aa..4e4734f 100755
--- a/firmware.bin
+++ b/firmware.bin
Binary files differ
diff --git a/part_loc_values.pdf b/part_loc_values.pdf
index 4a08412..5f86765 100644
--- a/part_loc_values.pdf
+++ b/part_loc_values.pdf
Binary files differ
diff --git a/twi_master_driver.c b/twi_master_driver.c
index 8c5a695..35a5bed 100644
--- a/twi_master_driver.c
+++ b/twi_master_driver.c
@@ -281,19 +281,11 @@ bool TWI_MasterWriteRead(TWI_Master_t *twi,
*/
void TWI_MasterInterruptHandler(TWI_Master_t *twi)
{
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
uint8_t const currentStatus = twi->interface->MASTER.STATUS;
/* If arbitration lost or bus error. */
if ((currentStatus & TWI_MASTER_ARBLOST_bm) ||
(currentStatus & TWI_MASTER_BUSERR_bm)) {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
TWI_MasterArbitrationLostBusErrorHandler(twi);
twi->interface->MASTER.STATUS =
@@ -303,10 +295,6 @@ void TWI_MasterInterruptHandler(TWI_Master_t *twi)
} else
/* If master write interrupt. */
if (currentStatus & TWI_MASTER_WIF_bm) {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
TWI_MasterWriteHandler(twi);
twi->interface->MASTER.STATUS =
@@ -315,10 +303,6 @@ void TWI_MasterInterruptHandler(TWI_Master_t *twi)
} else
/* If master read interrupt. */
if (currentStatus & TWI_MASTER_RIF_bm) {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
TWI_MasterReadHandler(twi);
twi->interface->MASTER.STATUS =
@@ -332,10 +316,6 @@ void TWI_MasterInterruptHandler(TWI_Master_t *twi)
}
/* If unexpected state. */
else {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
TWI_MasterTransactionFinished(twi, TWIM_RESULT_FAIL);
twi->interface->MASTER.STATUS = currentStatus;
@@ -380,20 +360,12 @@ static void TWI_MasterWriteHandler(TWI_Master_t *twi)
/* If NOT acknowledged (NACK) by slave cancel the transaction. */
if( twi->interface->MASTER.STATUS & TWI_MASTER_RXACK_bm ) {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
twi->interface->MASTER.CTRLC = TWI_MASTER_CMD_STOP_gc;
twi->result = TWIM_RESULT_NACK_RECEIVED;
twi->status = TWIM_STATUS_READY;
} else
/* If more bytes to write, send data. */
if( twi->bytesWritten < bytesToWrite ) {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
uint8_t const data = twi->writeData[twi->bytesWritten];
twi->interface->MASTER.DATA = data;
twi->bytesWritten++;
@@ -402,19 +374,11 @@ static void TWI_MasterWriteHandler(TWI_Master_t *twi)
* 'R/_W = 1'
*/
if( twi->bytesRead < bytesToRead ) {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
uint8_t const readAddress = twi->address | 0x01;
twi->interface->MASTER.ADDR = readAddress;
}
/* If transaction finished, send STOP condition and set RESULT OK. */
else {
-#if 0
- PORTB.OUTSET = (1<<3);
- PORTB.OUTCLR = (1<<3);
-#endif
twi->interface->MASTER.CTRLC = TWI_MASTER_CMD_STOP_gc;
TWI_MasterTransactionFinished(twi, TWIM_RESULT_OK);
}
@@ -430,10 +394,6 @@ static void TWI_MasterWriteHandler(TWI_Master_t *twi)
*/
static void TWI_MasterReadHandler(TWI_Master_t *twi)
{
-#if 1
- PORTB.OUTTGL = (1<<3);
- PORTB.OUTTGL = (1<<3);
-#endif
/* Local variable used in if test to avoid compiler warning. */
uint8_t const bytesToRead = twi->bytesToRead;
diff --git a/twi_slave_driver.c b/twi_slave_driver.c
index 341ed6f..d15ed5f 100644
--- a/twi_slave_driver.c
+++ b/twi_slave_driver.c
@@ -126,11 +126,6 @@ void TWI_SlaveInitializeModule(TWI_Slave_t *twi,
*/
void TWI_SlaveInterruptHandler(TWI_Slave_t *twi)
{
-#if 1
- PORTE.OUTSET = (1<<2);
- PORTE.OUTCLR = (1<<2);
-#endif
-
uint8_t const currentStatus = twi->interface->SLAVE.STATUS;
/* If bus error. */
diff --git a/vga_edid_injector.brd b/vga_edid_injector.brd
index bee5ff7..5231f4f 100644
--- a/vga_edid_injector.brd
+++ b/vga_edid_injector.brd
Binary files differ