updated baxnet SANA-II driver and Gerber files

- Enforcer hit fix
 - replaced V2 Gerbers by V3 Gerbers
This commit is contained in:
Henryk Richter
2020-02-14 17:03:18 +01:00
parent 02c04ac3c5
commit 920891080b
70 changed files with 1023 additions and 8844 deletions
+34 -10
View File
@@ -32,11 +32,19 @@
#ifdef HAVE_VERSION_H
#include "version.h"
#endif
#ifndef NO_WR_SEM
#define WRSEM du_WrSem
#else
#define WRSEM du_Sem
#endif
/* NSD support is optional */
#ifdef NEWSTYLE
#include <devices/newstyle.h>
#include <devices/sana2devqueryext.h> /* new extension, code can be built without this include (but also without ext query then...) */
const UWORD dev_supportedcmds[] = {
NSCMD_DEVICEQUERY,
CMD_READ,
@@ -85,9 +93,9 @@ const ULONG blub[6] = {
};
/* enable heavy debug (D2=beginIO) */
#define D2(x)
//#define D2(x)
#define D4(x)
/* #define D2(x) D(x) */
#define D2(x) D(x)
/* #define D4(x) D(x) */
@@ -102,6 +110,8 @@ ASM SAVEDS struct Device *DevInit( ASMR(d0) DEVBASEP ASMREG(d0)
ULONG i;
LONG ok;
D(("DevInit()\n"));
p = ((UBYTE*)db) + sizeof(struct Library);
i = sizeof(DEVBASETYPE)-sizeof(struct Library);
while( i-- )
@@ -120,7 +130,9 @@ ASM SAVEDS struct Device *DevInit( ASMR(d0) DEVBASEP ASMREG(d0)
dbNewList( (struct List*)&db->db_Units[i].du_WriteQueue );
dbNewList( (struct List*)&db->db_Units[i].du_EventQueue );
InitSemaphore( &db->db_Units[i].du_Sem );
#ifndef NO_WR_SEM
InitSemaphore( &db->db_Units[i].du_WrSem );
#endif
db->db_Units[i].du_MTU = DEF_MTU;
db->db_Units[i].du_BitPerSec = DEF_BPS;
}
@@ -153,6 +165,8 @@ ASM SAVEDS struct Device *DevInit( ASMR(d0) DEVBASEP ASMREG(d0)
D(("No DOS\n"));
}
D(("%ld Boards found\n",ok));
/* no hardware found, reject init */
return (ok > 0) ? (struct Device*)db : (0);
}
@@ -489,7 +503,7 @@ ASM SAVEDS VOID DevBeginIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
LONG code;
LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq );
ObtainSemaphore(&db->db_Units[unit].du_WrSem);
ObtainSemaphore(&db->db_Units[unit].WRSEM);
code = write_frame( db, unit, ioreq );
if( code >= 0 )
{
@@ -497,12 +511,12 @@ ASM SAVEDS VOID DevBeginIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
ioreq->ios2_Req.io_Error = S2ERR_NO_ERROR;
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
}
ReleaseSemaphore(&db->db_Units[unit].du_WrSem);
ReleaseSemaphore(&db->db_Units[unit].WRSEM);
#else
ioreq->ios2_Req.io_Flags &= ~SANA2IOF_QUICK;
ObtainSemaphore(&db->db_Units[unit].du_WrSem);
ObtainSemaphore(&db->db_Units[unit].WRSEM);
ADDTAIL((struct List*)&db->db_Units[unit].du_WriteQueue,(struct Node*)ioreq);
ReleaseSemaphore(&db->db_Units[unit].du_WrSem);
ReleaseSemaphore(&db->db_Units[unit].WRSEM);
Signal( (struct Task*)db->db_ServerProc, SIGBREAKF_CTRL_F );
ioreq = (0);
#endif
@@ -651,16 +665,23 @@ ASM SAVEDS VOID DevBeginIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
ioreq = (0);
break;
#endif
case CMD_FLUSH:
/* TODO: really remove all requests */
ioreq->ios2_Req.io_Error = S2ERR_NO_ERROR;
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
break;
case CMD_RESET:
case CMD_UPDATE:
case CMD_CLEAR:
case CMD_STOP:
case CMD_START:
case CMD_FLUSH:
ioreq->ios2_Req.io_Error = IOERR_NOCMD;
/* we might not get a SANA-II request at this point, don't assume anything about struct */
/* ioreq->ios2_WireError = S2WERR_GENERIC_ERROR; */
if( ioreq->ios2_Req.io_Message.mn_Length >= sizeof( struct IOSana2Req ) )
{
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
}
break;
case S2_ADDMULTICASTADDRESS:
@@ -697,6 +718,8 @@ ASM SAVEDS LONG DevAbortIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
ULONG unit = (ULONG)ioreq->ios2_Req.io_Unit;
D2(("DevAbortIO unit %ld\n",unit));
ObtainSemaphore(&db->db_Units[unit].du_Sem);
/* start with the read list -> types -> readers -> reqlist */
@@ -810,6 +833,8 @@ static LONG dbStartServer( DEVBASEP, LONG unit )
/* server is running, wait for response */
volatile struct ServerMsg msg;
D(("Server Started, waiting for Response\n"));
msg.sm_devbase = db;
msg.sm_result = 0;
msg.sm_msg.mn_Length = sizeof(msg);
@@ -1002,9 +1027,8 @@ static void dbDeleteReader( DEVBASEP, ULONG unit, ULONG ID )
{
if( !(GetSucc(t2) ))
t2->srt_Flags &= ~SRTF_MULTREADER;
else t2->srt_Flags &= ~(SRTF_ONEREADER|SRTF_MULTREADER);
}
else t2->srt_Flags &= ~(SRTF_ONEREADER|SRTF_MULTREADER);
break;
}
rd = GetSucc(rd);