v0.1
This commit is contained in:
56
eagle.epf
56
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"
|
||||
|
||||
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user